@xsolla/xui-game-card 0.118.0 → 0.119.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/native/index.d.mts +2 -0
- package/native/index.d.ts +2 -0
- package/native/index.js +16 -8
- package/native/index.js.flow +5 -0
- package/native/index.js.map +1 -1
- package/native/index.mjs +16 -8
- package/native/index.mjs.map +1 -1
- package/package.json +3 -3
- package/web/index.d.mts +2 -0
- package/web/index.d.ts +2 -0
- package/web/index.js +16 -8
- package/web/index.js.flow +5 -0
- package/web/index.js.map +1 -1
- package/web/index.mjs +16 -8
- package/web/index.mjs.map +1 -1
package/native/index.d.mts
CHANGED
|
@@ -23,6 +23,8 @@ interface GameCardProps {
|
|
|
23
23
|
buttonText?: string;
|
|
24
24
|
/** Button click handler (used if trailing is not provided) */
|
|
25
25
|
onButtonClick?: () => void;
|
|
26
|
+
/** Whether the button is disabled (used if trailing is not provided) */
|
|
27
|
+
buttonDisabled?: boolean;
|
|
26
28
|
/** Card click handler */
|
|
27
29
|
onPress?: () => void;
|
|
28
30
|
/** Alt text for game image */
|
package/native/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ interface GameCardProps {
|
|
|
23
23
|
buttonText?: string;
|
|
24
24
|
/** Button click handler (used if trailing is not provided) */
|
|
25
25
|
onButtonClick?: () => void;
|
|
26
|
+
/** Whether the button is disabled (used if trailing is not provided) */
|
|
27
|
+
buttonDisabled?: boolean;
|
|
26
28
|
/** Card click handler */
|
|
27
29
|
onPress?: () => void;
|
|
28
30
|
/** Alt text for game image */
|
package/native/index.js
CHANGED
|
@@ -5427,12 +5427,14 @@ var getSizeConfig = (size) => {
|
|
|
5427
5427
|
subtitleFontSize: 12,
|
|
5428
5428
|
subtitleLineHeight: 18,
|
|
5429
5429
|
padding: 8,
|
|
5430
|
+
footerPadding: 12,
|
|
5431
|
+
footerGap: 12,
|
|
5430
5432
|
tagGap: 4,
|
|
5431
5433
|
buttonHeight: 32,
|
|
5432
5434
|
buttonPaddingX: 20,
|
|
5433
5435
|
buttonFontSize: 12,
|
|
5434
5436
|
buttonLineHeight: 14,
|
|
5435
|
-
borderRadius:
|
|
5437
|
+
borderRadius: 8,
|
|
5436
5438
|
fadeHeight: 64,
|
|
5437
5439
|
lootBadgeFontSize: 12,
|
|
5438
5440
|
lootBadgeLineHeight: 16,
|
|
@@ -5447,12 +5449,14 @@ var getSizeConfig = (size) => {
|
|
|
5447
5449
|
subtitleFontSize: 11,
|
|
5448
5450
|
subtitleLineHeight: 16,
|
|
5449
5451
|
padding: 6,
|
|
5452
|
+
footerPadding: 8,
|
|
5453
|
+
footerGap: 8,
|
|
5450
5454
|
tagGap: 3,
|
|
5451
5455
|
buttonHeight: 28,
|
|
5452
5456
|
buttonPaddingX: 16,
|
|
5453
5457
|
buttonFontSize: 11,
|
|
5454
5458
|
buttonLineHeight: 13,
|
|
5455
|
-
borderRadius:
|
|
5459
|
+
borderRadius: 8,
|
|
5456
5460
|
fadeHeight: 48,
|
|
5457
5461
|
lootBadgeFontSize: 11,
|
|
5458
5462
|
lootBadgeLineHeight: 14,
|
|
@@ -5467,12 +5471,14 @@ var getSizeConfig = (size) => {
|
|
|
5467
5471
|
subtitleFontSize: 10,
|
|
5468
5472
|
subtitleLineHeight: 14,
|
|
5469
5473
|
padding: 4,
|
|
5474
|
+
footerPadding: 6,
|
|
5475
|
+
footerGap: 6,
|
|
5470
5476
|
tagGap: 2,
|
|
5471
5477
|
buttonHeight: 24,
|
|
5472
5478
|
buttonPaddingX: 12,
|
|
5473
5479
|
buttonFontSize: 10,
|
|
5474
5480
|
buttonLineHeight: 12,
|
|
5475
|
-
borderRadius:
|
|
5481
|
+
borderRadius: 8,
|
|
5476
5482
|
fadeHeight: 32,
|
|
5477
5483
|
lootBadgeFontSize: 10,
|
|
5478
5484
|
lootBadgeLineHeight: 12,
|
|
@@ -5511,6 +5517,7 @@ var GameCard = ({
|
|
|
5511
5517
|
trailing,
|
|
5512
5518
|
buttonText,
|
|
5513
5519
|
onButtonClick,
|
|
5520
|
+
buttonDisabled,
|
|
5514
5521
|
onPress,
|
|
5515
5522
|
imageAlt,
|
|
5516
5523
|
className
|
|
@@ -5645,11 +5652,11 @@ var GameCard = ({
|
|
|
5645
5652
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
5646
5653
|
Box,
|
|
5647
5654
|
{
|
|
5648
|
-
backgroundColor: theme.colors.
|
|
5649
|
-
padding: config.
|
|
5655
|
+
backgroundColor: theme.colors.overlay.mono,
|
|
5656
|
+
padding: config.footerPadding,
|
|
5650
5657
|
flexDirection: "row",
|
|
5651
5658
|
alignItems: "center",
|
|
5652
|
-
gap:
|
|
5659
|
+
gap: config.footerGap,
|
|
5653
5660
|
children: [
|
|
5654
5661
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box, { flex: 1, flexDirection: "column", style: { minWidth: 0 }, children: [
|
|
5655
5662
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -5689,18 +5696,19 @@ var GameCard = ({
|
|
|
5689
5696
|
!trailing && buttonText && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
5690
5697
|
Box,
|
|
5691
5698
|
{
|
|
5692
|
-
onPress: onButtonClick,
|
|
5699
|
+
onPress: buttonDisabled ? void 0 : onButtonClick,
|
|
5693
5700
|
backgroundColor: theme.colors.control.mono.secondary.bg,
|
|
5694
5701
|
borderRadius: config.borderRadius,
|
|
5695
5702
|
height: config.buttonHeight,
|
|
5696
5703
|
paddingHorizontal: config.buttonPaddingX,
|
|
5697
5704
|
alignItems: "center",
|
|
5698
5705
|
justifyContent: "center",
|
|
5706
|
+
opacity: buttonDisabled ? 0.4 : 1,
|
|
5699
5707
|
style: import_xui_core.isWeb ? {
|
|
5700
5708
|
backdropFilter: "blur(30px)",
|
|
5701
5709
|
WebkitBackdropFilter: "blur(30px)",
|
|
5702
5710
|
border: `1px solid ${theme.colors.control.mono.secondary.border}`,
|
|
5703
|
-
cursor: onButtonClick ? "pointer" : "default"
|
|
5711
|
+
cursor: buttonDisabled ? "not-allowed" : onButtonClick ? "pointer" : "default"
|
|
5704
5712
|
} : void 0,
|
|
5705
5713
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
5706
5714
|
Text,
|
package/native/index.js.flow
CHANGED