@xsolla/xui-supporting-text-native 0.64.0-pr56.1768348754

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/index.d.mts ADDED
@@ -0,0 +1,17 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ type SupportingTextSize = "xl" | "l" | "m" | "s" | "xs";
4
+ type SupportingTextVariant = "label" | "helper" | "description" | "error";
5
+ interface SupportingTextProps {
6
+ children?: ReactNode;
7
+ size?: SupportingTextSize;
8
+ variant?: SupportingTextVariant;
9
+ required?: boolean;
10
+ icon?: ReactNode;
11
+ showIcon?: boolean;
12
+ style?: any;
13
+ }
14
+
15
+ declare const SupportingText: React.ForwardRefExoticComponent<SupportingTextProps & React.RefAttributes<any>>;
16
+
17
+ export { SupportingText, type SupportingTextProps, type SupportingTextSize, type SupportingTextVariant };
package/index.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ type SupportingTextSize = "xl" | "l" | "m" | "s" | "xs";
4
+ type SupportingTextVariant = "label" | "helper" | "description" | "error";
5
+ interface SupportingTextProps {
6
+ children?: ReactNode;
7
+ size?: SupportingTextSize;
8
+ variant?: SupportingTextVariant;
9
+ required?: boolean;
10
+ icon?: ReactNode;
11
+ showIcon?: boolean;
12
+ style?: any;
13
+ }
14
+
15
+ declare const SupportingText: React.ForwardRefExoticComponent<SupportingTextProps & React.RefAttributes<any>>;
16
+
17
+ export { SupportingText, type SupportingTextProps, type SupportingTextSize, type SupportingTextVariant };
package/index.js ADDED
@@ -0,0 +1,581 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.tsx
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ SupportingText: () => SupportingText
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+
37
+ // src/SupportingText.tsx
38
+ var import_react4 = require("react");
39
+
40
+ // ../primitives-native/src/Box.tsx
41
+ var import_react_native = require("react-native");
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ var Box = ({
44
+ children,
45
+ onPress,
46
+ onLayout,
47
+ onMoveShouldSetResponder,
48
+ onResponderGrant,
49
+ onResponderMove,
50
+ onResponderRelease,
51
+ onResponderTerminate,
52
+ backgroundColor,
53
+ borderColor,
54
+ borderWidth,
55
+ borderBottomWidth,
56
+ borderBottomColor,
57
+ borderTopWidth,
58
+ borderTopColor,
59
+ borderLeftWidth,
60
+ borderLeftColor,
61
+ borderRightWidth,
62
+ borderRightColor,
63
+ borderRadius,
64
+ borderStyle,
65
+ height,
66
+ padding,
67
+ paddingHorizontal,
68
+ paddingVertical,
69
+ margin,
70
+ marginTop,
71
+ marginBottom,
72
+ marginLeft,
73
+ marginRight,
74
+ flexDirection,
75
+ alignItems,
76
+ justifyContent,
77
+ position,
78
+ top,
79
+ bottom,
80
+ left,
81
+ right,
82
+ width,
83
+ flex,
84
+ overflow,
85
+ zIndex,
86
+ hoverStyle,
87
+ pressStyle,
88
+ style,
89
+ "data-testid": dataTestId,
90
+ testID,
91
+ as,
92
+ src,
93
+ alt,
94
+ ...rest
95
+ }) => {
96
+ const getContainerStyle = (pressed) => ({
97
+ backgroundColor: pressed && pressStyle?.backgroundColor ? pressStyle.backgroundColor : backgroundColor,
98
+ borderColor,
99
+ borderWidth,
100
+ borderBottomWidth,
101
+ borderBottomColor,
102
+ borderTopWidth,
103
+ borderTopColor,
104
+ borderLeftWidth,
105
+ borderLeftColor,
106
+ borderRightWidth,
107
+ borderRightColor,
108
+ borderRadius,
109
+ borderStyle,
110
+ overflow,
111
+ zIndex,
112
+ height,
113
+ width,
114
+ padding,
115
+ paddingHorizontal,
116
+ paddingVertical,
117
+ margin,
118
+ marginTop,
119
+ marginBottom,
120
+ marginLeft,
121
+ marginRight,
122
+ flexDirection,
123
+ alignItems,
124
+ justifyContent,
125
+ position,
126
+ top,
127
+ bottom,
128
+ left,
129
+ right,
130
+ flex,
131
+ ...style
132
+ });
133
+ const finalTestID = dataTestId || testID;
134
+ const {
135
+ role,
136
+ tabIndex,
137
+ onKeyDown,
138
+ onKeyUp,
139
+ "aria-label": _ariaLabel,
140
+ "aria-labelledby": _ariaLabelledBy,
141
+ "aria-current": _ariaCurrent,
142
+ "aria-disabled": _ariaDisabled,
143
+ "aria-live": _ariaLive,
144
+ className,
145
+ "data-testid": _dataTestId,
146
+ ...nativeRest
147
+ } = rest;
148
+ if (as === "img" && src) {
149
+ const imageStyle = {
150
+ width,
151
+ height,
152
+ borderRadius,
153
+ position,
154
+ top,
155
+ bottom,
156
+ left,
157
+ right,
158
+ ...style
159
+ };
160
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
+ import_react_native.Image,
162
+ {
163
+ source: { uri: src },
164
+ style: imageStyle,
165
+ testID: finalTestID,
166
+ resizeMode: "cover",
167
+ ...nativeRest
168
+ }
169
+ );
170
+ }
171
+ if (onPress) {
172
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
173
+ import_react_native.Pressable,
174
+ {
175
+ onPress,
176
+ onLayout,
177
+ onMoveShouldSetResponder,
178
+ onResponderGrant,
179
+ onResponderMove,
180
+ onResponderRelease,
181
+ onResponderTerminate,
182
+ style: ({ pressed }) => getContainerStyle(pressed),
183
+ testID: finalTestID,
184
+ ...nativeRest,
185
+ children
186
+ }
187
+ );
188
+ }
189
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
190
+ import_react_native.View,
191
+ {
192
+ style: getContainerStyle(),
193
+ testID: finalTestID,
194
+ onLayout,
195
+ onMoveShouldSetResponder,
196
+ onResponderGrant,
197
+ onResponderMove,
198
+ onResponderRelease,
199
+ onResponderTerminate,
200
+ ...nativeRest,
201
+ children
202
+ }
203
+ );
204
+ };
205
+
206
+ // ../primitives-native/src/Text.tsx
207
+ var import_react_native2 = require("react-native");
208
+ var import_jsx_runtime2 = require("react/jsx-runtime");
209
+ var roleMap = {
210
+ alert: "alert",
211
+ heading: "header",
212
+ button: "button",
213
+ link: "link",
214
+ text: "text"
215
+ };
216
+ var Text = ({
217
+ children,
218
+ color,
219
+ fontSize,
220
+ fontWeight,
221
+ fontFamily,
222
+ id,
223
+ role,
224
+ ...props
225
+ }) => {
226
+ let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
227
+ if (resolvedFontFamily === "Pilat Wide Bold") {
228
+ resolvedFontFamily = void 0;
229
+ }
230
+ const style = {
231
+ color,
232
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
233
+ fontWeight,
234
+ fontFamily: resolvedFontFamily,
235
+ textDecorationLine: props.textDecoration
236
+ };
237
+ const accessibilityRole = role ? roleMap[role] : void 0;
238
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style, testID: id, accessibilityRole, children });
239
+ };
240
+
241
+ // ../primitives-native/src/Spinner.tsx
242
+ var import_react_native3 = require("react-native");
243
+ var import_jsx_runtime3 = require("react/jsx-runtime");
244
+ var Spinner = ({
245
+ color,
246
+ size,
247
+ role,
248
+ "aria-label": ariaLabel,
249
+ "aria-live": ariaLive,
250
+ "aria-describedby": ariaDescribedBy,
251
+ testID
252
+ }) => {
253
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
254
+ import_react_native3.View,
255
+ {
256
+ accessible: true,
257
+ accessibilityRole: role === "status" ? "none" : void 0,
258
+ accessibilityLabel: ariaLabel,
259
+ accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
260
+ testID,
261
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
262
+ import_react_native3.ActivityIndicator,
263
+ {
264
+ color,
265
+ size: typeof size === "number" ? size : "small"
266
+ }
267
+ )
268
+ }
269
+ );
270
+ };
271
+ Spinner.displayName = "Spinner";
272
+
273
+ // ../primitives-native/src/Icon.tsx
274
+ var import_react = __toESM(require("react"));
275
+ var import_react_native4 = require("react-native");
276
+ var import_jsx_runtime4 = require("react/jsx-runtime");
277
+ var Icon = ({ children, color, size }) => {
278
+ const style = {
279
+ width: typeof size === "number" ? size : void 0,
280
+ height: typeof size === "number" ? size : void 0,
281
+ alignItems: "center",
282
+ justifyContent: "center"
283
+ };
284
+ const childrenWithProps = import_react.default.Children.map(children, (child) => {
285
+ if (import_react.default.isValidElement(child)) {
286
+ return import_react.default.cloneElement(child, {
287
+ color: child.props.color || color,
288
+ // Also pass size if child seems to be an icon that needs it
289
+ size: child.props.size || size
290
+ });
291
+ }
292
+ return child;
293
+ });
294
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.View, { style, children: childrenWithProps });
295
+ };
296
+
297
+ // ../primitives-native/src/Divider.tsx
298
+ var import_react_native5 = require("react-native");
299
+ var import_jsx_runtime5 = require("react/jsx-runtime");
300
+
301
+ // ../primitives-native/src/Input.tsx
302
+ var import_react2 = require("react");
303
+ var import_react_native6 = require("react-native");
304
+ var import_jsx_runtime6 = require("react/jsx-runtime");
305
+ var keyboardTypeMap = {
306
+ text: "default",
307
+ number: "numeric",
308
+ email: "email-address",
309
+ tel: "phone-pad",
310
+ url: "url",
311
+ decimal: "decimal-pad"
312
+ };
313
+ var inputModeToKeyboardType = {
314
+ none: "default",
315
+ text: "default",
316
+ decimal: "decimal-pad",
317
+ numeric: "number-pad",
318
+ tel: "phone-pad",
319
+ search: "default",
320
+ email: "email-address",
321
+ url: "url"
322
+ };
323
+ var autoCompleteToTextContentType = {
324
+ "one-time-code": "oneTimeCode",
325
+ email: "emailAddress",
326
+ username: "username",
327
+ password: "password",
328
+ "new-password": "newPassword",
329
+ tel: "telephoneNumber",
330
+ "postal-code": "postalCode",
331
+ name: "name"
332
+ };
333
+ var InputPrimitive = (0, import_react2.forwardRef)(
334
+ ({
335
+ value,
336
+ placeholder,
337
+ onChange,
338
+ onChangeText,
339
+ onFocus,
340
+ onBlur,
341
+ onKeyDown,
342
+ disabled,
343
+ secureTextEntry,
344
+ style,
345
+ color,
346
+ fontSize,
347
+ placeholderTextColor,
348
+ maxLength,
349
+ name,
350
+ type,
351
+ inputMode,
352
+ autoComplete,
353
+ id,
354
+ "aria-invalid": ariaInvalid,
355
+ "aria-describedby": ariaDescribedBy,
356
+ "aria-labelledby": ariaLabelledBy,
357
+ "aria-label": ariaLabel,
358
+ "aria-disabled": ariaDisabled,
359
+ "data-testid": dataTestId
360
+ }, ref) => {
361
+ const handleChangeText = (text) => {
362
+ onChangeText?.(text);
363
+ if (onChange) {
364
+ const syntheticEvent = {
365
+ target: { value: text },
366
+ currentTarget: { value: text },
367
+ type: "change",
368
+ nativeEvent: { text },
369
+ preventDefault: () => {
370
+ },
371
+ stopPropagation: () => {
372
+ },
373
+ isTrusted: false
374
+ };
375
+ onChange(syntheticEvent);
376
+ }
377
+ };
378
+ const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
379
+ const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
380
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
381
+ import_react_native6.TextInput,
382
+ {
383
+ ref,
384
+ value,
385
+ placeholder,
386
+ onChangeText: handleChangeText,
387
+ onFocus,
388
+ onBlur,
389
+ onKeyPress: (e) => {
390
+ if (onKeyDown) {
391
+ onKeyDown({
392
+ key: e.nativeEvent.key,
393
+ preventDefault: () => {
394
+ }
395
+ });
396
+ }
397
+ },
398
+ editable: !disabled,
399
+ secureTextEntry: secureTextEntry || type === "password",
400
+ keyboardType,
401
+ textContentType,
402
+ style: [
403
+ {
404
+ color,
405
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
406
+ flex: 1,
407
+ padding: 0,
408
+ textAlign: style?.textAlign || "left"
409
+ },
410
+ style
411
+ ],
412
+ placeholderTextColor,
413
+ maxLength,
414
+ testID: dataTestId || id,
415
+ accessibilityLabel: ariaLabel,
416
+ accessibilityHint: ariaDescribedBy,
417
+ accessibilityState: {
418
+ disabled: disabled || ariaDisabled
419
+ },
420
+ accessible: true
421
+ }
422
+ );
423
+ }
424
+ );
425
+ InputPrimitive.displayName = "InputPrimitive";
426
+
427
+ // ../primitives-native/src/TextArea.tsx
428
+ var import_react3 = require("react");
429
+ var import_react_native7 = require("react-native");
430
+ var import_jsx_runtime7 = require("react/jsx-runtime");
431
+ var TextAreaPrimitive = (0, import_react3.forwardRef)(
432
+ ({
433
+ value,
434
+ placeholder,
435
+ onChange,
436
+ onChangeText,
437
+ onFocus,
438
+ onBlur,
439
+ onKeyDown,
440
+ disabled,
441
+ style,
442
+ color,
443
+ fontSize,
444
+ placeholderTextColor,
445
+ maxLength,
446
+ rows,
447
+ id,
448
+ "aria-invalid": ariaInvalid,
449
+ "aria-describedby": ariaDescribedBy,
450
+ "aria-labelledby": ariaLabelledBy,
451
+ "aria-label": ariaLabel,
452
+ "aria-disabled": ariaDisabled,
453
+ "data-testid": dataTestId
454
+ }, ref) => {
455
+ const handleChangeText = (text) => {
456
+ onChangeText?.(text);
457
+ if (onChange) {
458
+ const syntheticEvent = {
459
+ target: { value: text },
460
+ currentTarget: { value: text },
461
+ type: "change",
462
+ nativeEvent: { text },
463
+ preventDefault: () => {
464
+ },
465
+ stopPropagation: () => {
466
+ },
467
+ isTrusted: false
468
+ };
469
+ onChange(syntheticEvent);
470
+ }
471
+ };
472
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
473
+ import_react_native7.TextInput,
474
+ {
475
+ ref,
476
+ value,
477
+ placeholder,
478
+ onChangeText: handleChangeText,
479
+ onFocus,
480
+ onBlur,
481
+ onKeyPress: (e) => {
482
+ if (onKeyDown) {
483
+ onKeyDown({
484
+ key: e.nativeEvent.key,
485
+ preventDefault: () => {
486
+ }
487
+ });
488
+ }
489
+ },
490
+ editable: !disabled,
491
+ multiline: true,
492
+ numberOfLines: rows || 4,
493
+ style: [
494
+ {
495
+ color,
496
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
497
+ flex: 1,
498
+ padding: 0,
499
+ textAlignVertical: "top",
500
+ textAlign: style?.textAlign || "left"
501
+ },
502
+ style
503
+ ],
504
+ placeholderTextColor,
505
+ maxLength,
506
+ testID: dataTestId || id,
507
+ accessibilityLabel: ariaLabel,
508
+ accessibilityHint: ariaDescribedBy,
509
+ accessibilityState: {
510
+ disabled: disabled || ariaDisabled
511
+ },
512
+ accessible: true
513
+ }
514
+ );
515
+ }
516
+ );
517
+ TextAreaPrimitive.displayName = "TextAreaPrimitive";
518
+
519
+ // src/SupportingText.tsx
520
+ var import_xui_core = require("@xsolla/xui-core");
521
+ var import_jsx_runtime8 = require("react/jsx-runtime");
522
+ var SupportingText = (0, import_react4.forwardRef)(
523
+ ({
524
+ children,
525
+ size = "m",
526
+ variant = "helper",
527
+ required = false,
528
+ icon,
529
+ showIcon = false,
530
+ style,
531
+ ...rest
532
+ }, ref) => {
533
+ const { theme } = (0, import_xui_core.useDesignSystem)();
534
+ const sizeConfig = theme.sizing.supportingText(size);
535
+ const isError = variant === "error";
536
+ const isLabel = variant === "label";
537
+ const color = isError ? theme.colors.content.alert.primary : theme.colors.content.tertiary;
538
+ const fontWeight = isLabel ? "500" : "400";
539
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
540
+ Box,
541
+ {
542
+ ...rest,
543
+ ref,
544
+ flexDirection: "row",
545
+ alignItems: "center",
546
+ gap: sizeConfig.gap,
547
+ style,
548
+ children: [
549
+ isLabel && required && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
550
+ Text,
551
+ {
552
+ color: theme.colors.content.alert.primary,
553
+ fontSize: sizeConfig.fontSize,
554
+ fontWeight: "500",
555
+ children: "*"
556
+ }
557
+ ),
558
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: 6, children: [
559
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
560
+ Text,
561
+ {
562
+ color,
563
+ fontSize: sizeConfig.fontSize,
564
+ fontWeight,
565
+ style: { lineHeight: sizeConfig.lineHeight },
566
+ children
567
+ }
568
+ ),
569
+ (showIcon || icon) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { size: sizeConfig.iconSize, color, children: icon })
570
+ ] })
571
+ ]
572
+ }
573
+ );
574
+ }
575
+ );
576
+ SupportingText.displayName = "SupportingText";
577
+ // Annotate the CommonJS export names for ESM import in node:
578
+ 0 && (module.exports = {
579
+ SupportingText
580
+ });
581
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/SupportingText.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Spinner.tsx","../../../primitives-native/src/Icon.tsx","../../../primitives-native/src/Divider.tsx","../../../primitives-native/src/Input.tsx","../../../primitives-native/src/TextArea.tsx"],"sourcesContent":["export * from \"./SupportingText\";\nexport * from \"./types\";\n","import React, { forwardRef } from \"react\";\n// @ts-ignore - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport type { SupportingTextProps } from \"./types\";\n\nexport const SupportingText = forwardRef<any, SupportingTextProps>(\n (\n {\n children,\n size = \"m\",\n variant = \"helper\",\n required = false,\n icon,\n showIcon = false,\n style,\n ...rest\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n\n // @ts-ignore\n const sizeConfig = theme.sizing.supportingText(size);\n\n const isError = variant === \"error\";\n const isLabel = variant === \"label\";\n\n const color = isError\n ? theme.colors.content.alert.primary\n : theme.colors.content.tertiary;\n\n const fontWeight = isLabel ? \"500\" : \"400\";\n\n return (\n <Box\n {...rest}\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={sizeConfig.gap}\n style={style}\n >\n {isLabel && required && (\n <Text\n color={theme.colors.content.alert.primary}\n fontSize={sizeConfig.fontSize}\n fontWeight=\"500\"\n >\n *\n </Text>\n )}\n\n <Box flexDirection=\"row\" alignItems=\"center\" gap={6}>\n <Text\n color={color}\n fontSize={sizeConfig.fontSize}\n fontWeight={fontWeight}\n style={{ lineHeight: sizeConfig.lineHeight }}\n >\n {children}\n </Text>\n\n {(showIcon || icon) && (\n <Icon size={sizeConfig.iconSize} color={color}>\n {icon}\n </Icon>\n )}\n </Box>\n </Box>\n );\n }\n);\n\nSupportingText.displayName = \"SupportingText\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, it's better to use the system font\n // to avoid rendering issues or missing text.\n if (resolvedFontFamily === \"Pilat Wide Bold\") {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n","import type React from \"react\";\nimport { ActivityIndicator, View } from \"react-native\";\nimport type { SpinnerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Spinner: React.FC<SpinnerProps> = ({\n color,\n size,\n role,\n \"aria-label\": ariaLabel,\n \"aria-live\": ariaLive,\n \"aria-describedby\": ariaDescribedBy,\n testID,\n}) => {\n return (\n <View\n accessible={true}\n accessibilityRole={role === \"status\" ? \"none\" : undefined}\n accessibilityLabel={ariaLabel}\n accessibilityLiveRegion={\n ariaLive === \"polite\"\n ? \"polite\"\n : ariaLive === \"assertive\"\n ? \"assertive\"\n : \"none\"\n }\n testID={testID}\n >\n <ActivityIndicator\n color={color}\n size={typeof size === \"number\" ? size : \"small\"}\n />\n </View>\n );\n};\n\nSpinner.displayName = \"Spinner\";\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n // @ts-ignore - passing color down to potential Text/Icon children\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { DividerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Divider: React.FC<DividerProps> = ({\n color,\n height,\n width,\n vertical,\n dashStroke,\n}) => {\n const style: ViewStyle = {\n backgroundColor: dashStroke\n ? \"transparent\"\n : color || \"rgba(255, 255, 255, 0.15)\",\n width: vertical ? (typeof width === \"number\" ? width : 1) : \"100%\",\n height: vertical ? \"100%\" : typeof height === \"number\" ? height : 1,\n ...(dashStroke && {\n borderStyle: \"dashed\",\n borderColor: color || \"rgba(255, 255, 255, 0.15)\",\n borderWidth: 0,\n ...(vertical\n ? { borderLeftWidth: typeof width === \"number\" ? width : 1 }\n : { borderTopWidth: typeof height === \"number\" ? height : 1 }),\n }),\n };\n\n return <View style={style} />;\n};\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web input types to React Native keyboard types\nconst keyboardTypeMap: Record<string, any> = {\n text: \"default\",\n number: \"numeric\",\n email: \"email-address\",\n tel: \"phone-pad\",\n url: \"url\",\n decimal: \"decimal-pad\",\n};\n\n// Map web inputMode to React Native keyboard types\nconst inputModeToKeyboardType: Record<string, any> = {\n none: \"default\",\n text: \"default\",\n decimal: \"decimal-pad\",\n numeric: \"number-pad\",\n tel: \"phone-pad\",\n search: \"default\",\n email: \"email-address\",\n url: \"url\",\n};\n\n// Map web autoComplete to React Native textContentType (iOS)\nconst autoCompleteToTextContentType: Record<string, any> = {\n \"one-time-code\": \"oneTimeCode\",\n email: \"emailAddress\",\n username: \"username\",\n password: \"password\",\n \"new-password\": \"newPassword\",\n tel: \"telephoneNumber\",\n \"postal-code\": \"postalCode\",\n name: \"name\",\n};\n\nexport const InputPrimitive = forwardRef<RNTextInput, InputPrimitiveProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n secureTextEntry,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n // Create a synthetic event for onChange compatibility\n // Include nativeEvent and no-op methods to prevent runtime errors\n // when consumers expect DOM-like event behavior\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n // Determine keyboard type - inputMode takes precedence over type\n const keyboardType = inputMode\n ? inputModeToKeyboardType[inputMode] || \"default\"\n : type\n ? keyboardTypeMap[type] || \"default\"\n : \"default\";\n\n // Determine textContentType for iOS autofill\n const textContentType = autoComplete\n ? autoCompleteToTextContentType[autoComplete]\n : undefined;\n\n return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n // Map onKeyPress to onKeyDown for cross-platform compatibility\n // Include preventDefault to avoid runtime errors when consumers call it\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n secureTextEntry={secureTextEntry || type === \"password\"}\n keyboardType={keyboardType}\n textContentType={textContentType}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n // React Native accessibility props\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { TextAreaPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nexport const TextAreaPrimitive = forwardRef<\n RNTextInput,\n TextAreaPrimitiveProps\n>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n rows,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLTextAreaElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n multiline={true}\n numberOfLines={rows || 4}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlignVertical: \"top\",\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nTextAreaPrimitive.displayName = \"TextAreaPrimitive\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAkC;;;ACClC,0BAQO;AAmID;AAhIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAc;AAAA,QACd,YAAW;AAAA,QACX,KAAK,WAAW;AAAA,QAChB;AAAA,QAEC;AAAA,qBAAW,YACV;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,cAClC,UAAU,WAAW;AAAA,cACrB,YAAW;AAAA,cACZ;AAAA;AAAA,UAED;AAAA,UAGF,8CAAC,OAAI,eAAc,OAAM,YAAW,UAAS,KAAK,GAChD;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,UAAU,WAAW;AAAA,gBACrB;AAAA,gBACA,OAAO,EAAE,YAAY,WAAW,WAAW;AAAA,gBAE1C;AAAA;AAAA,YACH;AAAA,aAEE,YAAY,SACZ,6CAAC,QAAK,MAAM,WAAW,UAAU,OAC9B,gBACH;AAAA,aAEJ;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;","names":["import_react","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","import_react_native","import_jsx_runtime","React","import_react_native","import_jsx_runtime","import_react","import_react_native","import_jsx_runtime","RNTextInput","import_react","import_react_native","import_jsx_runtime","RNTextInput","import_jsx_runtime"]}
package/index.mjs ADDED
@@ -0,0 +1,548 @@
1
+ // src/SupportingText.tsx
2
+ import { forwardRef as forwardRef3 } from "react";
3
+
4
+ // ../primitives-native/src/Box.tsx
5
+ import {
6
+ View,
7
+ Pressable,
8
+ Image
9
+ } from "react-native";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Box = ({
12
+ children,
13
+ onPress,
14
+ onLayout,
15
+ onMoveShouldSetResponder,
16
+ onResponderGrant,
17
+ onResponderMove,
18
+ onResponderRelease,
19
+ onResponderTerminate,
20
+ backgroundColor,
21
+ borderColor,
22
+ borderWidth,
23
+ borderBottomWidth,
24
+ borderBottomColor,
25
+ borderTopWidth,
26
+ borderTopColor,
27
+ borderLeftWidth,
28
+ borderLeftColor,
29
+ borderRightWidth,
30
+ borderRightColor,
31
+ borderRadius,
32
+ borderStyle,
33
+ height,
34
+ padding,
35
+ paddingHorizontal,
36
+ paddingVertical,
37
+ margin,
38
+ marginTop,
39
+ marginBottom,
40
+ marginLeft,
41
+ marginRight,
42
+ flexDirection,
43
+ alignItems,
44
+ justifyContent,
45
+ position,
46
+ top,
47
+ bottom,
48
+ left,
49
+ right,
50
+ width,
51
+ flex,
52
+ overflow,
53
+ zIndex,
54
+ hoverStyle,
55
+ pressStyle,
56
+ style,
57
+ "data-testid": dataTestId,
58
+ testID,
59
+ as,
60
+ src,
61
+ alt,
62
+ ...rest
63
+ }) => {
64
+ const getContainerStyle = (pressed) => ({
65
+ backgroundColor: pressed && pressStyle?.backgroundColor ? pressStyle.backgroundColor : backgroundColor,
66
+ borderColor,
67
+ borderWidth,
68
+ borderBottomWidth,
69
+ borderBottomColor,
70
+ borderTopWidth,
71
+ borderTopColor,
72
+ borderLeftWidth,
73
+ borderLeftColor,
74
+ borderRightWidth,
75
+ borderRightColor,
76
+ borderRadius,
77
+ borderStyle,
78
+ overflow,
79
+ zIndex,
80
+ height,
81
+ width,
82
+ padding,
83
+ paddingHorizontal,
84
+ paddingVertical,
85
+ margin,
86
+ marginTop,
87
+ marginBottom,
88
+ marginLeft,
89
+ marginRight,
90
+ flexDirection,
91
+ alignItems,
92
+ justifyContent,
93
+ position,
94
+ top,
95
+ bottom,
96
+ left,
97
+ right,
98
+ flex,
99
+ ...style
100
+ });
101
+ const finalTestID = dataTestId || testID;
102
+ const {
103
+ role,
104
+ tabIndex,
105
+ onKeyDown,
106
+ onKeyUp,
107
+ "aria-label": _ariaLabel,
108
+ "aria-labelledby": _ariaLabelledBy,
109
+ "aria-current": _ariaCurrent,
110
+ "aria-disabled": _ariaDisabled,
111
+ "aria-live": _ariaLive,
112
+ className,
113
+ "data-testid": _dataTestId,
114
+ ...nativeRest
115
+ } = rest;
116
+ if (as === "img" && src) {
117
+ const imageStyle = {
118
+ width,
119
+ height,
120
+ borderRadius,
121
+ position,
122
+ top,
123
+ bottom,
124
+ left,
125
+ right,
126
+ ...style
127
+ };
128
+ return /* @__PURE__ */ jsx(
129
+ Image,
130
+ {
131
+ source: { uri: src },
132
+ style: imageStyle,
133
+ testID: finalTestID,
134
+ resizeMode: "cover",
135
+ ...nativeRest
136
+ }
137
+ );
138
+ }
139
+ if (onPress) {
140
+ return /* @__PURE__ */ jsx(
141
+ Pressable,
142
+ {
143
+ onPress,
144
+ onLayout,
145
+ onMoveShouldSetResponder,
146
+ onResponderGrant,
147
+ onResponderMove,
148
+ onResponderRelease,
149
+ onResponderTerminate,
150
+ style: ({ pressed }) => getContainerStyle(pressed),
151
+ testID: finalTestID,
152
+ ...nativeRest,
153
+ children
154
+ }
155
+ );
156
+ }
157
+ return /* @__PURE__ */ jsx(
158
+ View,
159
+ {
160
+ style: getContainerStyle(),
161
+ testID: finalTestID,
162
+ onLayout,
163
+ onMoveShouldSetResponder,
164
+ onResponderGrant,
165
+ onResponderMove,
166
+ onResponderRelease,
167
+ onResponderTerminate,
168
+ ...nativeRest,
169
+ children
170
+ }
171
+ );
172
+ };
173
+
174
+ // ../primitives-native/src/Text.tsx
175
+ import { Text as RNText } from "react-native";
176
+ import { jsx as jsx2 } from "react/jsx-runtime";
177
+ var roleMap = {
178
+ alert: "alert",
179
+ heading: "header",
180
+ button: "button",
181
+ link: "link",
182
+ text: "text"
183
+ };
184
+ var Text = ({
185
+ children,
186
+ color,
187
+ fontSize,
188
+ fontWeight,
189
+ fontFamily,
190
+ id,
191
+ role,
192
+ ...props
193
+ }) => {
194
+ let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
195
+ if (resolvedFontFamily === "Pilat Wide Bold") {
196
+ resolvedFontFamily = void 0;
197
+ }
198
+ const style = {
199
+ color,
200
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
201
+ fontWeight,
202
+ fontFamily: resolvedFontFamily,
203
+ textDecorationLine: props.textDecoration
204
+ };
205
+ const accessibilityRole = role ? roleMap[role] : void 0;
206
+ return /* @__PURE__ */ jsx2(RNText, { style, testID: id, accessibilityRole, children });
207
+ };
208
+
209
+ // ../primitives-native/src/Spinner.tsx
210
+ import { ActivityIndicator, View as View2 } from "react-native";
211
+ import { jsx as jsx3 } from "react/jsx-runtime";
212
+ var Spinner = ({
213
+ color,
214
+ size,
215
+ role,
216
+ "aria-label": ariaLabel,
217
+ "aria-live": ariaLive,
218
+ "aria-describedby": ariaDescribedBy,
219
+ testID
220
+ }) => {
221
+ return /* @__PURE__ */ jsx3(
222
+ View2,
223
+ {
224
+ accessible: true,
225
+ accessibilityRole: role === "status" ? "none" : void 0,
226
+ accessibilityLabel: ariaLabel,
227
+ accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
228
+ testID,
229
+ children: /* @__PURE__ */ jsx3(
230
+ ActivityIndicator,
231
+ {
232
+ color,
233
+ size: typeof size === "number" ? size : "small"
234
+ }
235
+ )
236
+ }
237
+ );
238
+ };
239
+ Spinner.displayName = "Spinner";
240
+
241
+ // ../primitives-native/src/Icon.tsx
242
+ import React from "react";
243
+ import { View as View3 } from "react-native";
244
+ import { jsx as jsx4 } from "react/jsx-runtime";
245
+ var Icon = ({ children, color, size }) => {
246
+ const style = {
247
+ width: typeof size === "number" ? size : void 0,
248
+ height: typeof size === "number" ? size : void 0,
249
+ alignItems: "center",
250
+ justifyContent: "center"
251
+ };
252
+ const childrenWithProps = React.Children.map(children, (child) => {
253
+ if (React.isValidElement(child)) {
254
+ return React.cloneElement(child, {
255
+ color: child.props.color || color,
256
+ // Also pass size if child seems to be an icon that needs it
257
+ size: child.props.size || size
258
+ });
259
+ }
260
+ return child;
261
+ });
262
+ return /* @__PURE__ */ jsx4(View3, { style, children: childrenWithProps });
263
+ };
264
+
265
+ // ../primitives-native/src/Divider.tsx
266
+ import { View as View4 } from "react-native";
267
+ import { jsx as jsx5 } from "react/jsx-runtime";
268
+
269
+ // ../primitives-native/src/Input.tsx
270
+ import { forwardRef } from "react";
271
+ import { TextInput as RNTextInput } from "react-native";
272
+ import { jsx as jsx6 } from "react/jsx-runtime";
273
+ var keyboardTypeMap = {
274
+ text: "default",
275
+ number: "numeric",
276
+ email: "email-address",
277
+ tel: "phone-pad",
278
+ url: "url",
279
+ decimal: "decimal-pad"
280
+ };
281
+ var inputModeToKeyboardType = {
282
+ none: "default",
283
+ text: "default",
284
+ decimal: "decimal-pad",
285
+ numeric: "number-pad",
286
+ tel: "phone-pad",
287
+ search: "default",
288
+ email: "email-address",
289
+ url: "url"
290
+ };
291
+ var autoCompleteToTextContentType = {
292
+ "one-time-code": "oneTimeCode",
293
+ email: "emailAddress",
294
+ username: "username",
295
+ password: "password",
296
+ "new-password": "newPassword",
297
+ tel: "telephoneNumber",
298
+ "postal-code": "postalCode",
299
+ name: "name"
300
+ };
301
+ var InputPrimitive = forwardRef(
302
+ ({
303
+ value,
304
+ placeholder,
305
+ onChange,
306
+ onChangeText,
307
+ onFocus,
308
+ onBlur,
309
+ onKeyDown,
310
+ disabled,
311
+ secureTextEntry,
312
+ style,
313
+ color,
314
+ fontSize,
315
+ placeholderTextColor,
316
+ maxLength,
317
+ name,
318
+ type,
319
+ inputMode,
320
+ autoComplete,
321
+ id,
322
+ "aria-invalid": ariaInvalid,
323
+ "aria-describedby": ariaDescribedBy,
324
+ "aria-labelledby": ariaLabelledBy,
325
+ "aria-label": ariaLabel,
326
+ "aria-disabled": ariaDisabled,
327
+ "data-testid": dataTestId
328
+ }, ref) => {
329
+ const handleChangeText = (text) => {
330
+ onChangeText?.(text);
331
+ if (onChange) {
332
+ const syntheticEvent = {
333
+ target: { value: text },
334
+ currentTarget: { value: text },
335
+ type: "change",
336
+ nativeEvent: { text },
337
+ preventDefault: () => {
338
+ },
339
+ stopPropagation: () => {
340
+ },
341
+ isTrusted: false
342
+ };
343
+ onChange(syntheticEvent);
344
+ }
345
+ };
346
+ const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
347
+ const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
348
+ return /* @__PURE__ */ jsx6(
349
+ RNTextInput,
350
+ {
351
+ ref,
352
+ value,
353
+ placeholder,
354
+ onChangeText: handleChangeText,
355
+ onFocus,
356
+ onBlur,
357
+ onKeyPress: (e) => {
358
+ if (onKeyDown) {
359
+ onKeyDown({
360
+ key: e.nativeEvent.key,
361
+ preventDefault: () => {
362
+ }
363
+ });
364
+ }
365
+ },
366
+ editable: !disabled,
367
+ secureTextEntry: secureTextEntry || type === "password",
368
+ keyboardType,
369
+ textContentType,
370
+ style: [
371
+ {
372
+ color,
373
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
374
+ flex: 1,
375
+ padding: 0,
376
+ textAlign: style?.textAlign || "left"
377
+ },
378
+ style
379
+ ],
380
+ placeholderTextColor,
381
+ maxLength,
382
+ testID: dataTestId || id,
383
+ accessibilityLabel: ariaLabel,
384
+ accessibilityHint: ariaDescribedBy,
385
+ accessibilityState: {
386
+ disabled: disabled || ariaDisabled
387
+ },
388
+ accessible: true
389
+ }
390
+ );
391
+ }
392
+ );
393
+ InputPrimitive.displayName = "InputPrimitive";
394
+
395
+ // ../primitives-native/src/TextArea.tsx
396
+ import { forwardRef as forwardRef2 } from "react";
397
+ import { TextInput as RNTextInput2 } from "react-native";
398
+ import { jsx as jsx7 } from "react/jsx-runtime";
399
+ var TextAreaPrimitive = forwardRef2(
400
+ ({
401
+ value,
402
+ placeholder,
403
+ onChange,
404
+ onChangeText,
405
+ onFocus,
406
+ onBlur,
407
+ onKeyDown,
408
+ disabled,
409
+ style,
410
+ color,
411
+ fontSize,
412
+ placeholderTextColor,
413
+ maxLength,
414
+ rows,
415
+ id,
416
+ "aria-invalid": ariaInvalid,
417
+ "aria-describedby": ariaDescribedBy,
418
+ "aria-labelledby": ariaLabelledBy,
419
+ "aria-label": ariaLabel,
420
+ "aria-disabled": ariaDisabled,
421
+ "data-testid": dataTestId
422
+ }, ref) => {
423
+ const handleChangeText = (text) => {
424
+ onChangeText?.(text);
425
+ if (onChange) {
426
+ const syntheticEvent = {
427
+ target: { value: text },
428
+ currentTarget: { value: text },
429
+ type: "change",
430
+ nativeEvent: { text },
431
+ preventDefault: () => {
432
+ },
433
+ stopPropagation: () => {
434
+ },
435
+ isTrusted: false
436
+ };
437
+ onChange(syntheticEvent);
438
+ }
439
+ };
440
+ return /* @__PURE__ */ jsx7(
441
+ RNTextInput2,
442
+ {
443
+ ref,
444
+ value,
445
+ placeholder,
446
+ onChangeText: handleChangeText,
447
+ onFocus,
448
+ onBlur,
449
+ onKeyPress: (e) => {
450
+ if (onKeyDown) {
451
+ onKeyDown({
452
+ key: e.nativeEvent.key,
453
+ preventDefault: () => {
454
+ }
455
+ });
456
+ }
457
+ },
458
+ editable: !disabled,
459
+ multiline: true,
460
+ numberOfLines: rows || 4,
461
+ style: [
462
+ {
463
+ color,
464
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
465
+ flex: 1,
466
+ padding: 0,
467
+ textAlignVertical: "top",
468
+ textAlign: style?.textAlign || "left"
469
+ },
470
+ style
471
+ ],
472
+ placeholderTextColor,
473
+ maxLength,
474
+ testID: dataTestId || id,
475
+ accessibilityLabel: ariaLabel,
476
+ accessibilityHint: ariaDescribedBy,
477
+ accessibilityState: {
478
+ disabled: disabled || ariaDisabled
479
+ },
480
+ accessible: true
481
+ }
482
+ );
483
+ }
484
+ );
485
+ TextAreaPrimitive.displayName = "TextAreaPrimitive";
486
+
487
+ // src/SupportingText.tsx
488
+ import { useDesignSystem } from "@xsolla/xui-core";
489
+ import { jsx as jsx8, jsxs } from "react/jsx-runtime";
490
+ var SupportingText = forwardRef3(
491
+ ({
492
+ children,
493
+ size = "m",
494
+ variant = "helper",
495
+ required = false,
496
+ icon,
497
+ showIcon = false,
498
+ style,
499
+ ...rest
500
+ }, ref) => {
501
+ const { theme } = useDesignSystem();
502
+ const sizeConfig = theme.sizing.supportingText(size);
503
+ const isError = variant === "error";
504
+ const isLabel = variant === "label";
505
+ const color = isError ? theme.colors.content.alert.primary : theme.colors.content.tertiary;
506
+ const fontWeight = isLabel ? "500" : "400";
507
+ return /* @__PURE__ */ jsxs(
508
+ Box,
509
+ {
510
+ ...rest,
511
+ ref,
512
+ flexDirection: "row",
513
+ alignItems: "center",
514
+ gap: sizeConfig.gap,
515
+ style,
516
+ children: [
517
+ isLabel && required && /* @__PURE__ */ jsx8(
518
+ Text,
519
+ {
520
+ color: theme.colors.content.alert.primary,
521
+ fontSize: sizeConfig.fontSize,
522
+ fontWeight: "500",
523
+ children: "*"
524
+ }
525
+ ),
526
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 6, children: [
527
+ /* @__PURE__ */ jsx8(
528
+ Text,
529
+ {
530
+ color,
531
+ fontSize: sizeConfig.fontSize,
532
+ fontWeight,
533
+ style: { lineHeight: sizeConfig.lineHeight },
534
+ children
535
+ }
536
+ ),
537
+ (showIcon || icon) && /* @__PURE__ */ jsx8(Icon, { size: sizeConfig.iconSize, color, children: icon })
538
+ ] })
539
+ ]
540
+ }
541
+ );
542
+ }
543
+ );
544
+ SupportingText.displayName = "SupportingText";
545
+ export {
546
+ SupportingText
547
+ };
548
+ //# sourceMappingURL=index.mjs.map
package/index.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/SupportingText.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Spinner.tsx","../../../primitives-native/src/Icon.tsx","../../../primitives-native/src/Divider.tsx","../../../primitives-native/src/Input.tsx","../../../primitives-native/src/TextArea.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n// @ts-ignore - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport type { SupportingTextProps } from \"./types\";\n\nexport const SupportingText = forwardRef<any, SupportingTextProps>(\n (\n {\n children,\n size = \"m\",\n variant = \"helper\",\n required = false,\n icon,\n showIcon = false,\n style,\n ...rest\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n\n // @ts-ignore\n const sizeConfig = theme.sizing.supportingText(size);\n\n const isError = variant === \"error\";\n const isLabel = variant === \"label\";\n\n const color = isError\n ? theme.colors.content.alert.primary\n : theme.colors.content.tertiary;\n\n const fontWeight = isLabel ? \"500\" : \"400\";\n\n return (\n <Box\n {...rest}\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={sizeConfig.gap}\n style={style}\n >\n {isLabel && required && (\n <Text\n color={theme.colors.content.alert.primary}\n fontSize={sizeConfig.fontSize}\n fontWeight=\"500\"\n >\n *\n </Text>\n )}\n\n <Box flexDirection=\"row\" alignItems=\"center\" gap={6}>\n <Text\n color={color}\n fontSize={sizeConfig.fontSize}\n fontWeight={fontWeight}\n style={{ lineHeight: sizeConfig.lineHeight }}\n >\n {children}\n </Text>\n\n {(showIcon || icon) && (\n <Icon size={sizeConfig.iconSize} color={color}>\n {icon}\n </Icon>\n )}\n </Box>\n </Box>\n );\n }\n);\n\nSupportingText.displayName = \"SupportingText\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, it's better to use the system font\n // to avoid rendering issues or missing text.\n if (resolvedFontFamily === \"Pilat Wide Bold\") {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n","import type React from \"react\";\nimport { ActivityIndicator, View } from \"react-native\";\nimport type { SpinnerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Spinner: React.FC<SpinnerProps> = ({\n color,\n size,\n role,\n \"aria-label\": ariaLabel,\n \"aria-live\": ariaLive,\n \"aria-describedby\": ariaDescribedBy,\n testID,\n}) => {\n return (\n <View\n accessible={true}\n accessibilityRole={role === \"status\" ? \"none\" : undefined}\n accessibilityLabel={ariaLabel}\n accessibilityLiveRegion={\n ariaLive === \"polite\"\n ? \"polite\"\n : ariaLive === \"assertive\"\n ? \"assertive\"\n : \"none\"\n }\n testID={testID}\n >\n <ActivityIndicator\n color={color}\n size={typeof size === \"number\" ? size : \"small\"}\n />\n </View>\n );\n};\n\nSpinner.displayName = \"Spinner\";\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n // @ts-ignore - passing color down to potential Text/Icon children\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { DividerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Divider: React.FC<DividerProps> = ({\n color,\n height,\n width,\n vertical,\n dashStroke,\n}) => {\n const style: ViewStyle = {\n backgroundColor: dashStroke\n ? \"transparent\"\n : color || \"rgba(255, 255, 255, 0.15)\",\n width: vertical ? (typeof width === \"number\" ? width : 1) : \"100%\",\n height: vertical ? \"100%\" : typeof height === \"number\" ? height : 1,\n ...(dashStroke && {\n borderStyle: \"dashed\",\n borderColor: color || \"rgba(255, 255, 255, 0.15)\",\n borderWidth: 0,\n ...(vertical\n ? { borderLeftWidth: typeof width === \"number\" ? width : 1 }\n : { borderTopWidth: typeof height === \"number\" ? height : 1 }),\n }),\n };\n\n return <View style={style} />;\n};\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web input types to React Native keyboard types\nconst keyboardTypeMap: Record<string, any> = {\n text: \"default\",\n number: \"numeric\",\n email: \"email-address\",\n tel: \"phone-pad\",\n url: \"url\",\n decimal: \"decimal-pad\",\n};\n\n// Map web inputMode to React Native keyboard types\nconst inputModeToKeyboardType: Record<string, any> = {\n none: \"default\",\n text: \"default\",\n decimal: \"decimal-pad\",\n numeric: \"number-pad\",\n tel: \"phone-pad\",\n search: \"default\",\n email: \"email-address\",\n url: \"url\",\n};\n\n// Map web autoComplete to React Native textContentType (iOS)\nconst autoCompleteToTextContentType: Record<string, any> = {\n \"one-time-code\": \"oneTimeCode\",\n email: \"emailAddress\",\n username: \"username\",\n password: \"password\",\n \"new-password\": \"newPassword\",\n tel: \"telephoneNumber\",\n \"postal-code\": \"postalCode\",\n name: \"name\",\n};\n\nexport const InputPrimitive = forwardRef<RNTextInput, InputPrimitiveProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n secureTextEntry,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n // Create a synthetic event for onChange compatibility\n // Include nativeEvent and no-op methods to prevent runtime errors\n // when consumers expect DOM-like event behavior\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n // Determine keyboard type - inputMode takes precedence over type\n const keyboardType = inputMode\n ? inputModeToKeyboardType[inputMode] || \"default\"\n : type\n ? keyboardTypeMap[type] || \"default\"\n : \"default\";\n\n // Determine textContentType for iOS autofill\n const textContentType = autoComplete\n ? autoCompleteToTextContentType[autoComplete]\n : undefined;\n\n return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n // Map onKeyPress to onKeyDown for cross-platform compatibility\n // Include preventDefault to avoid runtime errors when consumers call it\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n secureTextEntry={secureTextEntry || type === \"password\"}\n keyboardType={keyboardType}\n textContentType={textContentType}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n // React Native accessibility props\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { TextAreaPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nexport const TextAreaPrimitive = forwardRef<\n RNTextInput,\n TextAreaPrimitiveProps\n>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n rows,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLTextAreaElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n multiline={true}\n numberOfLines={rows || 4}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlignVertical: \"top\",\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nTextAreaPrimitive.displayName = \"TextAreaPrimitive\";\n"],"mappings":";AAAA,SAAgB,cAAAA,mBAAkB;;;ACClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAmID;AAhIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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A,cACrB,YAAW;AAAA,cACZ;AAAA;AAAA,UAED;AAAA,UAGF,qBAAC,OAAI,eAAc,OAAM,YAAW,UAAS,KAAK,GAChD;AAAA,4BAAAA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,UAAU,WAAW;AAAA,gBACrB;AAAA,gBACA,OAAO,EAAE,YAAY,WAAW,WAAW;AAAA,gBAE1C;AAAA;AAAA,YACH;AAAA,aAEE,YAAY,SACZ,gBAAAA,KAAC,QAAK,MAAM,WAAW,UAAU,OAC9B,gBACH;AAAA,aAEJ;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;","names":["forwardRef","jsx","View","jsx","View","jsx","View","jsx","jsx","forwardRef","RNTextInput","jsx","jsx","forwardRef"]}
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@xsolla/xui-supporting-text-native",
3
+ "version": "0.64.0-pr56.1768348754",
4
+ "main": "./index.js",
5
+ "module": "./index.mjs",
6
+ "types": "./index.d.ts",
7
+ "scripts": {
8
+ "build": "yarn build:web && yarn build:native",
9
+ "build:web": "PLATFORM=web tsup src/index.tsx --format esm,cjs --dts --env.PLATFORM web --clean",
10
+ "build:native": "PLATFORM=native tsup src/index.tsx --format esm,cjs --dts --env.PLATFORM native --clean"
11
+ },
12
+ "dependencies": {
13
+ "@xsolla/xui-core": "0.64.0-pr56.1768348754",
14
+ "@xsolla/xui-icons": "0.64.0-pr56.1768348754",
15
+ "@xsolla/xui-primitives-core": "0.64.0-pr56.1768348754"
16
+ },
17
+ "peerDependencies": {
18
+ "react": ">=16.8.0",
19
+ "styled-components": ">=4",
20
+ "react-native": "*"
21
+ },
22
+ "devDependencies": {
23
+ "tsup": "^8.0.0"
24
+ },
25
+ "license": "MIT"
26
+ }