@xsolla/xui-typography-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,22 @@
1
+ import React, { ReactNode, ElementType } from 'react';
2
+
3
+ type AlignType = "center" | "inherit" | "justify" | "left" | "right";
4
+ type VariantType = "h1" | "h2" | "h3" | "h4" | "display" | "bodyLg" | "bodyLgAccent" | "bodyLgParagraph" | "bodyMd" | "bodyMdAccent" | "bodyMdParagraph" | "bodySm" | "bodySmAccent" | "bodySmParagraph" | "bodyXs" | "bodyXsAccent" | "bodyXsParagraph";
5
+ type ThemeColorType = "primary" | "secondary" | "tertiary" | "brand" | "brandSecondary" | "success" | "warning" | "alert" | "neutral";
6
+ type ColorType = ThemeColorType | "inherit";
7
+ interface TypographyProps extends Omit<any, "color"> {
8
+ children?: ReactNode;
9
+ align?: AlignType;
10
+ noWrap?: boolean;
11
+ variant?: VariantType;
12
+ color?: ColorType | string;
13
+ marginBottom?: number;
14
+ marginTop?: number;
15
+ as?: ElementType;
16
+ "aria-hidden"?: boolean;
17
+ "aria-live"?: "polite" | "assertive" | "off";
18
+ }
19
+
20
+ declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<any>>;
21
+
22
+ export { type AlignType, type ColorType, type ThemeColorType, Typography, type TypographyProps, type VariantType };
package/index.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import React, { ReactNode, ElementType } from 'react';
2
+
3
+ type AlignType = "center" | "inherit" | "justify" | "left" | "right";
4
+ type VariantType = "h1" | "h2" | "h3" | "h4" | "display" | "bodyLg" | "bodyLgAccent" | "bodyLgParagraph" | "bodyMd" | "bodyMdAccent" | "bodyMdParagraph" | "bodySm" | "bodySmAccent" | "bodySmParagraph" | "bodyXs" | "bodyXsAccent" | "bodyXsParagraph";
5
+ type ThemeColorType = "primary" | "secondary" | "tertiary" | "brand" | "brandSecondary" | "success" | "warning" | "alert" | "neutral";
6
+ type ColorType = ThemeColorType | "inherit";
7
+ interface TypographyProps extends Omit<any, "color"> {
8
+ children?: ReactNode;
9
+ align?: AlignType;
10
+ noWrap?: boolean;
11
+ variant?: VariantType;
12
+ color?: ColorType | string;
13
+ marginBottom?: number;
14
+ marginTop?: number;
15
+ as?: ElementType;
16
+ "aria-hidden"?: boolean;
17
+ "aria-live"?: "polite" | "assertive" | "off";
18
+ }
19
+
20
+ declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<any>>;
21
+
22
+ export { type AlignType, type ColorType, type ThemeColorType, Typography, type TypographyProps, type VariantType };
package/index.js ADDED
@@ -0,0 +1,442 @@
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
+ Typography: () => Typography
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+
37
+ // src/Typography.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
+
44
+ // ../primitives-native/src/Text.tsx
45
+ var import_react_native2 = require("react-native");
46
+ var import_jsx_runtime2 = require("react/jsx-runtime");
47
+ var roleMap = {
48
+ alert: "alert",
49
+ heading: "header",
50
+ button: "button",
51
+ link: "link",
52
+ text: "text"
53
+ };
54
+ var Text = ({
55
+ children,
56
+ color,
57
+ fontSize,
58
+ fontWeight,
59
+ fontFamily,
60
+ id,
61
+ role,
62
+ ...props
63
+ }) => {
64
+ let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
65
+ if (resolvedFontFamily === "Pilat Wide Bold") {
66
+ resolvedFontFamily = void 0;
67
+ }
68
+ const style = {
69
+ color,
70
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
71
+ fontWeight,
72
+ fontFamily: resolvedFontFamily,
73
+ textDecorationLine: props.textDecoration
74
+ };
75
+ const accessibilityRole = role ? roleMap[role] : void 0;
76
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style, testID: id, accessibilityRole, children });
77
+ };
78
+
79
+ // ../primitives-native/src/Spinner.tsx
80
+ var import_react_native3 = require("react-native");
81
+ var import_jsx_runtime3 = require("react/jsx-runtime");
82
+ var Spinner = ({
83
+ color,
84
+ size,
85
+ role,
86
+ "aria-label": ariaLabel,
87
+ "aria-live": ariaLive,
88
+ "aria-describedby": ariaDescribedBy,
89
+ testID
90
+ }) => {
91
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
92
+ import_react_native3.View,
93
+ {
94
+ accessible: true,
95
+ accessibilityRole: role === "status" ? "none" : void 0,
96
+ accessibilityLabel: ariaLabel,
97
+ accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
98
+ testID,
99
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
100
+ import_react_native3.ActivityIndicator,
101
+ {
102
+ color,
103
+ size: typeof size === "number" ? size : "small"
104
+ }
105
+ )
106
+ }
107
+ );
108
+ };
109
+ Spinner.displayName = "Spinner";
110
+
111
+ // ../primitives-native/src/Icon.tsx
112
+ var import_react = __toESM(require("react"));
113
+ var import_react_native4 = require("react-native");
114
+ var import_jsx_runtime4 = require("react/jsx-runtime");
115
+
116
+ // ../primitives-native/src/Divider.tsx
117
+ var import_react_native5 = require("react-native");
118
+ var import_jsx_runtime5 = require("react/jsx-runtime");
119
+
120
+ // ../primitives-native/src/Input.tsx
121
+ var import_react2 = require("react");
122
+ var import_react_native6 = require("react-native");
123
+ var import_jsx_runtime6 = require("react/jsx-runtime");
124
+ var keyboardTypeMap = {
125
+ text: "default",
126
+ number: "numeric",
127
+ email: "email-address",
128
+ tel: "phone-pad",
129
+ url: "url",
130
+ decimal: "decimal-pad"
131
+ };
132
+ var inputModeToKeyboardType = {
133
+ none: "default",
134
+ text: "default",
135
+ decimal: "decimal-pad",
136
+ numeric: "number-pad",
137
+ tel: "phone-pad",
138
+ search: "default",
139
+ email: "email-address",
140
+ url: "url"
141
+ };
142
+ var autoCompleteToTextContentType = {
143
+ "one-time-code": "oneTimeCode",
144
+ email: "emailAddress",
145
+ username: "username",
146
+ password: "password",
147
+ "new-password": "newPassword",
148
+ tel: "telephoneNumber",
149
+ "postal-code": "postalCode",
150
+ name: "name"
151
+ };
152
+ var InputPrimitive = (0, import_react2.forwardRef)(
153
+ ({
154
+ value,
155
+ placeholder,
156
+ onChange,
157
+ onChangeText,
158
+ onFocus,
159
+ onBlur,
160
+ onKeyDown,
161
+ disabled,
162
+ secureTextEntry,
163
+ style,
164
+ color,
165
+ fontSize,
166
+ placeholderTextColor,
167
+ maxLength,
168
+ name,
169
+ type,
170
+ inputMode,
171
+ autoComplete,
172
+ id,
173
+ "aria-invalid": ariaInvalid,
174
+ "aria-describedby": ariaDescribedBy,
175
+ "aria-labelledby": ariaLabelledBy,
176
+ "aria-label": ariaLabel,
177
+ "aria-disabled": ariaDisabled,
178
+ "data-testid": dataTestId
179
+ }, ref) => {
180
+ const handleChangeText = (text) => {
181
+ onChangeText?.(text);
182
+ if (onChange) {
183
+ const syntheticEvent = {
184
+ target: { value: text },
185
+ currentTarget: { value: text },
186
+ type: "change",
187
+ nativeEvent: { text },
188
+ preventDefault: () => {
189
+ },
190
+ stopPropagation: () => {
191
+ },
192
+ isTrusted: false
193
+ };
194
+ onChange(syntheticEvent);
195
+ }
196
+ };
197
+ const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
198
+ const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
199
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
200
+ import_react_native6.TextInput,
201
+ {
202
+ ref,
203
+ value,
204
+ placeholder,
205
+ onChangeText: handleChangeText,
206
+ onFocus,
207
+ onBlur,
208
+ onKeyPress: (e) => {
209
+ if (onKeyDown) {
210
+ onKeyDown({
211
+ key: e.nativeEvent.key,
212
+ preventDefault: () => {
213
+ }
214
+ });
215
+ }
216
+ },
217
+ editable: !disabled,
218
+ secureTextEntry: secureTextEntry || type === "password",
219
+ keyboardType,
220
+ textContentType,
221
+ style: [
222
+ {
223
+ color,
224
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
225
+ flex: 1,
226
+ padding: 0,
227
+ textAlign: style?.textAlign || "left"
228
+ },
229
+ style
230
+ ],
231
+ placeholderTextColor,
232
+ maxLength,
233
+ testID: dataTestId || id,
234
+ accessibilityLabel: ariaLabel,
235
+ accessibilityHint: ariaDescribedBy,
236
+ accessibilityState: {
237
+ disabled: disabled || ariaDisabled
238
+ },
239
+ accessible: true
240
+ }
241
+ );
242
+ }
243
+ );
244
+ InputPrimitive.displayName = "InputPrimitive";
245
+
246
+ // ../primitives-native/src/TextArea.tsx
247
+ var import_react3 = require("react");
248
+ var import_react_native7 = require("react-native");
249
+ var import_jsx_runtime7 = require("react/jsx-runtime");
250
+ var TextAreaPrimitive = (0, import_react3.forwardRef)(
251
+ ({
252
+ value,
253
+ placeholder,
254
+ onChange,
255
+ onChangeText,
256
+ onFocus,
257
+ onBlur,
258
+ onKeyDown,
259
+ disabled,
260
+ style,
261
+ color,
262
+ fontSize,
263
+ placeholderTextColor,
264
+ maxLength,
265
+ rows,
266
+ id,
267
+ "aria-invalid": ariaInvalid,
268
+ "aria-describedby": ariaDescribedBy,
269
+ "aria-labelledby": ariaLabelledBy,
270
+ "aria-label": ariaLabel,
271
+ "aria-disabled": ariaDisabled,
272
+ "data-testid": dataTestId
273
+ }, ref) => {
274
+ const handleChangeText = (text) => {
275
+ onChangeText?.(text);
276
+ if (onChange) {
277
+ const syntheticEvent = {
278
+ target: { value: text },
279
+ currentTarget: { value: text },
280
+ type: "change",
281
+ nativeEvent: { text },
282
+ preventDefault: () => {
283
+ },
284
+ stopPropagation: () => {
285
+ },
286
+ isTrusted: false
287
+ };
288
+ onChange(syntheticEvent);
289
+ }
290
+ };
291
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
292
+ import_react_native7.TextInput,
293
+ {
294
+ ref,
295
+ value,
296
+ placeholder,
297
+ onChangeText: handleChangeText,
298
+ onFocus,
299
+ onBlur,
300
+ onKeyPress: (e) => {
301
+ if (onKeyDown) {
302
+ onKeyDown({
303
+ key: e.nativeEvent.key,
304
+ preventDefault: () => {
305
+ }
306
+ });
307
+ }
308
+ },
309
+ editable: !disabled,
310
+ multiline: true,
311
+ numberOfLines: rows || 4,
312
+ style: [
313
+ {
314
+ color,
315
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
316
+ flex: 1,
317
+ padding: 0,
318
+ textAlignVertical: "top",
319
+ textAlign: style?.textAlign || "left"
320
+ },
321
+ style
322
+ ],
323
+ placeholderTextColor,
324
+ maxLength,
325
+ testID: dataTestId || id,
326
+ accessibilityLabel: ariaLabel,
327
+ accessibilityHint: ariaDescribedBy,
328
+ accessibilityState: {
329
+ disabled: disabled || ariaDisabled
330
+ },
331
+ accessible: true
332
+ }
333
+ );
334
+ }
335
+ );
336
+ TextAreaPrimitive.displayName = "TextAreaPrimitive";
337
+
338
+ // src/Typography.tsx
339
+ var import_xui_core = require("@xsolla/xui-core");
340
+ var import_jsx_runtime8 = require("react/jsx-runtime");
341
+ var getColor = (color, theme) => {
342
+ if (color === "inherit") return void 0;
343
+ const colorMap = {
344
+ primary: theme?.colors?.content?.primary,
345
+ secondary: theme?.colors?.content?.secondary,
346
+ tertiary: theme?.colors?.content?.tertiary,
347
+ brand: theme?.colors?.content?.brand?.primary,
348
+ brandSecondary: theme?.colors?.content?.brand?.secondary,
349
+ success: theme?.colors?.content?.success?.primary,
350
+ warning: theme?.colors?.content?.warning?.primary,
351
+ alert: theme?.colors?.content?.alert?.primary,
352
+ neutral: theme?.colors?.content?.neutral?.primary
353
+ };
354
+ return colorMap[color] || color;
355
+ };
356
+ var getVariantStyles = (variant) => {
357
+ switch (variant) {
358
+ case "h1":
359
+ return { fontSize: 40, fontWeight: "700", lineHeight: "48px" };
360
+ case "h2":
361
+ return { fontSize: 32, fontWeight: "700", lineHeight: "38px" };
362
+ case "h3":
363
+ return { fontSize: 28, fontWeight: "700", lineHeight: "34px" };
364
+ case "h4":
365
+ return { fontSize: 24, fontWeight: "700", lineHeight: "28px" };
366
+ case "display":
367
+ return { fontSize: 48, fontWeight: "800", lineHeight: "58px" };
368
+ case "bodyLg":
369
+ return { fontSize: 18, fontWeight: "400", lineHeight: "24px" };
370
+ case "bodyLgAccent":
371
+ return { fontSize: 18, fontWeight: "500", lineHeight: "24px" };
372
+ case "bodyLgParagraph":
373
+ return { fontSize: 18, fontWeight: "400", lineHeight: "26px" };
374
+ case "bodyMd":
375
+ return { fontSize: 16, fontWeight: "400", lineHeight: "20px" };
376
+ case "bodyMdAccent":
377
+ return { fontSize: 16, fontWeight: "500", lineHeight: "20px" };
378
+ case "bodyMdParagraph":
379
+ return { fontSize: 16, fontWeight: "400", lineHeight: "22px" };
380
+ case "bodySm":
381
+ return { fontSize: 14, fontWeight: "400", lineHeight: "18px" };
382
+ case "bodySmAccent":
383
+ return { fontSize: 14, fontWeight: "500", lineHeight: "18px" };
384
+ case "bodySmParagraph":
385
+ return { fontSize: 14, fontWeight: "400", lineHeight: "20px" };
386
+ case "bodyXs":
387
+ return { fontSize: 12, fontWeight: "400", lineHeight: "16px" };
388
+ case "bodyXsAccent":
389
+ return { fontSize: 12, fontWeight: "500", lineHeight: "16px" };
390
+ case "bodyXsParagraph":
391
+ return { fontSize: 12, fontWeight: "400", lineHeight: "18px" };
392
+ default:
393
+ return { fontSize: 16, fontWeight: "400", lineHeight: "20px" };
394
+ }
395
+ };
396
+ var Typography = (0, import_react4.forwardRef)(
397
+ ({
398
+ children,
399
+ align = "inherit",
400
+ noWrap = false,
401
+ variant = "bodyMd",
402
+ color = "inherit",
403
+ marginBottom = 0,
404
+ marginTop = 0,
405
+ as,
406
+ ...rest
407
+ }, ref) => {
408
+ const { theme } = (0, import_xui_core.useDesignSystem)();
409
+ const variantStyles = getVariantStyles(variant);
410
+ const colorValue = getColor(color, theme);
411
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
412
+ Text,
413
+ {
414
+ ...rest,
415
+ ref,
416
+ as,
417
+ color: colorValue,
418
+ fontSize: variantStyles.fontSize,
419
+ fontWeight: variantStyles.fontWeight,
420
+ style: {
421
+ marginTop,
422
+ marginBottom,
423
+ textAlign: align === "inherit" ? void 0 : align,
424
+ lineHeight: variantStyles.lineHeight,
425
+ ...noWrap && {
426
+ overflow: "hidden",
427
+ textOverflow: "ellipsis",
428
+ whiteSpace: "nowrap"
429
+ },
430
+ ...rest.style
431
+ },
432
+ children
433
+ }
434
+ );
435
+ }
436
+ );
437
+ Typography.displayName = "Typography";
438
+ // Annotate the CommonJS export names for ESM import in node:
439
+ 0 && (module.exports = {
440
+ Typography
441
+ });
442
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/Typography.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 \"./Typography\";\nexport * from \"./types\";\n","import React, { forwardRef } from \"react\";\n// @ts-ignore - this will be resolved at build time\nimport { Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport type { ColorType, TypographyProps, VariantType } from \"./types\";\n\nconst getColor = (\n color: ColorType | string,\n theme: any\n): string | undefined => {\n if (color === \"inherit\") return undefined;\n\n const colorMap: Record<string, string> = {\n primary: theme?.colors?.content?.primary,\n secondary: theme?.colors?.content?.secondary,\n tertiary: theme?.colors?.content?.tertiary,\n brand: theme?.colors?.content?.brand?.primary,\n brandSecondary: theme?.colors?.content?.brand?.secondary,\n success: theme?.colors?.content?.success?.primary,\n warning: theme?.colors?.content?.warning?.primary,\n alert: theme?.colors?.content?.alert?.primary,\n neutral: theme?.colors?.content?.neutral?.primary,\n };\n\n return colorMap[color] || color;\n};\n\nconst getVariantStyles = (variant: VariantType) => {\n switch (variant) {\n case \"h1\":\n return { fontSize: 40, fontWeight: \"700\", lineHeight: \"48px\" };\n case \"h2\":\n return { fontSize: 32, fontWeight: \"700\", lineHeight: \"38px\" };\n case \"h3\":\n return { fontSize: 28, fontWeight: \"700\", lineHeight: \"34px\" };\n case \"h4\":\n return { fontSize: 24, fontWeight: \"700\", lineHeight: \"28px\" };\n case \"display\":\n return { fontSize: 48, fontWeight: \"800\", lineHeight: \"58px\" };\n case \"bodyLg\":\n return { fontSize: 18, fontWeight: \"400\", lineHeight: \"24px\" };\n case \"bodyLgAccent\":\n return { fontSize: 18, fontWeight: \"500\", lineHeight: \"24px\" };\n case \"bodyLgParagraph\":\n return { fontSize: 18, fontWeight: \"400\", lineHeight: \"26px\" };\n case \"bodyMd\":\n return { fontSize: 16, fontWeight: \"400\", lineHeight: \"20px\" };\n case \"bodyMdAccent\":\n return { fontSize: 16, fontWeight: \"500\", lineHeight: \"20px\" };\n case \"bodyMdParagraph\":\n return { fontSize: 16, fontWeight: \"400\", lineHeight: \"22px\" };\n case \"bodySm\":\n return { fontSize: 14, fontWeight: \"400\", lineHeight: \"18px\" };\n case \"bodySmAccent\":\n return { fontSize: 14, fontWeight: \"500\", lineHeight: \"18px\" };\n case \"bodySmParagraph\":\n return { fontSize: 14, fontWeight: \"400\", lineHeight: \"20px\" };\n case \"bodyXs\":\n return { fontSize: 12, fontWeight: \"400\", lineHeight: \"16px\" };\n case \"bodyXsAccent\":\n return { fontSize: 12, fontWeight: \"500\", lineHeight: \"16px\" };\n case \"bodyXsParagraph\":\n return { fontSize: 12, fontWeight: \"400\", lineHeight: \"18px\" };\n default:\n return { fontSize: 16, fontWeight: \"400\", lineHeight: \"20px\" };\n }\n};\n\nexport const Typography = forwardRef<any, TypographyProps>(\n (\n {\n children,\n align = \"inherit\",\n noWrap = false,\n variant = \"bodyMd\",\n color = \"inherit\",\n marginBottom = 0,\n marginTop = 0,\n as,\n ...rest\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n const variantStyles = getVariantStyles(variant);\n const colorValue = getColor(color, theme);\n\n return (\n <Text\n {...rest}\n ref={ref}\n as={as}\n color={colorValue}\n fontSize={variantStyles.fontSize}\n fontWeight={variantStyles.fontWeight}\n style={{\n marginTop,\n marginBottom,\n textAlign: align === \"inherit\" ? undefined : align,\n lineHeight: variantStyles.lineHeight,\n ...(noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n ...rest.style,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nTypography.displayName = \"Typography\";\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;;;AC3IN,IAAAC,uBAA6D;AA6CzD,IAAAC,sBAAA;AAzCJ,IAAM,UAA6C;AAAA,EACjD,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AACR;AAEO,IAAM,OAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AAEJ,MAAI,qBAAqB,aACrB,WAAW,MAAM,GAAG,EAAE,CAAC,EAAE,QAAQ,SAAS,EAAE,EAAE,KAAK,IACnD;AAIJ,MAAI,uBAAuB,mBAAmB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,aAAO,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,OAAO;AAAA,IAC/D,KAAK;AACH,aAAO,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,OAAO;AAAA,IAC/D,KAAK;AACH,aAAO,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,OAAO;AAAA,IAC/D,KAAK;AACH,aAAO,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,OAAO;AAAA,IAC/D;AACE,aAAO,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,OAAO;AAAA,EACjE;AACF;AAEO,IAAM,iBAAa;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,YAAY;AAAA,IACZ;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,EAAE,MAAM,QAAI,iCAAgB;AAClC,UAAM,gBAAgB,iBAAiB,OAAO;AAC9C,UAAM,aAAa,SAAS,OAAO,KAAK;AAExC,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,UAAU,cAAc;AAAA,QACxB,YAAY,cAAc;AAAA,QAC1B,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA,WAAW,UAAU,YAAY,SAAY;AAAA,UAC7C,YAAY,cAAc;AAAA,UAC1B,GAAI,UAAU;AAAA,YACZ,UAAU;AAAA,YACV,cAAc;AAAA,YACd,YAAY;AAAA,UACd;AAAA,UACA,GAAG,KAAK;AAAA,QACV;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["import_react","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","import_react_native","import_jsx_runtime","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,409 @@
1
+ // src/Typography.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
+
12
+ // ../primitives-native/src/Text.tsx
13
+ import { Text as RNText } from "react-native";
14
+ import { jsx as jsx2 } from "react/jsx-runtime";
15
+ var roleMap = {
16
+ alert: "alert",
17
+ heading: "header",
18
+ button: "button",
19
+ link: "link",
20
+ text: "text"
21
+ };
22
+ var Text = ({
23
+ children,
24
+ color,
25
+ fontSize,
26
+ fontWeight,
27
+ fontFamily,
28
+ id,
29
+ role,
30
+ ...props
31
+ }) => {
32
+ let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
33
+ if (resolvedFontFamily === "Pilat Wide Bold") {
34
+ resolvedFontFamily = void 0;
35
+ }
36
+ const style = {
37
+ color,
38
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
39
+ fontWeight,
40
+ fontFamily: resolvedFontFamily,
41
+ textDecorationLine: props.textDecoration
42
+ };
43
+ const accessibilityRole = role ? roleMap[role] : void 0;
44
+ return /* @__PURE__ */ jsx2(RNText, { style, testID: id, accessibilityRole, children });
45
+ };
46
+
47
+ // ../primitives-native/src/Spinner.tsx
48
+ import { ActivityIndicator, View as View2 } from "react-native";
49
+ import { jsx as jsx3 } from "react/jsx-runtime";
50
+ var Spinner = ({
51
+ color,
52
+ size,
53
+ role,
54
+ "aria-label": ariaLabel,
55
+ "aria-live": ariaLive,
56
+ "aria-describedby": ariaDescribedBy,
57
+ testID
58
+ }) => {
59
+ return /* @__PURE__ */ jsx3(
60
+ View2,
61
+ {
62
+ accessible: true,
63
+ accessibilityRole: role === "status" ? "none" : void 0,
64
+ accessibilityLabel: ariaLabel,
65
+ accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
66
+ testID,
67
+ children: /* @__PURE__ */ jsx3(
68
+ ActivityIndicator,
69
+ {
70
+ color,
71
+ size: typeof size === "number" ? size : "small"
72
+ }
73
+ )
74
+ }
75
+ );
76
+ };
77
+ Spinner.displayName = "Spinner";
78
+
79
+ // ../primitives-native/src/Icon.tsx
80
+ import React from "react";
81
+ import { View as View3 } from "react-native";
82
+ import { jsx as jsx4 } from "react/jsx-runtime";
83
+
84
+ // ../primitives-native/src/Divider.tsx
85
+ import { View as View4 } from "react-native";
86
+ import { jsx as jsx5 } from "react/jsx-runtime";
87
+
88
+ // ../primitives-native/src/Input.tsx
89
+ import { forwardRef } from "react";
90
+ import { TextInput as RNTextInput } from "react-native";
91
+ import { jsx as jsx6 } from "react/jsx-runtime";
92
+ var keyboardTypeMap = {
93
+ text: "default",
94
+ number: "numeric",
95
+ email: "email-address",
96
+ tel: "phone-pad",
97
+ url: "url",
98
+ decimal: "decimal-pad"
99
+ };
100
+ var inputModeToKeyboardType = {
101
+ none: "default",
102
+ text: "default",
103
+ decimal: "decimal-pad",
104
+ numeric: "number-pad",
105
+ tel: "phone-pad",
106
+ search: "default",
107
+ email: "email-address",
108
+ url: "url"
109
+ };
110
+ var autoCompleteToTextContentType = {
111
+ "one-time-code": "oneTimeCode",
112
+ email: "emailAddress",
113
+ username: "username",
114
+ password: "password",
115
+ "new-password": "newPassword",
116
+ tel: "telephoneNumber",
117
+ "postal-code": "postalCode",
118
+ name: "name"
119
+ };
120
+ var InputPrimitive = forwardRef(
121
+ ({
122
+ value,
123
+ placeholder,
124
+ onChange,
125
+ onChangeText,
126
+ onFocus,
127
+ onBlur,
128
+ onKeyDown,
129
+ disabled,
130
+ secureTextEntry,
131
+ style,
132
+ color,
133
+ fontSize,
134
+ placeholderTextColor,
135
+ maxLength,
136
+ name,
137
+ type,
138
+ inputMode,
139
+ autoComplete,
140
+ id,
141
+ "aria-invalid": ariaInvalid,
142
+ "aria-describedby": ariaDescribedBy,
143
+ "aria-labelledby": ariaLabelledBy,
144
+ "aria-label": ariaLabel,
145
+ "aria-disabled": ariaDisabled,
146
+ "data-testid": dataTestId
147
+ }, ref) => {
148
+ const handleChangeText = (text) => {
149
+ onChangeText?.(text);
150
+ if (onChange) {
151
+ const syntheticEvent = {
152
+ target: { value: text },
153
+ currentTarget: { value: text },
154
+ type: "change",
155
+ nativeEvent: { text },
156
+ preventDefault: () => {
157
+ },
158
+ stopPropagation: () => {
159
+ },
160
+ isTrusted: false
161
+ };
162
+ onChange(syntheticEvent);
163
+ }
164
+ };
165
+ const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
166
+ const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
167
+ return /* @__PURE__ */ jsx6(
168
+ RNTextInput,
169
+ {
170
+ ref,
171
+ value,
172
+ placeholder,
173
+ onChangeText: handleChangeText,
174
+ onFocus,
175
+ onBlur,
176
+ onKeyPress: (e) => {
177
+ if (onKeyDown) {
178
+ onKeyDown({
179
+ key: e.nativeEvent.key,
180
+ preventDefault: () => {
181
+ }
182
+ });
183
+ }
184
+ },
185
+ editable: !disabled,
186
+ secureTextEntry: secureTextEntry || type === "password",
187
+ keyboardType,
188
+ textContentType,
189
+ style: [
190
+ {
191
+ color,
192
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
193
+ flex: 1,
194
+ padding: 0,
195
+ textAlign: style?.textAlign || "left"
196
+ },
197
+ style
198
+ ],
199
+ placeholderTextColor,
200
+ maxLength,
201
+ testID: dataTestId || id,
202
+ accessibilityLabel: ariaLabel,
203
+ accessibilityHint: ariaDescribedBy,
204
+ accessibilityState: {
205
+ disabled: disabled || ariaDisabled
206
+ },
207
+ accessible: true
208
+ }
209
+ );
210
+ }
211
+ );
212
+ InputPrimitive.displayName = "InputPrimitive";
213
+
214
+ // ../primitives-native/src/TextArea.tsx
215
+ import { forwardRef as forwardRef2 } from "react";
216
+ import { TextInput as RNTextInput2 } from "react-native";
217
+ import { jsx as jsx7 } from "react/jsx-runtime";
218
+ var TextAreaPrimitive = forwardRef2(
219
+ ({
220
+ value,
221
+ placeholder,
222
+ onChange,
223
+ onChangeText,
224
+ onFocus,
225
+ onBlur,
226
+ onKeyDown,
227
+ disabled,
228
+ style,
229
+ color,
230
+ fontSize,
231
+ placeholderTextColor,
232
+ maxLength,
233
+ rows,
234
+ id,
235
+ "aria-invalid": ariaInvalid,
236
+ "aria-describedby": ariaDescribedBy,
237
+ "aria-labelledby": ariaLabelledBy,
238
+ "aria-label": ariaLabel,
239
+ "aria-disabled": ariaDisabled,
240
+ "data-testid": dataTestId
241
+ }, ref) => {
242
+ const handleChangeText = (text) => {
243
+ onChangeText?.(text);
244
+ if (onChange) {
245
+ const syntheticEvent = {
246
+ target: { value: text },
247
+ currentTarget: { value: text },
248
+ type: "change",
249
+ nativeEvent: { text },
250
+ preventDefault: () => {
251
+ },
252
+ stopPropagation: () => {
253
+ },
254
+ isTrusted: false
255
+ };
256
+ onChange(syntheticEvent);
257
+ }
258
+ };
259
+ return /* @__PURE__ */ jsx7(
260
+ RNTextInput2,
261
+ {
262
+ ref,
263
+ value,
264
+ placeholder,
265
+ onChangeText: handleChangeText,
266
+ onFocus,
267
+ onBlur,
268
+ onKeyPress: (e) => {
269
+ if (onKeyDown) {
270
+ onKeyDown({
271
+ key: e.nativeEvent.key,
272
+ preventDefault: () => {
273
+ }
274
+ });
275
+ }
276
+ },
277
+ editable: !disabled,
278
+ multiline: true,
279
+ numberOfLines: rows || 4,
280
+ style: [
281
+ {
282
+ color,
283
+ fontSize: typeof fontSize === "number" ? fontSize : void 0,
284
+ flex: 1,
285
+ padding: 0,
286
+ textAlignVertical: "top",
287
+ textAlign: style?.textAlign || "left"
288
+ },
289
+ style
290
+ ],
291
+ placeholderTextColor,
292
+ maxLength,
293
+ testID: dataTestId || id,
294
+ accessibilityLabel: ariaLabel,
295
+ accessibilityHint: ariaDescribedBy,
296
+ accessibilityState: {
297
+ disabled: disabled || ariaDisabled
298
+ },
299
+ accessible: true
300
+ }
301
+ );
302
+ }
303
+ );
304
+ TextAreaPrimitive.displayName = "TextAreaPrimitive";
305
+
306
+ // src/Typography.tsx
307
+ import { useDesignSystem } from "@xsolla/xui-core";
308
+ import { jsx as jsx8 } from "react/jsx-runtime";
309
+ var getColor = (color, theme) => {
310
+ if (color === "inherit") return void 0;
311
+ const colorMap = {
312
+ primary: theme?.colors?.content?.primary,
313
+ secondary: theme?.colors?.content?.secondary,
314
+ tertiary: theme?.colors?.content?.tertiary,
315
+ brand: theme?.colors?.content?.brand?.primary,
316
+ brandSecondary: theme?.colors?.content?.brand?.secondary,
317
+ success: theme?.colors?.content?.success?.primary,
318
+ warning: theme?.colors?.content?.warning?.primary,
319
+ alert: theme?.colors?.content?.alert?.primary,
320
+ neutral: theme?.colors?.content?.neutral?.primary
321
+ };
322
+ return colorMap[color] || color;
323
+ };
324
+ var getVariantStyles = (variant) => {
325
+ switch (variant) {
326
+ case "h1":
327
+ return { fontSize: 40, fontWeight: "700", lineHeight: "48px" };
328
+ case "h2":
329
+ return { fontSize: 32, fontWeight: "700", lineHeight: "38px" };
330
+ case "h3":
331
+ return { fontSize: 28, fontWeight: "700", lineHeight: "34px" };
332
+ case "h4":
333
+ return { fontSize: 24, fontWeight: "700", lineHeight: "28px" };
334
+ case "display":
335
+ return { fontSize: 48, fontWeight: "800", lineHeight: "58px" };
336
+ case "bodyLg":
337
+ return { fontSize: 18, fontWeight: "400", lineHeight: "24px" };
338
+ case "bodyLgAccent":
339
+ return { fontSize: 18, fontWeight: "500", lineHeight: "24px" };
340
+ case "bodyLgParagraph":
341
+ return { fontSize: 18, fontWeight: "400", lineHeight: "26px" };
342
+ case "bodyMd":
343
+ return { fontSize: 16, fontWeight: "400", lineHeight: "20px" };
344
+ case "bodyMdAccent":
345
+ return { fontSize: 16, fontWeight: "500", lineHeight: "20px" };
346
+ case "bodyMdParagraph":
347
+ return { fontSize: 16, fontWeight: "400", lineHeight: "22px" };
348
+ case "bodySm":
349
+ return { fontSize: 14, fontWeight: "400", lineHeight: "18px" };
350
+ case "bodySmAccent":
351
+ return { fontSize: 14, fontWeight: "500", lineHeight: "18px" };
352
+ case "bodySmParagraph":
353
+ return { fontSize: 14, fontWeight: "400", lineHeight: "20px" };
354
+ case "bodyXs":
355
+ return { fontSize: 12, fontWeight: "400", lineHeight: "16px" };
356
+ case "bodyXsAccent":
357
+ return { fontSize: 12, fontWeight: "500", lineHeight: "16px" };
358
+ case "bodyXsParagraph":
359
+ return { fontSize: 12, fontWeight: "400", lineHeight: "18px" };
360
+ default:
361
+ return { fontSize: 16, fontWeight: "400", lineHeight: "20px" };
362
+ }
363
+ };
364
+ var Typography = forwardRef3(
365
+ ({
366
+ children,
367
+ align = "inherit",
368
+ noWrap = false,
369
+ variant = "bodyMd",
370
+ color = "inherit",
371
+ marginBottom = 0,
372
+ marginTop = 0,
373
+ as,
374
+ ...rest
375
+ }, ref) => {
376
+ const { theme } = useDesignSystem();
377
+ const variantStyles = getVariantStyles(variant);
378
+ const colorValue = getColor(color, theme);
379
+ return /* @__PURE__ */ jsx8(
380
+ Text,
381
+ {
382
+ ...rest,
383
+ ref,
384
+ as,
385
+ color: colorValue,
386
+ fontSize: variantStyles.fontSize,
387
+ fontWeight: variantStyles.fontWeight,
388
+ style: {
389
+ marginTop,
390
+ marginBottom,
391
+ textAlign: align === "inherit" ? void 0 : align,
392
+ lineHeight: variantStyles.lineHeight,
393
+ ...noWrap && {
394
+ overflow: "hidden",
395
+ textOverflow: "ellipsis",
396
+ whiteSpace: "nowrap"
397
+ },
398
+ ...rest.style
399
+ },
400
+ children
401
+ }
402
+ );
403
+ }
404
+ );
405
+ Typography.displayName = "Typography";
406
+ export {
407
+ Typography
408
+ };
409
+ //# sourceMappingURL=index.mjs.map
package/index.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Typography.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 { Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport type { ColorType, TypographyProps, VariantType } from \"./types\";\n\nconst getColor = (\n color: ColorType | string,\n theme: any\n): string | undefined => {\n if (color === \"inherit\") return undefined;\n\n const colorMap: Record<string, string> = {\n primary: theme?.colors?.content?.primary,\n secondary: theme?.colors?.content?.secondary,\n tertiary: theme?.colors?.content?.tertiary,\n brand: theme?.colors?.content?.brand?.primary,\n brandSecondary: theme?.colors?.content?.brand?.secondary,\n success: theme?.colors?.content?.success?.primary,\n warning: theme?.colors?.content?.warning?.primary,\n alert: theme?.colors?.content?.alert?.primary,\n neutral: theme?.colors?.content?.neutral?.primary,\n };\n\n return colorMap[color] || color;\n};\n\nconst getVariantStyles = (variant: VariantType) => {\n switch (variant) {\n case \"h1\":\n return { fontSize: 40, fontWeight: \"700\", lineHeight: \"48px\" };\n case \"h2\":\n return { fontSize: 32, fontWeight: \"700\", lineHeight: \"38px\" };\n case \"h3\":\n return { fontSize: 28, fontWeight: \"700\", lineHeight: \"34px\" };\n case \"h4\":\n return { fontSize: 24, fontWeight: \"700\", lineHeight: \"28px\" };\n case \"display\":\n return { fontSize: 48, fontWeight: \"800\", lineHeight: \"58px\" };\n case \"bodyLg\":\n return { fontSize: 18, fontWeight: \"400\", lineHeight: \"24px\" };\n case \"bodyLgAccent\":\n return { fontSize: 18, fontWeight: \"500\", lineHeight: \"24px\" };\n case \"bodyLgParagraph\":\n return { fontSize: 18, fontWeight: \"400\", lineHeight: \"26px\" };\n case \"bodyMd\":\n return { fontSize: 16, fontWeight: \"400\", lineHeight: \"20px\" };\n case \"bodyMdAccent\":\n return { fontSize: 16, fontWeight: \"500\", lineHeight: \"20px\" };\n case \"bodyMdParagraph\":\n return { fontSize: 16, fontWeight: \"400\", lineHeight: \"22px\" };\n case \"bodySm\":\n return { fontSize: 14, fontWeight: \"400\", lineHeight: \"18px\" };\n case \"bodySmAccent\":\n return { fontSize: 14, fontWeight: \"500\", lineHeight: \"18px\" };\n case \"bodySmParagraph\":\n return { fontSize: 14, fontWeight: \"400\", lineHeight: \"20px\" };\n case \"bodyXs\":\n return { fontSize: 12, fontWeight: \"400\", lineHeight: \"16px\" };\n case \"bodyXsAccent\":\n return { fontSize: 12, fontWeight: \"500\", lineHeight: \"16px\" };\n case \"bodyXsParagraph\":\n return { fontSize: 12, fontWeight: \"400\", lineHeight: \"18px\" };\n default:\n return { fontSize: 16, fontWeight: \"400\", lineHeight: \"20px\" };\n }\n};\n\nexport const Typography = forwardRef<any, TypographyProps>(\n (\n {\n children,\n align = \"inherit\",\n noWrap = false,\n variant = \"bodyMd\",\n color = \"inherit\",\n marginBottom = 0,\n marginTop = 0,\n as,\n ...rest\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n const variantStyles = getVariantStyles(variant);\n const colorValue = getColor(color, theme);\n\n return (\n <Text\n {...rest}\n ref={ref}\n as={as}\n color={colorValue}\n fontSize={variantStyles.fontSize}\n fontWeight={variantStyles.fontWeight}\n style={{\n marginTop,\n marginBottom,\n textAlign: align === \"inherit\" ? undefined : align,\n lineHeight: variantStyles.lineHeight,\n ...(noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n ...rest.style,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nTypography.displayName = \"Typography\";\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;;;AC3IN,SAAS,QAAQ,cAA4C;AA6CzD,gBAAAC,YAAA;AAzCJ,IAAM,UAA6C;AAAA,EACjD,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AACR;AAEO,IAAM,OAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AAEJ,MAAI,qBAAqB,aACrB,WAAW,MAAM,GAAG,EAAE,CAAC,EAAE,QAAQ,SAAS,EAAE,EAAE,KAAK,IACnD;AAIJ,MAAI,uBAAuB,mBAAmB;AAC5C,yBAAqB;AAAA,EACvB;AAEA,QAAM,QAAmB;AAAA,IACvB;AAAA,IACA,UAAU,OAAO,aAAa,WAAW,WAAW;AAAA,IACpD;AAAA,IACA,YAAY;AAAA,IACZ,oBAAoB,MAAM;AAAA,EAC5B;AAGA,QAAM,oBAAoB,OAAO,QAAQ,IAAI,IAAI;AAEjD,SACE,gBAAAA,KAAC,UAAO,OAAc,QAAQ,IAAI,mBAC/B,UACH;AAEJ;;;ACjDA,SAAS,mBAAmB,QAAAC,aAAY;AA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AAA,IAC/D;AACE,aAAO,EAAE,UAAU,IAAI,YAAY,OAAO,YAAY,OAAO;AAAA,EACjE;AACF;AAEO,IAAM,aAAaC;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,YAAY;AAAA,IACZ;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,EAAE,MAAM,IAAI,gBAAgB;AAClC,UAAM,gBAAgB,iBAAiB,OAAO;AAC9C,UAAM,aAAa,SAAS,OAAO,KAAK;AAExC,WACE,gBAAAD;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,UAAU,cAAc;AAAA,QACxB,YAAY,cAAc;AAAA,QAC1B,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA,WAAW,UAAU,YAAY,SAAY;AAAA,UAC7C,YAAY,cAAc;AAAA,UAC1B,GAAI,UAAU;AAAA,YACZ,UAAU;AAAA,YACV,cAAc;AAAA,YACd,YAAY;AAAA,UACd;AAAA,UACA,GAAG,KAAK;AAAA,QACV;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["forwardRef","jsx","View","jsx","View","jsx","View","jsx","jsx","forwardRef","RNTextInput","jsx","jsx","forwardRef"]}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@xsolla/xui-typography-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
+ "test": "vitest",
12
+ "test:run": "vitest run",
13
+ "test:coverage": "vitest run --coverage"
14
+ },
15
+ "dependencies": {
16
+ "@xsolla/xui-core": "0.64.0-pr56.1768348754",
17
+ "@xsolla/xui-primitives-core": "0.64.0-pr56.1768348754"
18
+ },
19
+ "peerDependencies": {
20
+ "react": ">=16.8.0",
21
+ "styled-components": ">=4",
22
+ "react-native": "*"
23
+ },
24
+ "devDependencies": {
25
+ "@testing-library/jest-dom": "^6.1.5",
26
+ "@testing-library/react": "^14.1.2",
27
+ "@vitest/coverage-v8": "^1.0.0",
28
+ "jsdom": "^24.0.0",
29
+ "react": "^18.0.0",
30
+ "react-dom": "^18.0.0",
31
+ "tsup": "^8.0.0",
32
+ "vitest": "^1.0.0"
33
+ },
34
+ "license": "MIT"
35
+ }