@xsolla/xui-divider 0.89.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/native/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
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
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/index.tsx
@@ -235,45 +225,9 @@ var Text = ({
235
225
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style, testID: id, accessibilityRole, children });
236
226
  };
237
227
 
238
- // ../primitives-native/src/Spinner.tsx
228
+ // ../primitives-native/src/Divider.tsx
239
229
  var import_react_native3 = require("react-native");
240
230
  var import_jsx_runtime3 = require("react/jsx-runtime");
241
- var Spinner = ({
242
- color,
243
- size,
244
- role,
245
- "aria-label": ariaLabel,
246
- "aria-live": ariaLive,
247
- testID
248
- }) => {
249
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
250
- import_react_native3.View,
251
- {
252
- accessible: true,
253
- accessibilityRole: role === "status" ? "none" : void 0,
254
- accessibilityLabel: ariaLabel,
255
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
256
- testID,
257
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
258
- import_react_native3.ActivityIndicator,
259
- {
260
- color,
261
- size: typeof size === "number" ? size : "small"
262
- }
263
- )
264
- }
265
- );
266
- };
267
- Spinner.displayName = "Spinner";
268
-
269
- // ../primitives-native/src/Icon.tsx
270
- var import_react = __toESM(require("react"));
271
- var import_react_native4 = require("react-native");
272
- var import_jsx_runtime4 = require("react/jsx-runtime");
273
-
274
- // ../primitives-native/src/Divider.tsx
275
- var import_react_native5 = require("react-native");
276
- var import_jsx_runtime5 = require("react/jsx-runtime");
277
231
  var Divider = ({
278
232
  color,
279
233
  height,
@@ -292,225 +246,12 @@ var Divider = ({
292
246
  ...vertical ? { borderLeftWidth: typeof width === "number" ? width : 1 } : { borderTopWidth: typeof height === "number" ? height : 1 }
293
247
  }
294
248
  };
295
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.View, { style });
249
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style });
296
250
  };
297
251
 
