@blocklet/payment-react 1.25.10 → 1.26.1

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.
Files changed (160) hide show
  1. package/es/checkout-v2/checkout-v2.d.ts +2 -0
  2. package/es/checkout-v2/checkout-v2.js +121 -0
  3. package/es/checkout-v2/components/dialogs/checkout-dialogs.d.ts +1 -0
  4. package/es/checkout-v2/components/dialogs/checkout-dialogs.js +106 -0
  5. package/es/checkout-v2/components/left/billing-toggle.d.ts +6 -0
  6. package/es/checkout-v2/components/left/billing-toggle.js +118 -0
  7. package/es/checkout-v2/components/left/cross-sell-card.d.ts +10 -0
  8. package/es/checkout-v2/components/left/cross-sell-card.js +167 -0
  9. package/es/checkout-v2/components/left/product-item-card.d.ts +26 -0
  10. package/es/checkout-v2/components/left/product-item-card.js +571 -0
  11. package/es/checkout-v2/components/left/promotion-input.d.ts +19 -0
  12. package/es/checkout-v2/components/left/promotion-input.js +178 -0
  13. package/es/checkout-v2/components/left/staking-breakdown.d.ts +9 -0
  14. package/es/checkout-v2/components/left/staking-breakdown.js +48 -0
  15. package/es/checkout-v2/components/left/trial-info.d.ts +13 -0
  16. package/es/checkout-v2/components/left/trial-info.js +48 -0
  17. package/es/checkout-v2/components/right/currency-grid.d.ts +8 -0
  18. package/es/checkout-v2/components/right/currency-grid.js +48 -0
  19. package/es/checkout-v2/components/right/customer-info-card.d.ts +17 -0
  20. package/es/checkout-v2/components/right/customer-info-card.js +156 -0
  21. package/es/checkout-v2/components/right/status-feedback.d.ts +7 -0
  22. package/es/checkout-v2/components/right/status-feedback.js +17 -0
  23. package/es/checkout-v2/components/right/submit-button.d.ts +10 -0
  24. package/es/checkout-v2/components/right/submit-button.js +29 -0
  25. package/es/checkout-v2/components/right/subscription-disclaimer.d.ts +11 -0
  26. package/es/checkout-v2/components/right/subscription-disclaimer.js +8 -0
  27. package/es/checkout-v2/components/shared/exchange-rate-footer.d.ts +23 -0
  28. package/es/checkout-v2/components/shared/exchange-rate-footer.js +182 -0
  29. package/es/checkout-v2/components/shared/scenario-badge.d.ts +6 -0
  30. package/es/checkout-v2/components/shared/scenario-badge.js +47 -0
  31. package/es/checkout-v2/components/shared/total-display.d.ts +7 -0
  32. package/es/checkout-v2/components/shared/total-display.js +84 -0
  33. package/es/checkout-v2/index.d.ts +2 -0
  34. package/es/checkout-v2/index.js +1 -0
  35. package/es/checkout-v2/layouts/checkout-layout.d.ts +7 -0
  36. package/es/checkout-v2/layouts/checkout-layout.js +226 -0
  37. package/es/checkout-v2/panels/left/composite-panel.d.ts +1 -0
  38. package/es/checkout-v2/panels/left/composite-panel.js +423 -0
  39. package/es/checkout-v2/panels/left/credit-topup-panel.d.ts +1 -0
  40. package/es/checkout-v2/panels/left/credit-topup-panel.js +611 -0
  41. package/es/checkout-v2/panels/left/scenario-router.d.ts +1 -0
  42. package/es/checkout-v2/panels/left/scenario-router.js +19 -0
  43. package/es/checkout-v2/panels/right/payment-panel.d.ts +1 -0
  44. package/es/checkout-v2/panels/right/payment-panel.js +644 -0
  45. package/es/checkout-v2/types.d.ts +15 -0
  46. package/es/checkout-v2/types.js +0 -0
  47. package/es/checkout-v2/utils/format.d.ts +59 -0
  48. package/es/checkout-v2/utils/format.js +125 -0
  49. package/es/checkout-v2/utils/scenario-detector.d.ts +3 -0
  50. package/es/checkout-v2/utils/scenario-detector.js +17 -0
  51. package/es/checkout-v2/views/error-view.d.ts +7 -0
  52. package/es/checkout-v2/views/error-view.js +269 -0
  53. package/es/checkout-v2/views/loading-view.d.ts +5 -0
  54. package/es/checkout-v2/views/loading-view.js +158 -0
  55. package/es/checkout-v2/views/success-view.d.ts +29 -0
  56. package/es/checkout-v2/views/success-view.js +614 -0
  57. package/es/components/phone-field.d.ts +14 -0
  58. package/es/components/phone-field.js +96 -0
  59. package/es/index.d.ts +3 -1
  60. package/es/index.js +3 -1
  61. package/es/locales/en.js +45 -6
  62. package/es/locales/zh.js +45 -6
  63. package/es/payment/form/index.js +10 -1
  64. package/lib/checkout-v2/checkout-v2.d.ts +2 -0
  65. package/lib/checkout-v2/checkout-v2.js +151 -0
  66. package/lib/checkout-v2/components/dialogs/checkout-dialogs.d.ts +1 -0
  67. package/lib/checkout-v2/components/dialogs/checkout-dialogs.js +131 -0
  68. package/lib/checkout-v2/components/left/billing-toggle.d.ts +6 -0
  69. package/lib/checkout-v2/components/left/billing-toggle.js +126 -0
  70. package/lib/checkout-v2/components/left/cross-sell-card.d.ts +10 -0
  71. package/lib/checkout-v2/components/left/cross-sell-card.js +257 -0
  72. package/lib/checkout-v2/components/left/product-item-card.d.ts +26 -0
  73. package/lib/checkout-v2/components/left/product-item-card.js +738 -0
  74. package/lib/checkout-v2/components/left/promotion-input.d.ts +19 -0
  75. package/lib/checkout-v2/components/left/promotion-input.js +220 -0
  76. package/lib/checkout-v2/components/left/staking-breakdown.d.ts +9 -0
  77. package/lib/checkout-v2/components/left/staking-breakdown.js +96 -0
  78. package/lib/checkout-v2/components/left/trial-info.d.ts +13 -0
  79. package/lib/checkout-v2/components/left/trial-info.js +82 -0
  80. package/lib/checkout-v2/components/right/currency-grid.d.ts +8 -0
  81. package/lib/checkout-v2/components/right/currency-grid.js +96 -0
  82. package/lib/checkout-v2/components/right/customer-info-card.d.ts +17 -0
  83. package/lib/checkout-v2/components/right/customer-info-card.js +246 -0
  84. package/lib/checkout-v2/components/right/status-feedback.d.ts +7 -0
  85. package/lib/checkout-v2/components/right/status-feedback.js +30 -0
  86. package/lib/checkout-v2/components/right/submit-button.d.ts +10 -0
  87. package/lib/checkout-v2/components/right/submit-button.js +35 -0
  88. package/lib/checkout-v2/components/right/subscription-disclaimer.d.ts +11 -0
  89. package/lib/checkout-v2/components/right/subscription-disclaimer.js +33 -0
  90. package/lib/checkout-v2/components/shared/exchange-rate-footer.d.ts +23 -0
  91. package/lib/checkout-v2/components/shared/exchange-rate-footer.js +282 -0
  92. package/lib/checkout-v2/components/shared/scenario-badge.d.ts +6 -0
  93. package/lib/checkout-v2/components/shared/scenario-badge.js +57 -0
  94. package/lib/checkout-v2/components/shared/total-display.d.ts +7 -0
  95. package/lib/checkout-v2/components/shared/total-display.js +154 -0
  96. package/lib/checkout-v2/index.d.ts +2 -0
  97. package/lib/checkout-v2/index.js +13 -0
  98. package/lib/checkout-v2/layouts/checkout-layout.d.ts +7 -0
  99. package/lib/checkout-v2/layouts/checkout-layout.js +308 -0
  100. package/lib/checkout-v2/panels/left/composite-panel.d.ts +1 -0
  101. package/lib/checkout-v2/panels/left/composite-panel.js +515 -0
  102. package/lib/checkout-v2/panels/left/credit-topup-panel.d.ts +1 -0
  103. package/lib/checkout-v2/panels/left/credit-topup-panel.js +795 -0
  104. package/lib/checkout-v2/panels/left/scenario-router.d.ts +1 -0
  105. package/lib/checkout-v2/panels/left/scenario-router.js +29 -0
  106. package/lib/checkout-v2/panels/right/payment-panel.d.ts +1 -0
  107. package/lib/checkout-v2/panels/right/payment-panel.js +906 -0
  108. package/lib/checkout-v2/types.d.ts +15 -0
  109. package/lib/checkout-v2/types.js +1 -0
  110. package/lib/checkout-v2/utils/format.d.ts +59 -0
  111. package/lib/checkout-v2/utils/format.js +158 -0
  112. package/lib/checkout-v2/utils/scenario-detector.d.ts +3 -0
  113. package/lib/checkout-v2/utils/scenario-detector.js +23 -0
  114. package/lib/checkout-v2/views/error-view.d.ts +7 -0
  115. package/lib/checkout-v2/views/error-view.js +321 -0
  116. package/lib/checkout-v2/views/loading-view.d.ts +5 -0
  117. package/lib/checkout-v2/views/loading-view.js +168 -0
  118. package/lib/checkout-v2/views/success-view.d.ts +29 -0
  119. package/lib/checkout-v2/views/success-view.js +735 -0
  120. package/lib/components/phone-field.d.ts +14 -0
  121. package/lib/components/phone-field.js +130 -0
  122. package/lib/index.d.ts +3 -1
  123. package/lib/index.js +8 -0
  124. package/lib/locales/en.js +45 -6
  125. package/lib/locales/zh.js +45 -6
  126. package/lib/payment/form/index.js +10 -1
  127. package/package.json +4 -3
  128. package/src/checkout-v2/checkout-v2.tsx +155 -0
  129. package/src/checkout-v2/components/dialogs/checkout-dialogs.tsx +134 -0
  130. package/src/checkout-v2/components/left/billing-toggle.tsx +122 -0
  131. package/src/checkout-v2/components/left/cross-sell-card.tsx +170 -0
  132. package/src/checkout-v2/components/left/product-item-card.tsx +642 -0
  133. package/src/checkout-v2/components/left/promotion-input.tsx +207 -0
  134. package/src/checkout-v2/components/left/staking-breakdown.tsx +57 -0
  135. package/src/checkout-v2/components/left/trial-info.tsx +63 -0
  136. package/src/checkout-v2/components/right/currency-grid.tsx +59 -0
  137. package/src/checkout-v2/components/right/customer-info-card.tsx +214 -0
  138. package/src/checkout-v2/components/right/status-feedback.tsx +35 -0
  139. package/src/checkout-v2/components/right/submit-button.tsx +37 -0
  140. package/src/checkout-v2/components/right/subscription-disclaimer.tsx +27 -0
  141. package/src/checkout-v2/components/shared/exchange-rate-footer.tsx +221 -0
  142. package/src/checkout-v2/components/shared/scenario-badge.tsx +51 -0
  143. package/src/checkout-v2/components/shared/total-display.tsx +112 -0
  144. package/src/checkout-v2/index.ts +2 -0
  145. package/src/checkout-v2/layouts/checkout-layout.tsx +232 -0
  146. package/src/checkout-v2/panels/left/composite-panel.tsx +465 -0
  147. package/src/checkout-v2/panels/left/credit-topup-panel.tsx +677 -0
  148. package/src/checkout-v2/panels/left/scenario-router.tsx +22 -0
  149. package/src/checkout-v2/panels/right/payment-panel.tsx +703 -0
  150. package/src/checkout-v2/types.ts +18 -0
  151. package/src/checkout-v2/utils/format.ts +205 -0
  152. package/src/checkout-v2/utils/scenario-detector.ts +30 -0
  153. package/src/checkout-v2/views/error-view.tsx +293 -0
  154. package/src/checkout-v2/views/loading-view.tsx +162 -0
  155. package/src/checkout-v2/views/success-view.tsx +770 -0
  156. package/src/components/phone-field.tsx +119 -0
  157. package/src/index.ts +3 -0
  158. package/src/locales/en.tsx +45 -4
  159. package/src/locales/zh.tsx +43 -4
  160. package/src/payment/form/index.tsx +16 -1
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ module.exports = ScenarioBadge;
7
+ var _jsxRuntime = require("react/jsx-runtime");
8
+ var _material = require("@mui/material");
9
+ var _context = require("@arcblock/ux/lib/Locale/context");
10
+ var _format = require("../../utils/format");
11
+ function ScenarioBadge({
12
+ livemode,
13
+ label = void 0
14
+ }) {
15
+ const {
16
+ t
17
+ } = (0, _context.useLocaleContext)();
18
+ return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
19
+ direction: "row",
20
+ alignItems: "center",
21
+ spacing: 1,
22
+ sx: {
23
+ mb: 1.5
24
+ },
25
+ children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
26
+ component: "span",
27
+ sx: {
28
+ fontSize: 10,
29
+ fontWeight: 700,
30
+ letterSpacing: "0.1em",
31
+ lineHeight: 1,
32
+ textTransform: "uppercase",
33
+ color: "primary.main",
34
+ bgcolor: theme => theme.palette.mode === "dark" ? `${theme.palette.primary.main}1A` : `${theme.palette.primary.main}0D`,
35
+ px: 1,
36
+ py: 0.5,
37
+ borderRadius: "4px"
38
+ },
39
+ children: label || (0, _format.tSafe)(t, "payment.checkout.orderSummary", "Order Summary")
40
+ }), !livemode && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
41
+ component: "span",
42
+ sx: {
43
+ fontSize: 10,
44
+ fontWeight: 700,
45
+ letterSpacing: "0.1em",
46
+ lineHeight: 1,
47
+ textTransform: "uppercase",
48
+ color: theme => theme.palette.mode === "dark" ? theme.palette.grey[500] : theme.palette.grey[400],
49
+ bgcolor: theme => theme.palette.mode === "dark" ? "rgba(255,255,255,0.06)" : theme.palette.grey[100],
50
+ px: 1,
51
+ py: 0.5,
52
+ borderRadius: "4px"
53
+ },
54
+ children: t("common.livemode")
55
+ })]
56
+ });
57
+ }
@@ -0,0 +1,7 @@
1
+ interface TotalDisplayProps {
2
+ label?: string;
3
+ total: string;
4
+ usdEquivalent?: string | null;
5
+ }
6
+ export default function TotalDisplay({ label, total, usdEquivalent }: TotalDisplayProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ module.exports = TotalDisplay;
7
+ var _jsxRuntime = require("react/jsx-runtime");
8
+ var _material = require("@mui/material");
9
+ var _context = require("@arcblock/ux/lib/Locale/context");
10
+ var _format = require("../../utils/format");
11
+ function splitPrice(total) {
12
+ if (!total) return {
13
+ prefix: "",
14
+ integer: "0",
15
+ decimal: "",
16
+ suffix: ""
17
+ };
18
+ const trimmed = total.trim();
19
+ if (trimmed.startsWith("$")) {
20
+ const numPart = trimmed.slice(1).trim();
21
+ const dotIdx2 = numPart.indexOf(".");
22
+ if (dotIdx2 >= 0) {
23
+ return {
24
+ prefix: "$",
25
+ integer: numPart.slice(0, dotIdx2),
26
+ decimal: `.${numPart.slice(dotIdx2 + 1)}`,
27
+ suffix: ""
28
+ };
29
+ }
30
+ return {
31
+ prefix: "$",
32
+ integer: numPart,
33
+ decimal: "",
34
+ suffix: ""
35
+ };
36
+ }
37
+ const parts = trimmed.split(/\s+/);
38
+ const numStr = parts[0] || "0";
39
+ const unit = parts.slice(1).join(" ");
40
+ const dotIdx = numStr.indexOf(".");
41
+ if (dotIdx >= 0) {
42
+ return {
43
+ prefix: "",
44
+ integer: numStr.slice(0, dotIdx),
45
+ decimal: `.${numStr.slice(dotIdx + 1)}`,
46
+ suffix: unit
47
+ };
48
+ }
49
+ return {
50
+ prefix: "",
51
+ integer: numStr,
52
+ decimal: "",
53
+ suffix: unit
54
+ };
55
+ }
56
+ function TotalDisplay({
57
+ label = void 0,
58
+ total,
59
+ usdEquivalent = void 0
60
+ }) {
61
+ const {
62
+ t
63
+ } = (0, _context.useLocaleContext)();
64
+ const {
65
+ prefix,
66
+ integer,
67
+ decimal,
68
+ suffix
69
+ } = splitPrice(total);
70
+ return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
71
+ sx: {
72
+ pt: 4,
73
+ borderTop: "1px solid",
74
+ borderColor: "divider"
75
+ },
76
+ children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
77
+ direction: "row",
78
+ justifyContent: "space-between",
79
+ alignItems: "flex-end",
80
+ children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Stack, {
81
+ spacing: 0.5,
82
+ sx: {
83
+ pb: 1
84
+ },
85
+ children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
86
+ sx: {
87
+ fontSize: 12,
88
+ fontWeight: 700,
89
+ letterSpacing: "0.02em",
90
+ color: "text.disabled"
91
+ },
92
+ children: label || (0, _format.tSafe)(t, "payment.checkout.totalDueToday", "Total due today")
93
+ })
94
+ }), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
95
+ sx: {
96
+ display: "flex",
97
+ alignItems: "baseline",
98
+ lineHeight: 1
99
+ },
100
+ children: [prefix && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
101
+ component: "span",
102
+ sx: {
103
+ fontSize: 36,
104
+ fontWeight: 500,
105
+ color: "text.primary",
106
+ opacity: 0.4
107
+ },
108
+ children: prefix
109
+ }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
110
+ component: "span",
111
+ sx: {
112
+ fontSize: {
113
+ xs: 54,
114
+ md: 72
115
+ },
116
+ fontWeight: 800,
117
+ lineHeight: 1,
118
+ letterSpacing: "-0.04em",
119
+ color: "text.primary"
120
+ },
121
+ children: integer
122
+ }), decimal && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
123
+ component: "span",
124
+ sx: {
125
+ fontSize: 36,
126
+ fontWeight: 300,
127
+ color: "text.primary",
128
+ opacity: 0.3
129
+ },
130
+ children: decimal
131
+ }), suffix && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
132
+ component: "span",
133
+ sx: {
134
+ fontSize: 20,
135
+ fontWeight: 700,
136
+ color: "text.disabled",
137
+ ml: 1,
138
+ textTransform: "uppercase"
139
+ },
140
+ children: suffix
141
+ })]
142
+ })]
143
+ }), usdEquivalent && /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
144
+ sx: {
145
+ fontSize: 12,
146
+ color: "text.disabled",
147
+ textAlign: "right",
148
+ mt: 0.5,
149
+ fontWeight: 500
150
+ },
151
+ children: ["\u2248 ", usdEquivalent]
152
+ })]
153
+ });
154
+ }
@@ -0,0 +1,2 @@
1
+ export { default as CheckoutV2 } from './checkout-v2';
2
+ export type { CheckoutV2Props, CheckoutScenario } from './types';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "CheckoutV2", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _checkoutV.default;
10
+ }
11
+ });
12
+ var _checkoutV = _interopRequireDefault(require("./checkout-v2"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -0,0 +1,7 @@
1
+ interface CheckoutLayoutProps {
2
+ left: React.ReactNode;
3
+ right: React.ReactNode;
4
+ mode?: string;
5
+ }
6
+ export default function CheckoutLayout({ left, right, mode }: CheckoutLayoutProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,308 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ module.exports = CheckoutLayout;
7
+ var _jsxRuntime = require("react/jsx-runtime");
8
+ var _material = require("@mui/material");
9
+ var _styles = require("@mui/material/styles");
10
+ var _Header = _interopRequireDefault(require("@blocklet/ui-react/lib/Header"));
11
+ var _mobile = require("../../hooks/mobile");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const hiddenScrollbar = {
14
+ overflowY: "auto",
15
+ "&::-webkit-scrollbar": {
16
+ display: "none"
17
+ },
18
+ scrollbarWidth: "none"
19
+ };
20
+ const mobileFadeIn = {
21
+ "@keyframes mobileFadeIn": {
22
+ from: {
23
+ opacity: 0
24
+ },
25
+ to: {
26
+ opacity: 1
27
+ }
28
+ },
29
+ animation: {
30
+ xs: "mobileFadeIn 0.4s ease both",
31
+ md: "none"
32
+ }
33
+ };
34
+ const fadeIn = {
35
+ "@keyframes fadeIn": {
36
+ from: {
37
+ opacity: 0,
38
+ transform: "translateY(12px)"
39
+ },
40
+ to: {
41
+ opacity: 1,
42
+ transform: "translateY(0)"
43
+ }
44
+ },
45
+ animation: {
46
+ xs: "none",
47
+ md: "fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both"
48
+ }
49
+ };
50
+ const slideInFromRight = {
51
+ "@keyframes slideInRight": {
52
+ from: {
53
+ transform: "translateX(100%)"
54
+ },
55
+ to: {
56
+ transform: "translateX(0)"
57
+ }
58
+ },
59
+ animation: {
60
+ xs: "none",
61
+ md: "slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards"
62
+ }
63
+ };
64
+ function CheckoutLayout({
65
+ left,
66
+ right,
67
+ mode = "inline"
68
+ }) {
69
+ const isFullScreen = mode === "standalone";
70
+ const {
71
+ isMobile
72
+ } = (0, _mobile.useMobile)();
73
+ const theme = (0, _styles.useTheme)();
74
+ const isDark = theme.palette.mode === "dark";
75
+ const hideLeft = left === null;
76
+ const mobileSubmitBarSx = {};
77
+ if (isMobile && !hideLeft) {
78
+ mobileSubmitBarSx["& .cko-v2-submit-btn"] = {
79
+ position: "fixed",
80
+ bottom: 0,
81
+ left: 0,
82
+ right: 0,
83
+ zIndex: 999,
84
+ bgcolor: isDark ? "rgba(30,30,30,0.82)" : "background.paper",
85
+ backdropFilter: isDark ? "blur(12px)" : "none",
86
+ p: 1.5,
87
+ borderTop: "1px solid",
88
+ borderColor: "divider",
89
+ boxShadow: isDark ? "0 -4px 20px rgba(0,0,0,0.4)" : "0 -2px 10px rgba(0,0,0,0.08)"
90
+ };
91
+ }
92
+ if (!isFullScreen) {
93
+ return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
94
+ sx: {
95
+ display: "flex",
96
+ flexDirection: {
97
+ xs: "column",
98
+ md: "row"
99
+ },
100
+ width: "100%",
101
+ minHeight: {
102
+ md: 640
103
+ },
104
+ maxWidth: 1120,
105
+ mx: "auto",
106
+ borderRadius: "16px",
107
+ overflow: "hidden",
108
+ boxShadow: 1,
109
+ border: 1,
110
+ borderColor: "divider",
111
+ borderLeft: "4px solid",
112
+ borderLeftColor: "primary.main",
113
+ // Same bg as left panel so slide-in reveals white over gradient
114
+ bgcolor: t => t.palette.mode === "dark" ? "background.default" : "#f8faff",
115
+ ...mobileFadeIn
116
+ },
117
+ children: [!hideLeft && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
118
+ sx: {
119
+ flex: 1,
120
+ bgcolor: t => t.palette.mode === "dark" ? "background.default" : "#f8faff",
121
+ p: {
122
+ xs: 3,
123
+ md: 5
124
+ },
125
+ pt: {
126
+ xs: 3,
127
+ md: 4
128
+ },
129
+ display: "flex",
130
+ flexDirection: "column",
131
+ ...fadeIn
132
+ },
133
+ children: left
134
+ }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
135
+ sx: {
136
+ width: hideLeft ? "100%" : {
137
+ xs: "100%",
138
+ md: 480
139
+ },
140
+ flexShrink: 0,
141
+ bgcolor: "background.paper",
142
+ p: {
143
+ xs: 3,
144
+ md: 4
145
+ },
146
+ pt: {
147
+ xs: 3,
148
+ md: 4
149
+ },
150
+ display: "flex",
151
+ flexDirection: "column",
152
+ overflow: {
153
+ md: "hidden"
154
+ },
155
+ ...(hideLeft ? {} : slideInFromRight)
156
+ },
157
+ children: right
158
+ })]
159
+ });
160
+ }
161
+ const mobileBg = isDark ? theme.palette.background.default : theme.palette.grey[100];
162
+ const desktopBg = isDark ? theme.palette.background.default : "#f8faff";
163
+ return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
164
+ sx: {
165
+ width: "100%",
166
+ height: {
167
+ xs: "auto",
168
+ md: "100vh"
169
+ },
170
+ minHeight: {
171
+ xs: "100vh"
172
+ },
173
+ overflow: {
174
+ md: "hidden"
175
+ },
176
+ display: "flex",
177
+ flexDirection: {
178
+ xs: "column",
179
+ md: "row"
180
+ },
181
+ position: "relative",
182
+ // Mobile: solid gray bg; Desktop: gradient over light blue
183
+ background: isMobile ? mobileBg : `linear-gradient(160deg, ${(0, _styles.alpha)(theme.palette.primary.main, 0.03)} 0%, ${(0, _styles.alpha)(theme.palette.primary.main, 0.07)} 50%, ${(0, _styles.alpha)(theme.palette.primary.main, 0.04)} 100%)`,
184
+ bgcolor: desktopBg,
185
+ ...mobileFadeIn
186
+ },
187
+ children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_Header.default, {
188
+ sx: {
189
+ position: "absolute",
190
+ top: 20,
191
+ left: 0,
192
+ right: 0,
193
+ zIndex: 10,
194
+ background: "transparent",
195
+ "& .header-container": {
196
+ height: "auto"
197
+ }
198
+ },
199
+ hideNavMenu: true,
200
+ brand: null,
201
+ description: null,
202
+ addons: buildIns => {
203
+ const addons = buildIns.filter(addon => ["locale-selector", "theme-mode-toggle", "session-user"].includes(addon.key));
204
+ return addons;
205
+ }
206
+ }), !hideLeft && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
207
+ sx: {
208
+ width: {
209
+ xs: "100%",
210
+ md: "50%"
211
+ },
212
+ height: {
213
+ xs: "auto",
214
+ md: "100vh"
215
+ },
216
+ display: "flex",
217
+ justifyContent: {
218
+ md: "center"
219
+ },
220
+ ...(isMobile ? {
221
+ bgcolor: "background.paper",
222
+ mt: 9
223
+ } : {}),
224
+ ...hiddenScrollbar
225
+ },
226
+ children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
227
+ sx: {
228
+ width: "100%",
229
+ maxWidth: {
230
+ md: 640
231
+ },
232
+ p: {
233
+ xs: 3,
234
+ md: 5
235
+ },
236
+ pt: {
237
+ xs: 3,
238
+ md: 10
239
+ },
240
+ display: "flex",
241
+ flexDirection: "column",
242
+ flex: 1,
243
+ ...fadeIn
244
+ },
245
+ children: left
246
+ })
247
+ }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
248
+ sx: {
249
+ width: hideLeft ? "100%" : {
250
+ xs: "100%",
251
+ md: "50%"
252
+ },
253
+ height: hideLeft ? "100vh" : {
254
+ xs: "auto",
255
+ md: "100vh"
256
+ },
257
+ bgcolor: "background.paper",
258
+ boxShadow: hideLeft ? "none" : {
259
+ md: "-4px 0 16px rgba(0,0,0,0.04)"
260
+ },
261
+ position: "relative",
262
+ display: "flex",
263
+ flexDirection: "column",
264
+ ...(hideLeft ? {} : slideInFromRight),
265
+ ...(isMobile && !hideLeft ? {
266
+ pb: "180px",
267
+ mt: 2
268
+ } : {}),
269
+ // Mobile: scroll entire panel; Desktop: let PaymentPanel handle internal scroll
270
+ overflowY: {
271
+ xs: "auto",
272
+ md: "hidden"
273
+ },
274
+ "&::-webkit-scrollbar": {
275
+ display: "none"
276
+ },
277
+ scrollbarWidth: "none",
278
+ ...mobileSubmitBarSx
279
+ },
280
+ children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
281
+ sx: {
282
+ width: "100%",
283
+ maxWidth: {
284
+ md: 600
285
+ },
286
+ mx: "auto",
287
+ p: {
288
+ xs: 3,
289
+ md: 4
290
+ },
291
+ pt: hideLeft ? {
292
+ xs: 10,
293
+ md: "10vh"
294
+ } : {
295
+ xs: 3,
296
+ md: "10vh"
297
+ },
298
+ display: "flex",
299
+ flexDirection: "column",
300
+ flex: 1,
301
+ minHeight: 0,
302
+ justifyContent: hideLeft ? "center" : void 0
303
+ },
304
+ children: right
305
+ })
306
+ })]
307
+ });
308
+ }
@@ -0,0 +1 @@
1
+ export default function CompositePanel(): import("react").JSX.Element;