@xsolla/xui-bounding 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
@@ -35,7 +25,7 @@ __export(index_exports, {
35
25
  module.exports = __toCommonJS(index_exports);
36
26
 
37
27
  // src/Bounding.tsx
38
- var import_react4 = require("react");
28
+ var import_react = require("react");
39
29
 
40
30
  // ../primitives-native/src/Box.tsx
41
31
  var import_react_native = require("react-native");
@@ -203,266 +193,9 @@ var Box = ({
203
193
  );
204
194
  };
205
195
 
206
- // ../primitives-native/src/Text.tsx
207
- var import_react_native2 = require("react-native");
208
- var import_jsx_runtime2 = require("react/jsx-runtime");
209
-
210
- // ../primitives-native/src/Spinner.tsx
211
- var import_react_native3 = require("react-native");
212
- var import_jsx_runtime3 = require("react/jsx-runtime");
213
- var Spinner = ({
214
- color,
215
- size,
216
- role,
217
- "aria-label": ariaLabel,
218
- "aria-live": ariaLive,
219
- testID
220
- }) => {
221
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
222
- import_react_native3.View,
223
- {
224
- accessible: true,
225
- accessibilityRole: role === "status" ? "none" : void 0,
226
- accessibilityLabel: ariaLabel,
227
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
228
- testID,
229
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
230
- import_react_native3.ActivityIndicator,
231
- {
232
- color,
233
- size: typeof size === "number" ? size : "small"
234
- }
235
- )
236
- }
237
- );
238
- };
239
- Spinner.displayName = "Spinner";
240
-
241
- // ../primitives-native/src/Icon.tsx
242
- var import_react = __toESM(require("react"));
243
- var import_react_native4 = require("react-native");
244
- var import_jsx_runtime4 = require("react/jsx-runtime");
245
-
246
- // ../primitives-native/src/Divider.tsx
247
- var import_react_native5 = require("react-native");
248
- var import_jsx_runtime5 = require("react/jsx-runtime");
249
-
250
- // ../primitives-native/src/Input.tsx
251
- var import_react2 = require("react");
252
- var import_react_native6 = require("react-native");
253
- var import_jsx_runtime6 = require("react/jsx-runtime");
254
- var keyboardTypeMap = {
255
- text: "default",
256
- number: "numeric",
257
- email: "email-address",
258
- tel: "phone-pad",
259
- url: "url",
260
- decimal: "decimal-pad"
261
- };
262
- var inputModeToKeyboardType = {
263
- none: "default",
264
- text: "default",
265
- decimal: "decimal-pad",
266
- numeric: "number-pad",
267
- tel: "phone-pad",
268
- search: "default",
269
- email: "email-address",
270
- url: "url"
271
- };
272
- var autoCompleteToTextContentType = {
273
- "one-time-code": "oneTimeCode",
274
- email: "emailAddress",
275
- username: "username",
276
- password: "password",
277
- "new-password": "newPassword",
278
- tel: "telephoneNumber",
279
- "postal-code": "postalCode",
280
- name: "name"
281
- };
282
- var InputPrimitive = (0, import_react2.forwardRef)(
283
- ({
284
- value,
285
- placeholder,
286
- onChange,
287
- onChangeText,
288
- onFocus,
289
- onBlur,
290
- onKeyDown,
291
- disabled,
292
- secureTextEntry,
293
- style,
294
- color,
295
- fontSize,
296
- placeholderTextColor,
297
- maxLength,
298
- type,
299
- inputMode,
300
- autoComplete,
301
- id,
302
- "aria-describedby": ariaDescribedBy,
303
- "aria-label": ariaLabel,
304
- "aria-disabled": ariaDisabled,
305
- "data-testid": dataTestId
306
- }, ref) => {
307
- const handleChangeText = (text) => {
308
- onChangeText?.(text);
309
- if (onChange) {
310
- const syntheticEvent = {
311
- target: { value: text },
312
- currentTarget: { value: text },
313
- type: "change",
314
- nativeEvent: { text },
315
- preventDefault: () => {
316
- },
317
- stopPropagation: () => {
318
- },
319
- isTrusted: false
320
- };
321
- onChange(syntheticEvent);
322
- }
323
- };
324
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
325
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
326
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
327
- import_react_native6.TextInput,
328
- {
329
- ref,
330
- value,
331
- placeholder,
332
- onChangeText: handleChangeText,
333
- onFocus,
334
- onBlur,
335
- onKeyPress: (e) => {
336
- if (onKeyDown) {
337
- onKeyDown({
338
- key: e.nativeEvent.key,
339
- preventDefault: () => {
340
- }
341
- });
342
- }
343
- },
344
- editable: !disabled,
345
- secureTextEntry: secureTextEntry || type === "password",
346
- keyboardType,
347
- textContentType,
348
- style: [
349
- {
350
- color,
351
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
352
- flex: 1,
353
- padding: 0,
354
- textAlign: style?.textAlign || "left"
355
- },
356
- style
357
- ],
358
- placeholderTextColor,
359
- maxLength,
360
- testID: dataTestId || id,
361
- accessibilityLabel: ariaLabel,
362
- accessibilityHint: ariaDescribedBy,
363
- accessibilityState: {
364
- disabled: disabled || ariaDisabled
365
- },
366
- accessible: true
367
- }
368
- );
369
- }
370
- );
371
- InputPrimitive.displayName = "InputPrimitive";
372
-
373
- // ../primitives-native/src/TextArea.tsx
374
- var import_react3 = require("react");
375
- var import_react_native7 = require("react-native");
376
- var import_jsx_runtime7 = require("react/jsx-runtime");
377
- var TextAreaPrimitive = (0, import_react3.forwardRef)(
378
- ({
379
- value,
380
- placeholder,
381
- onChange,
382
- onChangeText,
383
- onFocus,
384
- onBlur,
385
- onKeyDown,
386
- disabled,
387
- style,
388
- color,
389
- fontSize,
390
- placeholderTextColor,
391
- maxLength,
392
- rows,
393
- id,
394
- "aria-describedby": ariaDescribedBy,
395
- "aria-label": ariaLabel,
396
- "aria-disabled": ariaDisabled,
397
- "data-testid": dataTestId
398
- }, ref) => {
399
- const handleChangeText = (text) => {
400
- onChangeText?.(text);
401
- if (onChange) {
402
- const syntheticEvent = {
403
- target: { value: text },
404
- currentTarget: { value: text },
405
- type: "change",
406
- nativeEvent: { text },
407
- preventDefault: () => {
408
- },
409
- stopPropagation: () => {
410
- },
411
- isTrusted: false
412
- };
413
- onChange(syntheticEvent);
414
- }
415
- };
416
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
417
- import_react_native7.TextInput,
418
- {
419
- ref,
420
- value,
421
- placeholder,
422
- onChangeText: handleChangeText,
423
- onFocus,
424
- onBlur,
425
- onKeyPress: (e) => {
426
- if (onKeyDown) {
427
- onKeyDown({
428
- key: e.nativeEvent.key,
429
- preventDefault: () => {
430
- }
431
- });
432
- }
433
- },
434
- editable: !disabled,
435
- multiline: true,
436
- numberOfLines: rows || 4,
437
- style: [
438
- {
439
- color,
440
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
441
- flex: 1,
442
- padding: 0,
443
- textAlignVertical: "top",
444
- textAlign: style?.textAlign || "left"
445
- },
446
- style
447
- ],
448
- placeholderTextColor,
449
- maxLength,
450
- testID: dataTestId || id,
451
- accessibilityLabel: ariaLabel,
452
- accessibilityHint: ariaDescribedBy,
453
- accessibilityState: {
454
- disabled: disabled || ariaDisabled
455
- },
456
- accessible: true
457
- }
458
- );
459
- }
460
- );
461
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
462
-
463
196
  // src/Bounding.tsx
