@blocklet/payment-react 1.18.56 → 1.19.0
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/es/checkout/donate.d.ts +1 -15
- package/es/checkout/donate.js +301 -189
- package/es/checkout/form.d.ts +1 -15
- package/es/checkout/form.js +5 -13
- package/es/checkout/table.js +3 -3
- package/es/components/blockchain/gas.d.ts +1 -5
- package/es/components/blockchain/gas.js +10 -2
- package/es/components/blockchain/tx.d.ts +1 -8
- package/es/components/blockchain/tx.js +28 -7
- package/es/components/confirm.d.ts +1 -10
- package/es/components/confirm.js +4 -10
- package/es/components/country-select.d.ts +3 -2
- package/es/components/country-select.js +375 -352
- package/es/components/input.d.ts +11 -20
- package/es/components/input.js +46 -43
- package/es/components/lazy-loader.js +1 -2
- package/es/components/link.d.ts +2 -9
- package/es/components/link.js +9 -6
- package/es/components/livemode.d.ts +2 -8
- package/es/components/livemode.js +1 -5
- package/es/components/loading-button.d.ts +6 -1
- package/es/components/loading-button.js +56 -66
- package/es/components/over-due-invoice-payment.d.ts +0 -18
- package/es/components/over-due-invoice-payment.js +138 -95
- package/es/components/payment-beneficiaries.d.ts +2 -7
- package/es/components/payment-beneficiaries.js +86 -40
- package/es/components/pricing-item.d.ts +0 -5
- package/es/components/pricing-item.js +1 -4
- package/es/components/pricing-table.d.ts +2 -10
- package/es/components/pricing-table.js +8 -7
- package/es/components/resume-subscription.d.ts +0 -10
- package/es/components/resume-subscription.js +42 -21
- package/es/components/truncated-text.d.ts +2 -9
- package/es/components/truncated-text.js +0 -5
- package/es/contexts/donate.d.ts +0 -7
- package/es/contexts/donate.js +10 -8
- package/es/contexts/payment.d.ts +1 -4
- package/es/contexts/payment.js +7 -2
- package/es/history/invoice/list.d.ts +2 -18
- package/es/history/invoice/list.js +151 -73
- package/es/history/payment/list.js +115 -38
- package/es/hooks/keyboard.d.ts +1 -1
- package/es/hooks/keyboard.js +2 -4
- package/es/libs/cached-request.js +2 -4
- package/es/libs/phone-validator.js +1 -2
- package/es/libs/util.js +2 -4
- package/es/libs/validator.js +2 -4
- package/es/payment/amount.d.ts +2 -7
- package/es/payment/amount.js +1 -5
- package/es/payment/donation-form.d.ts +2 -10
- package/es/payment/donation-form.js +196 -160
- package/es/payment/error.d.ts +2 -8
- package/es/payment/error.js +40 -20
- package/es/payment/footer.d.ts +2 -3
- package/es/payment/footer.js +19 -6
- package/es/payment/form/addon.js +14 -4
- package/es/payment/form/address.d.ts +2 -9
- package/es/payment/form/address.js +3 -6
- package/es/payment/form/currency.js +45 -25
- package/es/payment/form/index.d.ts +2 -8
- package/es/payment/form/index.js +107 -65
- package/es/payment/form/phone.js +2 -4
- package/es/payment/form/stripe/form.d.ts +2 -8
- package/es/payment/form/stripe/form.js +1 -3
- package/es/payment/header.js +38 -16
- package/es/payment/index.d.ts +2 -9
- package/es/payment/index.js +5 -14
- package/es/payment/product-card.d.ts +2 -11
- package/es/payment/product-card.js +84 -50
- package/es/payment/product-donation.js +175 -114
- package/es/payment/product-item.d.ts +2 -9
- package/es/payment/product-item.js +185 -142
- package/es/payment/product-skeleton.js +2 -2
- package/es/payment/skeleton/donation.js +27 -7
- package/es/payment/skeleton/overview.js +22 -2
- package/es/payment/skeleton/payment.js +33 -5
- package/es/payment/success.d.ts +2 -9
- package/es/payment/success.js +41 -14
- package/es/payment/summary.d.ts +2 -17
- package/es/payment/summary.js +184 -111
- package/es/theme/index.d.ts +0 -5
- package/es/theme/index.js +2 -5
- package/es/theme/typography.d.ts +2 -2
- package/lib/checkout/donate.d.ts +1 -15
- package/lib/checkout/donate.js +75 -54
- package/lib/checkout/form.d.ts +1 -15
- package/lib/checkout/form.js +7 -15
- package/lib/checkout/table.js +4 -4
- package/lib/components/blockchain/gas.d.ts +1 -5
- package/lib/components/blockchain/gas.js +3 -2
- package/lib/components/blockchain/tx.d.ts +1 -8
- package/lib/components/blockchain/tx.js +11 -7
- package/lib/components/confirm.d.ts +1 -10
- package/lib/components/confirm.js +5 -11
- package/lib/components/country-select.d.ts +3 -2
- package/lib/components/country-select.js +23 -22
- package/lib/components/input.d.ts +11 -20
- package/lib/components/input.js +20 -23
- package/lib/components/lazy-loader.js +1 -1
- package/lib/components/link.d.ts +2 -9
- package/lib/components/link.js +3 -8
- package/lib/components/livemode.d.ts +2 -8
- package/lib/components/livemode.js +3 -7
- package/lib/components/loading-button.d.ts +6 -1
- package/lib/components/loading-button.js +9 -17
- package/lib/components/over-due-invoice-payment.d.ts +0 -18
- package/lib/components/over-due-invoice-payment.js +31 -33
- package/lib/components/payment-beneficiaries.d.ts +2 -7
- package/lib/components/payment-beneficiaries.js +12 -11
- package/lib/components/pricing-item.d.ts +0 -5
- package/lib/components/pricing-item.js +2 -5
- package/lib/components/pricing-table.d.ts +2 -10
- package/lib/components/pricing-table.js +5 -11
- package/lib/components/resume-subscription.d.ts +0 -10
- package/lib/components/resume-subscription.js +16 -16
- package/lib/components/table.js +1 -1
- package/lib/components/truncated-text.d.ts +2 -9
- package/lib/components/truncated-text.js +1 -6
- package/lib/contexts/donate.d.ts +0 -7
- package/lib/contexts/donate.js +4 -7
- package/lib/contexts/payment.d.ts +1 -4
- package/lib/contexts/payment.js +4 -7
- package/lib/history/invoice/list.d.ts +2 -18
- package/lib/history/invoice/list.js +49 -37
- package/lib/history/payment/list.js +30 -16
- package/lib/hooks/keyboard.d.ts +1 -1
- package/lib/hooks/mobile.js +1 -1
- package/lib/hooks/subscription.js +1 -1
- package/lib/index.js +2 -2
- package/lib/libs/api.js +1 -1
- package/lib/libs/dayjs.js +1 -1
- package/lib/libs/phone-validator.js +0 -2
- package/lib/libs/theme.js +1 -1
- package/lib/libs/util.js +1 -1
- package/lib/libs/validator.js +1 -1
- package/lib/locales/en.js +1 -1
- package/lib/locales/index.js +1 -1
- package/lib/locales/zh.js +1 -1
- package/lib/payment/amount.d.ts +2 -7
- package/lib/payment/amount.js +2 -6
- package/lib/payment/donation-form.d.ts +2 -10
- package/lib/payment/donation-form.js +33 -38
- package/lib/payment/error.d.ts +2 -8
- package/lib/payment/error.js +11 -13
- package/lib/payment/footer.d.ts +2 -3
- package/lib/payment/footer.js +5 -5
- package/lib/payment/form/addon.js +5 -3
- package/lib/payment/form/address.d.ts +2 -9
- package/lib/payment/form/address.js +5 -8
- package/lib/payment/form/currency.js +3 -3
- package/lib/payment/form/index.d.ts +2 -8
- package/lib/payment/form/index.js +19 -15
- package/lib/payment/form/phone.js +1 -1
- package/lib/payment/form/stripe/form.d.ts +2 -8
- package/lib/payment/form/stripe/form.js +3 -6
- package/lib/payment/header.js +8 -4
- package/lib/payment/index.d.ts +2 -9
- package/lib/payment/index.js +7 -16
- package/lib/payment/product-card.d.ts +2 -11
- package/lib/payment/product-card.js +13 -20
- package/lib/payment/product-donation.js +71 -66
- package/lib/payment/product-item.d.ts +2 -9
- package/lib/payment/product-item.js +24 -25
- package/lib/payment/product-skeleton.js +2 -2
- package/lib/payment/skeleton/donation.js +8 -4
- package/lib/payment/skeleton/overview.js +6 -2
- package/lib/payment/skeleton/payment.js +9 -3
- package/lib/payment/success.d.ts +2 -9
- package/lib/payment/success.js +12 -15
- package/lib/payment/summary.d.ts +2 -17
- package/lib/payment/summary.js +44 -45
- package/lib/theme/index.d.ts +0 -5
- package/lib/theme/index.js +2 -5
- package/lib/theme/typography.d.ts +2 -2
- package/package.json +40 -40
- package/src/checkout/donate.tsx +103 -35
- package/src/checkout/form.tsx +5 -14
- package/src/checkout/table.tsx +3 -3
- package/src/components/blockchain/gas.tsx +5 -3
- package/src/components/blockchain/tx.tsx +22 -8
- package/src/components/confirm.tsx +4 -11
- package/src/components/country-select.tsx +391 -378
- package/src/components/input.tsx +49 -45
- package/src/components/link.tsx +9 -7
- package/src/components/livemode.tsx +2 -6
- package/src/components/loading-button.tsx +63 -76
- package/src/components/over-due-invoice-payment.tsx +43 -28
- package/src/components/payment-beneficiaries.tsx +33 -14
- package/src/components/pricing-item.tsx +1 -4
- package/src/components/pricing-table.tsx +8 -8
- package/src/components/resume-subscription.tsx +20 -14
- package/src/components/table.tsx +2 -2
- package/src/components/truncated-text.tsx +0 -6
- package/src/contexts/donate.tsx +6 -7
- package/src/contexts/payment.tsx +7 -3
- package/src/history/invoice/list.tsx +74 -35
- package/src/history/payment/list.tsx +53 -16
- package/src/hooks/keyboard.ts +1 -1
- package/src/payment/amount.tsx +1 -6
- package/src/payment/donation-form.tsx +47 -29
- package/src/payment/error.tsx +16 -8
- package/src/payment/footer.tsx +11 -3
- package/src/payment/form/addon.tsx +6 -1
- package/src/payment/form/address.tsx +3 -7
- package/src/payment/form/currency.tsx +12 -2
- package/src/payment/form/index.tsx +30 -12
- package/src/payment/form/stripe/form.tsx +1 -5
- package/src/payment/header.tsx +14 -2
- package/src/payment/index.tsx +10 -21
- package/src/payment/product-card.tsx +41 -18
- package/src/payment/product-donation.tsx +85 -47
- package/src/payment/product-item.tsx +46 -24
- package/src/payment/product-skeleton.tsx +3 -2
- package/src/payment/skeleton/donation.tsx +12 -2
- package/src/payment/skeleton/overview.tsx +12 -2
- package/src/payment/skeleton/payment.tsx +16 -3
- package/src/payment/success.tsx +26 -15
- package/src/payment/summary.tsx +74 -42
- package/src/theme/index.tsx +5 -8
- package/src/theme/typography.ts +2 -2
|
@@ -91,14 +91,12 @@ export default function ProductDonation({
|
|
|
91
91
|
maxPreset = Math.min(maxPreset, systemMax);
|
|
92
92
|
const detectPrecision = () => {
|
|
93
93
|
let maxPrecision = 2;
|
|
94
|
-
if (!hasPresets)
|
|
95
|
-
return 0;
|
|
94
|
+
if (!hasPresets) return 0;
|
|
96
95
|
const allIntegers = presets.every((preset) => {
|
|
97
96
|
const num = parseFloat(preset);
|
|
98
97
|
return num === Math.floor(num);
|
|
99
98
|
});
|
|
100
|
-
if (allIntegers)
|
|
101
|
-
return 0;
|
|
99
|
+
if (allIntegers) return 0;
|
|
102
100
|
presets.forEach((preset) => {
|
|
103
101
|
const decimalPart = preset.toString().split(".")[1];
|
|
104
102
|
if (decimalPart) {
|
|
@@ -213,101 +211,152 @@ export default function ProductDonation({
|
|
|
213
211
|
Box,
|
|
214
212
|
{
|
|
215
213
|
ref: containerRef,
|
|
216
|
-
display: "flex",
|
|
217
|
-
flexDirection: "column",
|
|
218
|
-
alignItems: "flex-start",
|
|
219
|
-
gap: 1.5,
|
|
220
214
|
onKeyDown: handleKeyDown,
|
|
221
215
|
tabIndex: 0,
|
|
222
|
-
sx: {
|
|
216
|
+
sx: {
|
|
217
|
+
display: "flex",
|
|
218
|
+
flexDirection: "column",
|
|
219
|
+
alignItems: "flex-start",
|
|
220
|
+
gap: 1.5,
|
|
221
|
+
outline: "none"
|
|
222
|
+
},
|
|
223
223
|
children: [
|
|
224
224
|
supportPreset && /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
225
|
-
presets.map((amount) => /* @__PURE__ */ jsx(
|
|
226
|
-
|
|
225
|
+
presets.map((amount) => /* @__PURE__ */ jsx(
|
|
226
|
+
Grid,
|
|
227
227
|
{
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
minWidth: 115,
|
|
232
|
-
textAlign: "center",
|
|
233
|
-
transition: "all 0.3s",
|
|
234
|
-
cursor: "pointer",
|
|
235
|
-
"&:hover": {
|
|
236
|
-
transform: "translateY(-4px)",
|
|
237
|
-
boxShadow: 3
|
|
238
|
-
},
|
|
239
|
-
".MuiCardActionArea-focusHighlight": {
|
|
240
|
-
backgroundColor: "transparent"
|
|
241
|
-
},
|
|
242
|
-
height: "42px",
|
|
243
|
-
...formatAmount(state.selected) === formatAmount(amount) && !state.custom ? { borderColor: "primary.main", borderWidth: 1 } : {}
|
|
228
|
+
size: {
|
|
229
|
+
xs: 6,
|
|
230
|
+
sm: 3
|
|
244
231
|
},
|
|
245
232
|
children: /* @__PURE__ */ jsx(
|
|
246
|
-
|
|
233
|
+
Card,
|
|
247
234
|
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
235
|
+
variant: "outlined",
|
|
236
|
+
className: "tab-navigable-card",
|
|
237
|
+
sx: {
|
|
238
|
+
minWidth: 115,
|
|
239
|
+
textAlign: "center",
|
|
240
|
+
transition: "all 0.3s",
|
|
241
|
+
cursor: "pointer",
|
|
242
|
+
"&:hover": {
|
|
243
|
+
transform: "translateY(-4px)",
|
|
244
|
+
boxShadow: 3
|
|
245
|
+
},
|
|
246
|
+
".MuiCardActionArea-focusHighlight": {
|
|
247
|
+
backgroundColor: "transparent"
|
|
248
|
+
},
|
|
249
|
+
height: "42px",
|
|
250
|
+
...formatAmount(state.selected) === formatAmount(amount) && !state.custom ? { borderColor: "primary.main", borderWidth: 1 } : {}
|
|
251
|
+
},
|
|
252
|
+
children: /* @__PURE__ */ jsx(
|
|
253
|
+
CardActionArea,
|
|
253
254
|
{
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
255
|
+
onClick: () => handleSelect(amount),
|
|
256
|
+
tabIndex: 0,
|
|
257
|
+
"aria-selected": formatAmount(state.selected) === formatAmount(amount) && !state.custom,
|
|
258
|
+
children: /* @__PURE__ */ jsxs(
|
|
259
|
+
Stack,
|
|
260
|
+
{
|
|
261
|
+
direction: "row",
|
|
262
|
+
spacing: 0.5,
|
|
263
|
+
sx: {
|
|
264
|
+
alignItems: "center",
|
|
265
|
+
justifyContent: "center",
|
|
266
|
+
py: 1.5,
|
|
267
|
+
px: 1.5
|
|
268
|
+
},
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ jsx(Avatar, { src: currency?.logo, sx: { width: 16, height: 16, mr: 0.5 }, alt: currency?.symbol }),
|
|
271
|
+
/* @__PURE__ */ jsx(
|
|
272
|
+
Typography,
|
|
273
|
+
{
|
|
274
|
+
component: "strong",
|
|
275
|
+
variant: "h3",
|
|
276
|
+
sx: {
|
|
277
|
+
lineHeight: 1,
|
|
278
|
+
fontVariantNumeric: "tabular-nums",
|
|
279
|
+
fontWeight: 400
|
|
280
|
+
},
|
|
281
|
+
children: amount
|
|
282
|
+
}
|
|
283
|
+
),
|
|
284
|
+
/* @__PURE__ */ jsx(
|
|
285
|
+
Typography,
|
|
286
|
+
{
|
|
287
|
+
sx: {
|
|
288
|
+
lineHeight: 1,
|
|
289
|
+
fontSize: 14,
|
|
290
|
+
color: "text.secondary"
|
|
291
|
+
},
|
|
292
|
+
children: currency?.symbol
|
|
293
|
+
}
|
|
294
|
+
)
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
)
|
|
273
298
|
}
|
|
274
299
|
)
|
|
275
300
|
}
|
|
276
301
|
)
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
302
|
+
},
|
|
303
|
+
amount
|
|
304
|
+
)),
|
|
305
|
+
supportCustom && /* @__PURE__ */ jsx(
|
|
306
|
+
Grid,
|
|
281
307
|
{
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
textAlign: "center",
|
|
286
|
-
transition: "all 0.3s",
|
|
287
|
-
cursor: "pointer",
|
|
288
|
-
"&:hover": {
|
|
289
|
-
transform: "translateY(-4px)",
|
|
290
|
-
boxShadow: 3
|
|
291
|
-
},
|
|
292
|
-
".MuiCardActionArea-focusHighlight": {
|
|
293
|
-
backgroundColor: "transparent"
|
|
294
|
-
},
|
|
295
|
-
height: "42px",
|
|
296
|
-
...state.custom ? { borderColor: "primary.main", borderWidth: 1 } : {}
|
|
308
|
+
size: {
|
|
309
|
+
xs: 6,
|
|
310
|
+
sm: 3
|
|
297
311
|
},
|
|
298
|
-
children: /* @__PURE__ */ jsx(
|
|
299
|
-
|
|
312
|
+
children: /* @__PURE__ */ jsx(
|
|
313
|
+
Card,
|
|
300
314
|
{
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
315
|
+
variant: "outlined",
|
|
316
|
+
className: "tab-navigable-card",
|
|
317
|
+
sx: {
|
|
318
|
+
textAlign: "center",
|
|
319
|
+
transition: "all 0.3s",
|
|
320
|
+
cursor: "pointer",
|
|
321
|
+
"&:hover": {
|
|
322
|
+
transform: "translateY(-4px)",
|
|
323
|
+
boxShadow: 3
|
|
324
|
+
},
|
|
325
|
+
".MuiCardActionArea-focusHighlight": {
|
|
326
|
+
backgroundColor: "transparent"
|
|
327
|
+
},
|
|
328
|
+
height: "42px",
|
|
329
|
+
...state.custom ? { borderColor: "primary.main", borderWidth: 1 } : {}
|
|
330
|
+
},
|
|
331
|
+
children: /* @__PURE__ */ jsx(CardActionArea, { onClick: handleCustomSelect, tabIndex: 0, "aria-selected": state.custom, children: /* @__PURE__ */ jsx(
|
|
332
|
+
Stack,
|
|
333
|
+
{
|
|
334
|
+
direction: "row",
|
|
335
|
+
spacing: 0.5,
|
|
336
|
+
sx: {
|
|
337
|
+
alignItems: "center",
|
|
338
|
+
justifyContent: "center",
|
|
339
|
+
py: 1.5,
|
|
340
|
+
px: 1.5
|
|
341
|
+
},
|
|
342
|
+
children: /* @__PURE__ */ jsx(
|
|
343
|
+
Typography,
|
|
344
|
+
{
|
|
345
|
+
variant: "h3",
|
|
346
|
+
sx: {
|
|
347
|
+
lineHeight: 1,
|
|
348
|
+
fontWeight: 400
|
|
349
|
+
},
|
|
350
|
+
children: t("common.custom")
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
}
|
|
354
|
+
) })
|
|
307
355
|
}
|
|
308
|
-
)
|
|
309
|
-
}
|
|
310
|
-
|
|
356
|
+
)
|
|
357
|
+
},
|
|
358
|
+
"custom"
|
|
359
|
+
)
|
|
311
360
|
] }),
|
|
312
361
|
state.custom && /* @__PURE__ */ jsx(
|
|
313
362
|
TextField,
|
|
@@ -320,37 +369,6 @@ export default function ProductDonation({
|
|
|
320
369
|
error: !!state.error,
|
|
321
370
|
helperText: state.error,
|
|
322
371
|
inputRef: customInputRef,
|
|
323
|
-
InputProps: {
|
|
324
|
-
endAdornment: /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", sx: { ml: 1 }, children: [
|
|
325
|
-
/* @__PURE__ */ jsx(
|
|
326
|
-
IconButton,
|
|
327
|
-
{
|
|
328
|
-
size: "small",
|
|
329
|
-
onClick: handleCustomSelect,
|
|
330
|
-
disabled: state.animating,
|
|
331
|
-
sx: {
|
|
332
|
-
mr: 0.5,
|
|
333
|
-
opacity: state.animating ? 0.5 : 1,
|
|
334
|
-
transition: "all 0.2s ease",
|
|
335
|
-
"&:hover": {
|
|
336
|
-
transform: "scale(1.2)",
|
|
337
|
-
transition: "transform 0.3s ease"
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
"aria-label": t("common.random"),
|
|
341
|
-
children: /* @__PURE__ */ jsx(AutoAwesomeIcon, { fontSize: "small" })
|
|
342
|
-
}
|
|
343
|
-
),
|
|
344
|
-
/* @__PURE__ */ jsx(Avatar, { src: currency?.logo, sx: { width: 16, height: 16 }, alt: currency?.symbol }),
|
|
345
|
-
/* @__PURE__ */ jsx(Typography, { children: currency?.symbol })
|
|
346
|
-
] }),
|
|
347
|
-
autoComplete: "off",
|
|
348
|
-
sx: {
|
|
349
|
-
"& input": {
|
|
350
|
-
transition: "all 0.25s ease"
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
372
|
sx: {
|
|
355
373
|
mt: defaultPreset !== "0" ? 0 : 1,
|
|
356
374
|
"& .MuiInputBase-root": {
|
|
@@ -366,8 +384,51 @@ export default function ProductDonation({
|
|
|
366
384
|
"& input[type=number]::-webkit-inner-spin-button": {
|
|
367
385
|
WebkitAppearance: "none",
|
|
368
386
|
margin: 0
|
|
387
|
+
},
|
|
388
|
+
"& input": {
|
|
389
|
+
transition: "all 0.25s ease"
|
|
369
390
|
}
|
|
370
|
-
}
|
|
391
|
+
},
|
|
392
|
+
slotProps: {
|
|
393
|
+
input: {
|
|
394
|
+
endAdornment: /* @__PURE__ */ jsxs(
|
|
395
|
+
Stack,
|
|
396
|
+
{
|
|
397
|
+
direction: "row",
|
|
398
|
+
spacing: 0.5,
|
|
399
|
+
sx: {
|
|
400
|
+
alignItems: "center",
|
|
401
|
+
ml: 1
|
|
402
|
+
},
|
|
403
|
+
children: [
|
|
404
|
+
/* @__PURE__ */ jsx(
|
|
405
|
+
IconButton,
|
|
406
|
+
{
|
|
407
|
+
size: "small",
|
|
408
|
+
onClick: handleCustomSelect,
|
|
409
|
+
disabled: state.animating,
|
|
410
|
+
sx: {
|
|
411
|
+
mr: 0.5,
|
|
412
|
+
opacity: state.animating ? 0.5 : 1,
|
|
413
|
+
transition: "all 0.2s ease",
|
|
414
|
+
"&:hover": {
|
|
415
|
+
transform: "scale(1.2)",
|
|
416
|
+
transition: "transform 0.3s ease"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"aria-label": t("common.random"),
|
|
420
|
+
children: /* @__PURE__ */ jsx(AutoAwesomeIcon, { fontSize: "small" })
|
|
421
|
+
}
|
|
422
|
+
),
|
|
423
|
+
/* @__PURE__ */ jsx(Avatar, { src: currency?.logo, sx: { width: 16, height: 16 }, alt: currency?.symbol }),
|
|
424
|
+
/* @__PURE__ */ jsx(Typography, { children: currency?.symbol })
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
autoComplete: "off"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
autoComplete: "off"
|
|
371
432
|
}
|
|
372
433
|
)
|
|
373
434
|
]
|
|
@@ -11,12 +11,5 @@ type Props = {
|
|
|
11
11
|
mode?: 'normal' | 'cross-sell';
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var defaultProps: {
|
|
17
|
-
mode: string;
|
|
18
|
-
children: null;
|
|
19
|
-
trialEnd: number;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export default ProductItem;
|
|
14
|
+
export default function ProductItem({ item, items, trialInDays, trialEnd, currency, mode, children, onUpsell, onDownsell, }: Props): JSX.Element;
|
|
15
|
+
export {};
|