298
- // ../primitives-native/src/Input.tsx
299
- var import_react2 = require("react");
300
- var import_react_native6 = require("react-native");
301
- var import_jsx_runtime6 = require("react/jsx-runtime");
302
- var keyboardTypeMap = {
303
- text: "default",
304
- number: "numeric",
305
- email: "email-address",
306
- tel: "phone-pad",
307
- url: "url",
308
- decimal: "decimal-pad"
309
- };
310
- var inputModeToKeyboardType = {
311
- none: "default",
312
- text: "default",
313
- decimal: "decimal-pad",
314
- numeric: "number-pad",
315
- tel: "phone-pad",
316
- search: "default",
317
- email: "email-address",
318
- url: "url"
319
- };
320
- var autoCompleteToTextContentType = {
321
- "one-time-code": "oneTimeCode",
322
- email: "emailAddress",
323
- username: "username",
324
- password: "password",
325
- "new-password": "newPassword",
326
- tel: "telephoneNumber",
327
- "postal-code": "postalCode",
328
- name: "name"
329
- };
330
- var InputPrimitive = (0, import_react2.forwardRef)(
331
- ({
332
- value,
333
- placeholder,
334
- onChange,
335
- onChangeText,
336
- onFocus,
337
- onBlur,
338
- onKeyDown,
339
- disabled,
340
- secureTextEntry,
341
- style,
342
- color,
343
- fontSize,
344
- placeholderTextColor,
345
- maxLength,
346
- type,
347
- inputMode,
348
- autoComplete,
349
- id,
350
- "aria-describedby": ariaDescribedBy,
351
- "aria-label": ariaLabel,
352
- "aria-disabled": ariaDisabled,
353
- "data-testid": dataTestId
354
- }, ref) => {
355
- const handleChangeText = (text) => {
356
- onChangeText?.(text);
357
- if (onChange) {
358
- const syntheticEvent = {
359
- target: { value: text },
360
- currentTarget: { value: text },
361
- type: "change",
362
- nativeEvent: { text },
363
- preventDefault: () => {
364
- },
365
- stopPropagation: () => {
366
- },
367
- isTrusted: false
368
- };
369
- onChange(syntheticEvent);
370
- }
371
- };
372
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
373
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
374
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
375
- import_react_native6.TextInput,
376
- {
377
- ref,
378
- value,
379
- placeholder,
380
- onChangeText: handleChangeText,
381
- onFocus,
382
- onBlur,
383
- onKeyPress: (e) => {
384
- if (onKeyDown) {
385
- onKeyDown({
386
- key: e.nativeEvent.key,
387
- preventDefault: () => {
388
- }
389
- });
390
- }
391
- },
392
- editable: !disabled,
393
- secureTextEntry: secureTextEntry || type === "password",
394
- keyboardType,
395
- textContentType,
396
- style: [
397
- {
398
- color,
399
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
400
- flex: 1,
401
- padding: 0,
402
- textAlign: style?.textAlign || "left"
403
- },
404
- style
405
- ],
406
- placeholderTextColor,
407
- maxLength,
408
- testID: dataTestId || id,
409
- accessibilityLabel: ariaLabel,
410
- accessibilityHint: ariaDescribedBy,
411
- accessibilityState: {
412
- disabled: disabled || ariaDisabled
413
- },
414
- accessible: true
415
- }
416
- );
417
- }
418
- );
419
- InputPrimitive.displayName = "InputPrimitive";
420
-
421
- // ../primitives-native/src/TextArea.tsx
422
- var import_react3 = require("react");
423
- var import_react_native7 = require("react-native");
424
- var import_jsx_runtime7 = require("react/jsx-runtime");
425
- var TextAreaPrimitive = (0, import_react3.forwardRef)(
426
- ({
427
- value,
428
- placeholder,
429
- onChange,
430
- onChangeText,
431
- onFocus,
432
- onBlur,
433
- onKeyDown,
434
- disabled,
435
- style,
436
- color,
437
- fontSize,
438
- placeholderTextColor,
439
- maxLength,
440
- rows,
441
- id,
442
- "aria-describedby": ariaDescribedBy,
443
- "aria-label": ariaLabel,
444
- "aria-disabled": ariaDisabled,
445
- "data-testid": dataTestId
446
- }, ref) => {
447
- const handleChangeText = (text) => {
448
- onChangeText?.(text);
449
- if (onChange) {
450
- const syntheticEvent = {
451
- target: { value: text },
452
- currentTarget: { value: text },
453
- type: "change",
454
- nativeEvent: { text },
455
- preventDefault: () => {
456
- },
457
- stopPropagation: () => {
458
- },
459
- isTrusted: false
460
- };
461
- onChange(syntheticEvent);
462
- }
463
- };
464
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
465
- import_react_native7.TextInput,
466
- {
467
- ref,
468
- value,
469
- placeholder,
470
- onChangeText: handleChangeText,
471
- onFocus,
472
- onBlur,
473
- onKeyPress: (e) => {
474
- if (onKeyDown) {
475
- onKeyDown({
476
- key: e.nativeEvent.key,
477
- preventDefault: () => {
478
- }
479
- });
480
- }
481
- },
482
- editable: !disabled,
483
- multiline: true,
484
- numberOfLines: rows || 4,
485
- style: [
486
- {
487
- color,
488
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
489
- flex: 1,
490
- padding: 0,
491
- textAlignVertical: "top",
492
- textAlign: style?.textAlign || "left"
493
- },
494
- style
495
- ],
496
- placeholderTextColor,
497
- maxLength,
498
- testID: dataTestId || id,
499
- accessibilityLabel: ariaLabel,
500
- accessibilityHint: ariaDescribedBy,
501
- accessibilityState: {
502
- disabled: disabled || ariaDisabled
503
- },
504
- accessible: true
505
- }
506
- );
507
- }
508
- );
509
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
510
-
511
252
  // src/Divider.tsx
512
253
  var import_xui_core = require("@xsolla/xui-core");