464
- var import_jsx_runtime8 = require("react/jsx-runtime");
465
- var Bounding = (0, import_react4.forwardRef)(
197
+ var import_jsx_runtime2 = require("react/jsx-runtime");
198
+ var Bounding = (0, import_react.forwardRef)(
466
199
  ({
467
200
  children,
468
201
  flexible = false,
@@ -471,7 +204,7 @@ var Bounding = (0, import_react4.forwardRef)(
471
204
  minWidth,
472
205
  ...rest
473
206
  }, ref) => {
474
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
207
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
475
208
  Box,
476
209
  {
477
210
  ...rest,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/Bounding.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 \"./Bounding\";\nexport * from \"./types\";\n","import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport type { BoundingProps } from \"./types\";\n\nexport const Bounding = forwardRef<any, BoundingProps>(\n (\n {\n children,\n flexible = false,\n minimal = false,\n maxWidth,\n minWidth,\n ...rest\n },\n ref\n ) => {\n return (\n <Box\n {...rest}\n ref={ref}\n position=\"relative\"\n display={flexible ? \"inline-flex\" : \"flex\"}\n flexDirection=\"column\"\n minWidth={minimal ? \"auto\" : (minWidth ?? 140)}\n maxWidth={maxWidth ?? 400}\n >\n {children}\n </Box>\n );\n }\n);\n\nBounding.displayName = \"Bounding\";\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;;;ACAA,IAAAA,gBAA2B;;;ACC3B,0BAQO;AAmID;AAhIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AA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AAA,cACR,KAAK,EAAE,YAAY;AAAA,cACnB,gBAAgB,MAAM;AAAA,cAAC;AAAA,YACzB,CAAQ;AAAA,UACV;AAAA,QACF;AAAA,QACA,UAAU,CAAC;AAAA,QACX,WAAW;AAAA,QACX,eAAe,QAAQ;AAAA,QACvB,OAAO;AAAA,UACL;AAAA,YACE;AAAA,YACA,UAAU,OAAO,aAAa,WAAW,WAAW;AAAA,YACpD,MAAM;AAAA,YACN,SAAS;AAAA,YACT,mBAAmB;AAAA,YACnB,WAAY,OAAe,aAAa;AAAA,UAC1C;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA,QAAQ,cAAc;AAAA,QACtB,oBAAoB;AAAA,QACpB,mBAAmB;AAAA,QACnB,oBAAoB;AAAA,UAClB,UAAU,YAAY;AAAA,QACxB;AAAA,QACA,YAAY;AAAA;AAAA,IACd;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;;;AP3E1B,IAAAC,sBAAA;AAbC,IAAM,eAAW;AAAA,EACtB,CACE;AAAA,IACE;AAAA,IACA,WAAW;AAAA,IACX,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,UAAS;AAAA,QACT,SAAS,WAAW,gBAAgB;AAAA,QACpC,eAAc;AAAA,QACd,UAAU,UAAU,SAAU,YAAY;AAAA,QAC1C,UAAU,YAAY;AAAA,QAErB;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;","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/Bounding.tsx","../../../primitives-native/src/Box.tsx"],"sourcesContent":["export * from \"./Bounding\";\nexport * from \"./types\";\n","import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport type { BoundingProps } from \"./types\";\n\nexport const Bounding = forwardRef<any, BoundingProps>(\n (\n {\n children,\n flexible = false,\n minimal = false,\n maxWidth,\n minWidth,\n ...rest\n },\n ref\n ) => {\n return (\n <Box\n {...rest}\n ref={ref}\n position=\"relative\"\n display={flexible ? \"inline-flex\" : \"flex\"}\n flexDirection=\"column\"\n minWidth={minimal ? \"auto\" : (minWidth ?? 140)}\n maxWidth={maxWidth ?? 400}\n >\n {children}\n </Box>\n );\n }\n);\n\nBounding.displayName = \"Bounding\";\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;;;ACAA,mBAA2B;;;ACC3B,0BAQO;AAmID;AAhIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;;;ADtKM,IAAAA,sBAAA;AAbC,IAAM,eAAW;AAAA,EACtB,CACE;AAAA,IACE;AAAA,IACA,WAAW;AAAA,IACX,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,UAAS;AAAA,QACT,SAAS,WAAW,gBAAgB;AAAA,QACpC,eAAc;AAAA,QACd,UAAU,UAAU,SAAU,YAAY;AAAA,QAC1C,UAAU,YAAY;AAAA,QAErB;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;","names":["import_jsx_runtime"]}
package/native/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/Bounding.tsx
2
- import { forwardRef as forwardRef3 } from "react";
2
+ import { forwardRef } from "react";
3
3
 
4
4
  // ../primitives-native/src/Box.tsx
5
5
  import {
@@ -171,266 +171,9 @@ 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/Bounding.tsx
432
- import { jsx as jsx8 } from "react/jsx-runtime";
433
- var Bounding = forwardRef3(
175
+ import { jsx as jsx2 } from "react/jsx-runtime";
176
+ var Bounding = forwardRef(
434
177
  ({
435
178
  children,
436
179
  flexible = false,
@@ -439,7 +182,7 @@ var Bounding = forwardRef3(
439
182
  minWidth,
440
183
  ...rest
441
184
  }, ref) => {
442
- return /* @__PURE__ */ jsx8(
185
+ return /* @__PURE__ */ jsx2(
443
186
  Box,
444
187
  {
445
188
  ...rest,