@xsolla/xui-b2b-sidebar 0.198.0 → 0.200.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.js +66 -5
- package/native/index.js.map +1 -1
- package/native/index.mjs +66 -5
- package/native/index.mjs.map +1 -1
- package/package.json +6 -6
package/native/index.mjs
CHANGED
|
@@ -1038,6 +1038,38 @@ import {
|
|
|
1038
1038
|
Image
|
|
1039
1039
|
} from "react-native";
|
|
1040
1040
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1041
|
+
var roleToAccessibilityRole = {
|
|
1042
|
+
button: "button",
|
|
1043
|
+
link: "link",
|
|
1044
|
+
img: "image",
|
|
1045
|
+
image: "image",
|
|
1046
|
+
summary: "summary",
|
|
1047
|
+
switch: "switch",
|
|
1048
|
+
checkbox: "checkbox",
|
|
1049
|
+
radio: "radio",
|
|
1050
|
+
heading: "header",
|
|
1051
|
+
text: "text",
|
|
1052
|
+
search: "search",
|
|
1053
|
+
alert: "alert",
|
|
1054
|
+
none: "none",
|
|
1055
|
+
presentation: "none",
|
|
1056
|
+
progressbar: "progressbar",
|
|
1057
|
+
scrollbar: "scrollbar",
|
|
1058
|
+
adjustable: "adjustable",
|
|
1059
|
+
tab: "tab",
|
|
1060
|
+
menu: "menu",
|
|
1061
|
+
menuitem: "menuitem",
|
|
1062
|
+
list: "list",
|
|
1063
|
+
timer: "timer"
|
|
1064
|
+
};
|
|
1065
|
+
var toGapValue = (gap) => {
|
|
1066
|
+
if (gap === void 0) return void 0;
|
|
1067
|
+
if (typeof gap === "number") return gap;
|
|
1068
|
+
const pxMatch = /^(\d+(?:\.\d+)?)px$/.exec(gap);
|
|
1069
|
+
if (pxMatch) return Number(pxMatch[1]);
|
|
1070
|
+
const asNumber = Number(gap);
|
|
1071
|
+
return Number.isFinite(asNumber) ? asNumber : void 0;
|
|
1072
|
+
};
|
|
1041
1073
|
var Box = ({
|
|
1042
1074
|
children,
|
|
1043
1075
|
onPress,
|
|
@@ -1070,8 +1102,10 @@ var Box = ({
|
|
|
1070
1102
|
marginLeft,
|
|
1071
1103
|
marginRight,
|
|
1072
1104
|
flexDirection,
|
|
1105
|
+
flexWrap,
|
|
1073
1106
|
alignItems,
|
|
1074
1107
|
justifyContent,
|
|
1108
|
+
alignSelf,
|
|
1075
1109
|
position,
|
|
1076
1110
|
top,
|
|
1077
1111
|
bottom,
|
|
@@ -1083,11 +1117,14 @@ var Box = ({
|
|
|
1083
1117
|
maxWidth,
|
|
1084
1118
|
maxHeight,
|
|
1085
1119
|
flex,
|
|
1120
|
+
flexShrink,
|
|
1121
|
+
gap,
|
|
1086
1122
|
overflow,
|
|
1087
1123
|
zIndex,
|
|
1088
1124
|
hoverStyle,
|
|
1089
1125
|
pressStyle,
|
|
1090
1126
|
style,
|
|
1127
|
+
disabled,
|
|
1091
1128
|
"data-testid": dataTestId,
|
|
1092
1129
|
testID,
|
|
1093
1130
|
as,
|
|
@@ -1126,14 +1163,18 @@ var Box = ({
|
|
|
1126
1163
|
marginLeft,
|
|
1127
1164
|
marginRight,
|
|
1128
1165
|
flexDirection,
|
|
1166
|
+
flexWrap,
|
|
1129
1167
|
alignItems,
|
|
1130
1168
|
justifyContent,
|
|
1169
|
+
alignSelf,
|
|
1131
1170
|
position,
|
|
1132
1171
|
top,
|
|
1133
1172
|
bottom,
|
|
1134
1173
|
left,
|
|
1135
1174
|
right,
|
|
1136
1175
|
flex,
|
|
1176
|
+
flexShrink,
|
|
1177
|
+
gap: toGapValue(gap),
|
|
1137
1178
|
...style
|
|
1138
1179
|
});
|
|
1139
1180
|
const finalTestID = dataTestId || testID;
|
|
@@ -1142,15 +1183,25 @@ var Box = ({
|
|
|
1142
1183
|
tabIndex,
|
|
1143
1184
|
onKeyDown,
|
|
1144
1185
|
onKeyUp,
|
|
1145
|
-
"aria-label":
|
|
1186
|
+
"aria-label": ariaLabel,
|
|
1146
1187
|
"aria-labelledby": _ariaLabelledBy,
|
|
1147
1188
|
"aria-current": _ariaCurrent,
|
|
1148
|
-
"aria-disabled":
|
|
1149
|
-
"aria-live":
|
|
1189
|
+
"aria-disabled": ariaDisabled,
|
|
1190
|
+
"aria-live": ariaLive,
|
|
1191
|
+
"aria-busy": ariaBusy,
|
|
1150
1192
|
className,
|
|
1151
1193
|
"data-testid": _dataTestId,
|
|
1194
|
+
cursor: _cursor,
|
|
1195
|
+
type: _type,
|
|
1152
1196
|
...nativeRest
|
|
1153
1197
|
} = rest;
|
|
1198
|
+
const accessibilityRole = typeof role === "string" && roleToAccessibilityRole[role] || (as === "button" ? "button" : void 0);
|
|
1199
|
+
const isDisabled = Boolean(disabled || ariaDisabled);
|
|
1200
|
+
const accessibilityState = {
|
|
1201
|
+
disabled: isDisabled || void 0,
|
|
1202
|
+
busy: Boolean(ariaBusy) || void 0
|
|
1203
|
+
};
|
|
1204
|
+
const accessibilityLiveRegion = ariaLive === "polite" || ariaLive === "assertive" ? ariaLive : void 0;
|
|
1154
1205
|
if (as === "img" && src) {
|
|
1155
1206
|
const imageStyle = {
|
|
1156
1207
|
width,
|
|
@@ -1169,16 +1220,18 @@ var Box = ({
|
|
|
1169
1220
|
source: { uri: src },
|
|
1170
1221
|
style: imageStyle,
|
|
1171
1222
|
testID: finalTestID,
|
|
1223
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : alt,
|
|
1172
1224
|
resizeMode: "cover",
|
|
1173
1225
|
...nativeRest
|
|
1174
1226
|
}
|
|
1175
1227
|
);
|
|
1176
1228
|
}
|
|
1177
|
-
if (onPress) {
|
|
1229
|
+
if (onPress || as === "button") {
|
|
1178
1230
|
return /* @__PURE__ */ jsx6(
|
|
1179
1231
|
Pressable,
|
|
1180
1232
|
{
|
|
1181
|
-
onPress,
|
|
1233
|
+
onPress: !isDisabled && onPress ? onPress : void 0,
|
|
1234
|
+
disabled: isDisabled,
|
|
1182
1235
|
onLayout,
|
|
1183
1236
|
onMoveShouldSetResponder,
|
|
1184
1237
|
onResponderGrant,
|
|
@@ -1187,6 +1240,10 @@ var Box = ({
|
|
|
1187
1240
|
onResponderTerminate,
|
|
1188
1241
|
style: ({ pressed }) => getContainerStyle(pressed),
|
|
1189
1242
|
testID: finalTestID,
|
|
1243
|
+
accessibilityRole,
|
|
1244
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : void 0,
|
|
1245
|
+
accessibilityState,
|
|
1246
|
+
accessibilityLiveRegion,
|
|
1190
1247
|
...nativeRest,
|
|
1191
1248
|
children
|
|
1192
1249
|
}
|
|
@@ -1203,6 +1260,10 @@ var Box = ({
|
|
|
1203
1260
|
onResponderMove,
|
|
1204
1261
|
onResponderRelease,
|
|
1205
1262
|
onResponderTerminate,
|
|
1263
|
+
accessibilityRole,
|
|
1264
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : void 0,
|
|
1265
|
+
accessibilityState,
|
|
1266
|
+
accessibilityLiveRegion,
|
|
1206
1267
|
...nativeRest,
|
|
1207
1268
|
children
|
|
1208
1269
|
}
|