@xsolla/xui-radio-group 0.89.0 → 0.90.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
@@ -36,7 +26,7 @@ __export(index_exports, {
36
26
  module.exports = __toCommonJS(index_exports);
37
27
 
38
28
  // src/RadioGroup.tsx
39
- var import_react4 = require("react");
29
+ var import_react = require("react");
40
30
 
41
31
  // ../primitives-native/src/Box.tsx
42
32
  var import_react_native = require("react-native");
@@ -204,267 +194,10 @@ var Box = ({
204
194
  );
205
195
  };
206
196
 
207
- // ../primitives-native/src/Text.tsx
208
- var import_react_native2 = require("react-native");
209
- var import_jsx_runtime2 = require("react/jsx-runtime");
210
-
211
- // ../primitives-native/src/Spinner.tsx
212
- var import_react_native3 = require("react-native");
213
- var import_jsx_runtime3 = require("react/jsx-runtime");
214
- var Spinner = ({
215
- color,
216
- size,
217
- role,
218
- "aria-label": ariaLabel,
219
- "aria-live": ariaLive,
220
- testID
221
- }) => {
222
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
223
- import_react_native3.View,
224
- {
225
- accessible: true,
226
- accessibilityRole: role === "status" ? "none" : void 0,
227
- accessibilityLabel: ariaLabel,
228
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
229
- testID,
230
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
231
- import_react_native3.ActivityIndicator,
232
- {
233
- color,
234
- size: typeof size === "number" ? size : "small"
235
- }
236
- )
237
- }
238
- );
239
- };
240
- Spinner.displayName = "Spinner";
241
-
242
- // ../primitives-native/src/Icon.tsx
243
- var import_react = __toESM(require("react"));
244
- var import_react_native4 = require("react-native");
245
- var import_jsx_runtime4 = require("react/jsx-runtime");
246
-
247
- // ../primitives-native/src/Divider.tsx
248
- var import_react_native5 = require("react-native");
249
- var import_jsx_runtime5 = require("react/jsx-runtime");
250
-
251
- // ../primitives-native/src/Input.tsx
252
- var import_react2 = require("react");
253
- var import_react_native6 = require("react-native");
254
- var import_jsx_runtime6 = require("react/jsx-runtime");
255
- var keyboardTypeMap = {
256
- text: "default",
257
- number: "numeric",
258
- email: "email-address",
259
- tel: "phone-pad",
260
- url: "url",
261
- decimal: "decimal-pad"
262
- };
263
- var inputModeToKeyboardType = {
264
- none: "default",
265
- text: "default",
266
- decimal: "decimal-pad",
267
- numeric: "number-pad",
268
- tel: "phone-pad",
269
- search: "default",
270
- email: "email-address",
271
- url: "url"
272
- };
273
- var autoCompleteToTextContentType = {
274
- "one-time-code": "oneTimeCode",
275
- email: "emailAddress",
276
- username: "username",
277
- password: "password",
278
- "new-password": "newPassword",
279
- tel: "telephoneNumber",
280
- "postal-code": "postalCode",
281
- name: "name"
282
- };
283
- var InputPrimitive = (0, import_react2.forwardRef)(
284
- ({
285
- value,
286
- placeholder,
287
- onChange,
288
- onChangeText,
289
- onFocus,
290
- onBlur,
291
- onKeyDown,
292
- disabled,
293
- secureTextEntry,
294
- style,
295
- color,
296
- fontSize,
297
- placeholderTextColor,
298
- maxLength,
299
- type,
300
- inputMode,
301
- autoComplete,
302
- id,
303
- "aria-describedby": ariaDescribedBy,
304
- "aria-label": ariaLabel,
305
- "aria-disabled": ariaDisabled,
306
- "data-testid": dataTestId
307
- }, ref) => {
308
- const handleChangeText = (text) => {
309
- onChangeText?.(text);
310
- if (onChange) {
311
- const syntheticEvent = {
312
- target: { value: text },
313
- currentTarget: { value: text },
314
- type: "change",
315
- nativeEvent: { text },
316
- preventDefault: () => {
317
- },
318
- stopPropagation: () => {
319
- },
320
- isTrusted: false
321
- };
322
- onChange(syntheticEvent);
323
- }
324
- };
325
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
326
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
327
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
328
- import_react_native6.TextInput,
329
- {
330
- ref,
331
- value,
332
- placeholder,
333
- onChangeText: handleChangeText,
334
- onFocus,
335
- onBlur,
336
- onKeyPress: (e) => {
337
- if (onKeyDown) {
338
- onKeyDown({
339
- key: e.nativeEvent.key,
340
- preventDefault: () => {
341
- }
342
- });
343
- }
344
- },
345
- editable: !disabled,
346
- secureTextEntry: secureTextEntry || type === "password",
347
- keyboardType,
348
- textContentType,
349
- style: [
350
- {
351
- color,
352
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
353
- flex: 1,
354
- padding: 0,
355
- textAlign: style?.textAlign || "left"
356
- },
357
- style
358
- ],
359
- placeholderTextColor,
360
- maxLength,
361
- testID: dataTestId || id,
362
- accessibilityLabel: ariaLabel,
363
- accessibilityHint: ariaDescribedBy,
364
- accessibilityState: {
365
- disabled: disabled || ariaDisabled
366
- },
367
- accessible: true
368
- }
369
- );
370
- }
371
- );
372
- InputPrimitive.displayName = "InputPrimitive";
373
-
374
- // ../primitives-native/src/TextArea.tsx
375
- var import_react3 = require("react");
376
- var import_react_native7 = require("react-native");
377
- var import_jsx_runtime7 = require("react/jsx-runtime");
378
- var TextAreaPrimitive = (0, import_react3.forwardRef)(
379
- ({
380
- value,
381
- placeholder,
382
- onChange,
383
- onChangeText,
384
- onFocus,
385
- onBlur,
386
- onKeyDown,
387
- disabled,
388
- style,
389
- color,
390
- fontSize,
391
- placeholderTextColor,
392
- maxLength,
393
- rows,
394
- id,
395
- "aria-describedby": ariaDescribedBy,
396
- "aria-label": ariaLabel,
397
- "aria-disabled": ariaDisabled,
398
- "data-testid": dataTestId
399
- }, ref) => {
400
- const handleChangeText = (text) => {
401
- onChangeText?.(text);
402
- if (onChange) {
403
- const syntheticEvent = {
404
- target: { value: text },
405
- currentTarget: { value: text },
406
- type: "change",
407
- nativeEvent: { text },
408
- preventDefault: () => {
409
- },
410
- stopPropagation: () => {
411
- },
412
- isTrusted: false
413
- };
414
- onChange(syntheticEvent);
415
- }
416
- };
417
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
418
- import_react_native7.TextInput,
419
- {
420
- ref,
421
- value,
422
- placeholder,
423
- onChangeText: handleChangeText,
424
- onFocus,
425
- onBlur,
426
- onKeyPress: (e) => {
427
- if (onKeyDown) {
428
- onKeyDown({
429
- key: e.nativeEvent.key,
430
- preventDefault: () => {
431
- }
432
- });
433
- }
434
- },
435
- editable: !disabled,
436
- multiline: true,
437
- numberOfLines: rows || 4,
438
- style: [
439
- {
440
- color,
441
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
442
- flex: 1,
443
- padding: 0,
444
- textAlignVertical: "top",
445
- textAlign: style?.textAlign || "left"
446
- },
447
- style
448
- ],
449
- placeholderTextColor,
450
- maxLength,
451
- testID: dataTestId || id,
452
- accessibilityLabel: ariaLabel,
453
- accessibilityHint: ariaDescribedBy,
454
- accessibilityState: {
455
- disabled: disabled || ariaDisabled
456
- },
457
- accessible: true
458
- }
459
- );
460
- }
461
- );
462
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
463
-
464
197
  // src/RadioGroup.tsx