513
- var import_jsx_runtime8 = require("react/jsx-runtime");
254
+ var import_jsx_runtime4 = require("react/jsx-runtime");
514
255
  var Divider2 = ({
515
256
  size = "md",
516
257
  title,
@@ -523,14 +264,14 @@ var Divider2 = ({
523
264
  const accessibilityProps = decorative ? { "aria-hidden": true } : { role: "separator" };
524
265
  const sizeConfig = theme.sizing.divider(size);
525
266
  if (!title) {
526
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
267
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
527
268
  Box,
528
269
  {
529
270
  height: sizeConfig.height,
530
271
  justifyContent: "center",
531
272
  width: "100%",
532
273
  ...accessibilityProps,
533
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
274
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
534
275
  Divider,
535
276
  {
536
277
  color: dividerColor,
@@ -542,13 +283,13 @@ var Divider2 = ({
542
283
  }
543
284
  );
544
285
  }
545
- const renderLine = (flex = 1) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
286
+ const renderLine = (flex = 1) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
546
287
  Box,
547
288
  {
548
289
  flex,
549
290
  justifyContent: "center",
550
291
  "aria-hidden": decorative || void 0,
551
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
292
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
552
293
  Divider,
553
294
  {
554
295
  color: dividerColor,
@@ -559,12 +300,12 @@ var Divider2 = ({
559
300
  )
560
301
  }
561
302
  );
562
- const renderTitle = () => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
303
+ const renderTitle = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
563
304
  Box,
564
305
  {
565
306
  paddingHorizontal: theme.spacing.s,
566
307
  "aria-hidden": decorative || void 0,
567
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
308
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
568
309
  Text,
569
310
  {
570
311
  color: theme.colors.content.tertiary,
@@ -576,7 +317,7 @@ var Divider2 = ({
576
317
  )
577
318
  }
578
319
  );
579
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
320
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
580
321
  Box,
581
322
  {
582
323
  flexDirection: "row",
@@ -585,16 +326,16 @@ var Divider2 = ({
585
326
  width: "100%",
586
327
  ...accessibilityProps,
587
328
  children: [
588
- titlePosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
329
+ titlePosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
589
330
  renderTitle(),
590
331
  renderLine()
591
332
  ] }),
592
- titlePosition === "center" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
333
+ titlePosition === "center" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
593
334
  renderLine(),
594
335
  renderTitle(),
595
336
  renderLine()
596
337
  ] }),
597
- titlePosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
338
+ titlePosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
598
339
  renderLine(),
599
340
  renderTitle()
600
341
  ] })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.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","../../src/Divider.tsx"],"sourcesContent":["export * from \"./Divider\";\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 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 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 type,\n inputMode,\n autoComplete,\n id,\n \"aria-describedby\": ariaDescribedBy,\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-describedby\": ariaDescribedBy,\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","import type React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Divider as DividerPrimitive } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\n\nexport interface DividerProps {\n size?: \"lg\" | \"md\" | \"sm\";\n title?: string;\n titlePosition?: \"left\" | \"center\" | \"right\";\n dashStroke?: boolean;\n /**\n * When true, the divider is purely decorative and will be hidden from screen readers.\n * @default false\n */\n decorative?: boolean;\n}\n\nexport const Divider: React.FC<DividerProps> = ({\n size = \"md\",\n title,\n titlePosition = \"left\",\n dashStroke = false,\n decorative = false,\n}) => {\n const { theme } = useDesignSystem();\n\n const dividerColor = theme.colors.border.secondary;\n\n // Accessibility attributes for the wrapper\n const accessibilityProps = decorative\n ? { \"aria-hidden\": true as const }\n : { role: \"separator\" as const };\n\n const sizeConfig = theme.sizing.divider(size);\n\n if (!title) {\n return (\n <Box\n height={sizeConfig.height}\n justifyContent=\"center\"\n width=\"100%\"\n {...accessibilityProps}\n >\n <DividerPrimitive\n color={dividerColor}\n height={sizeConfig.lineWeight}\n dashStroke={dashStroke}\n aria-hidden={decorative || undefined}\n />\n </Box>\n );\n }\n\n const renderLine = (flex: number = 1) => (\n <Box\n flex={flex}\n justifyContent=\"center\"\n aria-hidden={decorative || undefined}\n >\n <DividerPrimitive\n color={dividerColor}\n height={sizeConfig.lineWeight}\n dashStroke={dashStroke}\n aria-hidden={decorative || undefined}\n />\n </Box>\n );\n\n const renderTitle = () => (\n <Box\n paddingHorizontal={theme.spacing.s}\n aria-hidden={decorative || undefined}\n >\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizeConfig.fontSize}\n fontWeight=\"500\"\n aria-hidden={decorative || undefined}\n >\n {title.toUpperCase()}\n </Text>\n </Box>\n );\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n height={sizeConfig.height}\n width=\"100%\"\n {...accessibilityProps}\n >\n {titlePosition === \"left\" && (\n <>\n {renderTitle()}\n {renderLine()}\n </>\n )}\n {titlePosition === \"center\" && (\n <>\n {renderLine()}\n {renderTitle()}\n {renderLine()}\n </>\n )}\n {titlePosition === \"right\" && (\n <>\n {renderLine()}\n {renderTitle()}\n </>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACCA,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;AAA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;AAAA,UACX,YAAY;AAAA,WACf;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["Divider","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","Divider"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Divider.tsx","../../src/Divider.tsx"],"sourcesContent":["export * from \"./Divider\";\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 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 type React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Divider as DividerPrimitive } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\n\nexport interface DividerProps {\n size?: \"lg\" | \"md\" | \"sm\";\n title?: string;\n titlePosition?: \"left\" | \"center\" | \"right\";\n dashStroke?: boolean;\n /**\n * When true, the divider is purely decorative and will be hidden from screen readers.\n * @default false\n */\n decorative?: boolean;\n}\n\nexport const Divider: React.FC<DividerProps> = ({\n size = \"md\",\n title,\n titlePosition = \"left\",\n dashStroke = false,\n decorative = false,\n}) => {\n const { theme } = useDesignSystem();\n\n const dividerColor = theme.colors.border.secondary;\n\n // Accessibility attributes for the wrapper\n const accessibilityProps = decorative\n ? { \"aria-hidden\": true as const }\n : { role: \"separator\" as const };\n\n const sizeConfig = theme.sizing.divider(size);\n\n if (!title) {\n return (\n <Box\n height={sizeConfig.height}\n justifyContent=\"center\"\n width=\"100%\"\n {...accessibilityProps}\n >\n <DividerPrimitive\n color={dividerColor}\n height={sizeConfig.lineWeight}\n dashStroke={dashStroke}\n aria-hidden={decorative || undefined}\n />\n </Box>\n );\n }\n\n const renderLine = (flex: number = 1) => (\n <Box\n flex={flex}\n justifyContent=\"center\"\n aria-hidden={decorative || undefined}\n >\n <DividerPrimitive\n color={dividerColor}\n height={sizeConfig.lineWeight}\n dashStroke={dashStroke}\n aria-hidden={decorative || undefined}\n />\n </Box>\n );\n\n const renderTitle = () => (\n <Box\n paddingHorizontal={theme.spacing.s}\n aria-hidden={decorative || undefined}\n >\n <Text\n color={theme.colors.content.tertiary}\n fontSize={sizeConfig.fontSize}\n fontWeight=\"500\"\n aria-hidden={decorative || undefined}\n >\n {title.toUpperCase()}\n </Text>\n </Box>\n );\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n height={sizeConfig.height}\n width=\"100%\"\n {...accessibilityProps}\n >\n {titlePosition === \"left\" && (\n <>\n {renderTitle()}\n {renderLine()}\n </>\n )}\n {titlePosition === \"center\" && (\n <>\n {renderLine()}\n {renderTitle()}\n {renderLine()}\n </>\n )}\n {titlePosition === \"right\" && (\n <>\n {renderLine()}\n {renderTitle()}\n </>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACCA,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,C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,mBAAmB,MAAM,QAAQ;AAAA,MACjC,eAAa,cAAc;AAAA,MAE3B;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,MAAM,OAAO,QAAQ;AAAA,UAC5B,UAAU,WAAW;AAAA,UACrB,YAAW;AAAA,UACX,eAAa,cAAc;AAAA,UAE1B,gBAAM,YAAY;AAAA;AAAA,MACrB;AAAA;AAAA,EACF;AAGF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAc;AAAA,MACd,YAAW;AAAA,MACX,QAAQ,WAAW;AAAA,MACnB,OAAM;AAAA,MACL,GAAG;AAAA,MAEH;AAAA,0BAAkB,UACjB,8EACG;AAAA,sBAAY;AAAA,UACZ,WAAW;AAAA,WACd;AAAA,QAED,kBAAkB,YACjB,8EACG;AAAA,qBAAW;AAAA,UACX,YAAY;AAAA,UACZ,WAAW;AAAA,WACd;AAAA,QAED,kBAAkB,WACjB,8EACG;AAAA,qBAAW;AAAA,UACX,YAAY;AAAA,WACf;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["Divider","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","import_jsx_runtime","Divider"]}