465
- var import_jsx_runtime8 = require("react/jsx-runtime");
466
- var RadioGroupContext = (0, import_react4.createContext)({});
467
- var useRadioGroup = () => (0, import_react4.useContext)(RadioGroupContext);
198
+ var import_jsx_runtime2 = require("react/jsx-runtime");
199
+ var RadioGroupContext = (0, import_react.createContext)({});
200
+ var useRadioGroup = () => (0, import_react.useContext)(RadioGroupContext);
468
201
  var RadioGroup = ({
469
202
  value,
470
203
  onChange,
@@ -474,7 +207,7 @@ var RadioGroup = ({
474
207
  flexDirection = "column",
475
208
  gap = 12
476
209
  }) => {
477
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadioGroupContext.Provider, { value: { value, onChange, size, disabled }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Box, { flexDirection, gap, children }) });
210
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadioGroupContext.Provider, { value: { value, onChange, size, disabled }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box, { flexDirection, gap, children }) });
478
211
  };
479
212
  // Annotate the CommonJS export names for ESM import in node:
480
213
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/RadioGroup.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 \"./RadioGroup\";\n","import React, { createContext, useContext } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\n\nexport interface RadioGroupContextProps {\n value?: string;\n onChange?: (value: string) => void;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n disabled?: boolean;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({});\n\nexport const useRadioGroup = () => useContext(RadioGroupContext);\n\nexport interface RadioGroupProps {\n value?: string;\n onChange?: (value: string) => void;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n disabled?: boolean;\n children: React.ReactNode;\n flexDirection?: \"row\" | \"column\";\n gap?: number;\n}\n\nexport const RadioGroup: React.FC<RadioGroupProps> = ({\n value,\n onChange,\n size = \"md\",\n disabled = false,\n children,\n flexDirection = \"column\",\n gap = 12,\n}) => {\n return (\n <RadioGroupContext.Provider value={{ value, onChange, size, disabled }}>\n <Box flexDirection={flexDirection} gap={gap}>\n {children}\n </Box>\n </RadioGroupContext.Provider>\n );\n};\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAiD;;;ACCjD,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,E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AYxD,IAAM,aAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,WAAW;AAAA,EACX;AAAA,EACA,gBAAgB;AAAA,EAChB,MAAM;AACR,MAAM;AACJ,SACE,6CAAC,kBAAkB,UAAlB,EAA2B,OAAO,EAAE,OAAO,UAAU,MAAM,SAAS,GACnE,uDAAC,OAAI,eAA8B,KAChC,UACH,GACF;AAEJ;","names":["import_react","import_react_native","import_jsx_runtime","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"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/RadioGroup.tsx","../../../primitives-native/src/Box.tsx"],"sourcesContent":["export * from \"./RadioGroup\";\n","import React, { createContext, useContext } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\n\nexport interface RadioGroupContextProps {\n value?: string;\n onChange?: (value: string) => void;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n disabled?: boolean;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextProps>({});\n\nexport const useRadioGroup = () => useContext(RadioGroupContext);\n\nexport interface RadioGroupProps {\n value?: string;\n onChange?: (value: string) => void;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n disabled?: boolean;\n children: React.ReactNode;\n flexDirection?: \"row\" | \"column\";\n gap?: number;\n}\n\nexport const RadioGroup: React.FC<RadioGroupProps> = ({\n value,\n onChange,\n size = \"md\",\n disabled = false,\n children,\n flexDirection = \"column\",\n gap = 12,\n}) => {\n return (\n <RadioGroupContext.Provider value={{ value, onChange, size, disabled }}>\n <Box flexDirection={flexDirection} gap={gap}>\n {children}\n </Box>\n </RadioGroupContext.Provider>\n );\n};\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAiD;;;ACCjD,0BAQO;AAmID;AAhIC,IAAM,MAA0B,CAAC;AAAA,EACt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HANGED
@@ -171,265 +171,8 @@ var Box = ({
171
171
  );
172
172
  };
173
173
 
174
- // ../primitives-native/src/Text.tsx
175
- import { Text as RNText } from "react-native";
176
- import { jsx as jsx2 } from "react/jsx-runtime";
177
-
178
- // ../primitives-native/src/Spinner.tsx
179
- import { ActivityIndicator, View as View2 } from "react-native";
180
- import { jsx as jsx3 } from "react/jsx-runtime";
181
- var Spinner = ({
182
- color,
183
- size,
184
- role,
185
- "aria-label": ariaLabel,
186
- "aria-live": ariaLive,
187
- testID
188
- }) => {
189
- return /* @__PURE__ */ jsx3(
190
- View2,
191
- {
192
- accessible: true,
193
- accessibilityRole: role === "status" ? "none" : void 0,
194
- accessibilityLabel: ariaLabel,
195
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
196
- testID,
197
- children: /* @__PURE__ */ jsx3(
198
- ActivityIndicator,
199
- {
200
- color,
201
- size: typeof size === "number" ? size : "small"
202
- }
203
- )
204
- }
205
- );
206
- };
207
- Spinner.displayName = "Spinner";
208
-
209
- // ../primitives-native/src/Icon.tsx
210
- import React from "react";
211
- import { View as View3 } from "react-native";
212
- import { jsx as jsx4 } from "react/jsx-runtime";
213
-
214
- // ../primitives-native/src/Divider.tsx
215
- import { View as View4 } from "react-native";
216
- import { jsx as jsx5 } from "react/jsx-runtime";
217
-
218
- // ../primitives-native/src/Input.tsx
219
- import { forwardRef } from "react";
220
- import { TextInput as RNTextInput } from "react-native";
221
- import { jsx as jsx6 } from "react/jsx-runtime";
222
- var keyboardTypeMap = {
223
- text: "default",
224
- number: "numeric",
225
- email: "email-address",
226
- tel: "phone-pad",
227
- url: "url",
228
- decimal: "decimal-pad"
229
- };
230
- var inputModeToKeyboardType = {
231
- none: "default",
232
- text: "default",
233
- decimal: "decimal-pad",
234
- numeric: "number-pad",
235
- tel: "phone-pad",
236
- search: "default",
237
- email: "email-address",
238
- url: "url"
239
- };
240
- var autoCompleteToTextContentType = {
241
- "one-time-code": "oneTimeCode",
242
- email: "emailAddress",
243
- username: "username",
244
- password: "password",
245
- "new-password": "newPassword",
246
- tel: "telephoneNumber",
247
- "postal-code": "postalCode",
248
- name: "name"
249
- };
250
- var InputPrimitive = forwardRef(
251
- ({
252
- value,
253
- placeholder,
254
- onChange,
255
- onChangeText,
256
- onFocus,
257
- onBlur,
258
- onKeyDown,
259
- disabled,
260
- secureTextEntry,
261
- style,
262
- color,
263
- fontSize,
264
- placeholderTextColor,
265
- maxLength,
266
- type,
267
- inputMode,
268
- autoComplete,
269
- id,
270
- "aria-describedby": ariaDescribedBy,
271
- "aria-label": ariaLabel,
272
- "aria-disabled": ariaDisabled,
273
- "data-testid": dataTestId
274
- }, ref) => {
275
- const handleChangeText = (text) => {
276
- onChangeText?.(text);
277
- if (onChange) {
278
- const syntheticEvent = {
279
- target: { value: text },
280
- currentTarget: { value: text },
281
- type: "change",
282
- nativeEvent: { text },
283
- preventDefault: () => {
284
- },
285
- stopPropagation: () => {
286
- },
287
- isTrusted: false
288
- };
289
- onChange(syntheticEvent);
290
- }
291
- };
292
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
293
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
294
- return /* @__PURE__ */ jsx6(
295
- RNTextInput,
296
- {
297
- ref,
298
- value,
299
- placeholder,
300
- onChangeText: handleChangeText,
301
- onFocus,
302
- onBlur,
303
- onKeyPress: (e) => {
304
- if (onKeyDown) {
305
- onKeyDown({
306
- key: e.nativeEvent.key,
307
- preventDefault: () => {
308
- }
309
- });
310
- }
311
- },
312
- editable: !disabled,
313
- secureTextEntry: secureTextEntry || type === "password",
314
- keyboardType,
315
- textContentType,
316
- style: [
317
- {
318
- color,
319
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
320
- flex: 1,
321
- padding: 0,
322
- textAlign: style?.textAlign || "left"
323
- },
324
- style
325
- ],
326
- placeholderTextColor,
327
- maxLength,
328
- testID: dataTestId || id,
329
- accessibilityLabel: ariaLabel,
330
- accessibilityHint: ariaDescribedBy,
331
- accessibilityState: {
332
- disabled: disabled || ariaDisabled
333
- },
334
- accessible: true
335
- }
336
- );
337
- }
338
- );
339
- InputPrimitive.displayName = "InputPrimitive";
340
-
341
- // ../primitives-native/src/TextArea.tsx
342
- import { forwardRef as forwardRef2 } from "react";
343
- import { TextInput as RNTextInput2 } from "react-native";
344
- import { jsx as jsx7 } from "react/jsx-runtime";
345
- var TextAreaPrimitive = forwardRef2(
346
- ({
347
- value,
348
- placeholder,
349
- onChange,
350
- onChangeText,
351
- onFocus,
352
- onBlur,
353
- onKeyDown,
354
- disabled,
355
- style,
356
- color,
357
- fontSize,
358
- placeholderTextColor,
359
- maxLength,
360
- rows,
361
- id,
362
- "aria-describedby": ariaDescribedBy,
363
- "aria-label": ariaLabel,
364
- "aria-disabled": ariaDisabled,
365
- "data-testid": dataTestId
366
- }, ref) => {
367
- const handleChangeText = (text) => {
368
- onChangeText?.(text);
369
- if (onChange) {
370
- const syntheticEvent = {
371
- target: { value: text },
372
- currentTarget: { value: text },
373
- type: "change",
374
- nativeEvent: { text },
375
- preventDefault: () => {
376
- },
377
- stopPropagation: () => {
378
- },
379
- isTrusted: false
380
- };
381
- onChange(syntheticEvent);
382
- }
383
- };
384
- return /* @__PURE__ */ jsx7(
385
- RNTextInput2,
386
- {
387
- ref,
388
- value,
389
- placeholder,
390
- onChangeText: handleChangeText,
391
- onFocus,
392
- onBlur,
393
- onKeyPress: (e) => {
394
- if (onKeyDown) {
395
- onKeyDown({
396
- key: e.nativeEvent.key,
397
- preventDefault: () => {
398
- }
399
- });
400
- }
401
- },
402
- editable: !disabled,
403
- multiline: true,
404
- numberOfLines: rows || 4,
405
- style: [
406
- {
407
- color,
408
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
409
- flex: 1,
410
- padding: 0,
411
- textAlignVertical: "top",
412
- textAlign: style?.textAlign || "left"
413
- },
414
- style
415
- ],
416
- placeholderTextColor,
417
- maxLength,
418
- testID: dataTestId || id,
419
- accessibilityLabel: ariaLabel,
420
- accessibilityHint: ariaDescribedBy,
421
- accessibilityState: {
422
- disabled: disabled || ariaDisabled
423
- },
424
- accessible: true
425
- }
426
- );
427
- }
428
- );
429
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
430
-
431
174
  // src/RadioGroup.tsx
432
- import { jsx as jsx8 } from "react/jsx-runtime";
175
+ import { jsx as jsx2 } from "react/jsx-runtime";
433
176
  var RadioGroupContext = createContext({});
434
177
  var useRadioGroup = () => useContext(RadioGroupContext);
435
178
  var RadioGroup = ({
@@ -441,7 +184,7 @@ var RadioGroup = ({
441
184
  flexDirection = "column",
442
185
  gap = 12
443
186
  }) => {
444
- return /* @__PURE__ */ jsx8(RadioGroupContext.Provider, { value: { value, onChange, size, disabled }, children: /* @__PURE__ */ jsx8(Box, { flexDirection, gap, children }) });
187
+ return /* @__PURE__ */ jsx2(RadioGroupContext.Provider, { value: { value, onChange, size, disabled }, children: /* @__PURE__ */ jsx2(Box, { flexDirection, gap, children }) });
445
188
  };
446
189
  export {
447
190
  RadioGroup,