@xsolla/xui-icon-wrapper 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
@@ -200,266 +190,9 @@ var Box = ({
200
190
  );
201
191
  };
202
192
 
203
- // ../primitives-native/src/Text.tsx
204
- var import_react_native2 = require("react-native");
205
- var import_jsx_runtime2 = require("react/jsx-runtime");
206
-
207
- // ../primitives-native/src/Spinner.tsx
208
- var import_react_native3 = require("react-native");
209
- var import_jsx_runtime3 = require("react/jsx-runtime");
210
- var Spinner = ({
211
- color,
212
- size,
213
- role,
214
- "aria-label": ariaLabel,
215
- "aria-live": ariaLive,
216
- testID
217
- }) => {
218
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
219
- import_react_native3.View,
220
- {
221
- accessible: true,
222
- accessibilityRole: role === "status" ? "none" : void 0,
223
- accessibilityLabel: ariaLabel,
224
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
225
- testID,
226
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
227
- import_react_native3.ActivityIndicator,
228
- {
229
- color,
230
- size: typeof size === "number" ? size : "small"
231
- }
232
- )
233
- }
234
- );
235
- };
236
- Spinner.displayName = "Spinner";
237
-
238
- // ../primitives-native/src/Icon.tsx
239
- var import_react = __toESM(require("react"));
240
- var import_react_native4 = require("react-native");
241
- var import_jsx_runtime4 = require("react/jsx-runtime");
242
-
243
- // ../primitives-native/src/Divider.tsx
244
- var import_react_native5 = require("react-native");
245
- var import_jsx_runtime5 = require("react/jsx-runtime");
246
-
247
- // ../primitives-native/src/Input.tsx
248
- var import_react2 = require("react");
249
- var import_react_native6 = require("react-native");
250
- var import_jsx_runtime6 = require("react/jsx-runtime");
251
- var keyboardTypeMap = {
252
- text: "default",
253
- number: "numeric",
254
- email: "email-address",
255
- tel: "phone-pad",
256
- url: "url",
257
- decimal: "decimal-pad"
258
- };
259
- var inputModeToKeyboardType = {
260
- none: "default",
261
- text: "default",
262
- decimal: "decimal-pad",
263
- numeric: "number-pad",
264
- tel: "phone-pad",
265
- search: "default",
266
- email: "email-address",
267
- url: "url"
268
- };
269
- var autoCompleteToTextContentType = {
270
- "one-time-code": "oneTimeCode",
271
- email: "emailAddress",
272
- username: "username",
273
- password: "password",
274
- "new-password": "newPassword",
275
- tel: "telephoneNumber",
276
- "postal-code": "postalCode",
277
- name: "name"
278
- };
279
- var InputPrimitive = (0, import_react2.forwardRef)(
280
- ({
281
- value,
282
- placeholder,
283
- onChange,
284
- onChangeText,
285
- onFocus,
286
- onBlur,
287
- onKeyDown,
288
- disabled,
289
- secureTextEntry,
290
- style,
291
- color,
292
- fontSize,
293
- placeholderTextColor,
294
- maxLength,
295
- type,
296
- inputMode,
297
- autoComplete,
298
- id,
299
- "aria-describedby": ariaDescribedBy,
300
- "aria-label": ariaLabel,
301
- "aria-disabled": ariaDisabled,
302
- "data-testid": dataTestId
303
- }, ref) => {
304
- const handleChangeText = (text) => {
305
- onChangeText?.(text);
306
- if (onChange) {
307
- const syntheticEvent = {
308
- target: { value: text },
309
- currentTarget: { value: text },
310
- type: "change",
311
- nativeEvent: { text },
312
- preventDefault: () => {
313
- },
314
- stopPropagation: () => {
315
- },
316
- isTrusted: false
317
- };
318
- onChange(syntheticEvent);
319
- }
320
- };
321
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
322
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
323
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
324
- import_react_native6.TextInput,
325
- {
326
- ref,
327
- value,
328
- placeholder,
329
- onChangeText: handleChangeText,
330
- onFocus,
331
- onBlur,
332
- onKeyPress: (e) => {
333
- if (onKeyDown) {
334
- onKeyDown({
335
- key: e.nativeEvent.key,
336
- preventDefault: () => {
337
- }
338
- });
339
- }
340
- },
341
- editable: !disabled,
342
- secureTextEntry: secureTextEntry || type === "password",
343
- keyboardType,
344
- textContentType,
345
- style: [
346
- {
347
- color,
348
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
349
- flex: 1,
350
- padding: 0,
351
- textAlign: style?.textAlign || "left"
352
- },
353
- style
354
- ],
355
- placeholderTextColor,
356
- maxLength,
357
- testID: dataTestId || id,
358
- accessibilityLabel: ariaLabel,
359
- accessibilityHint: ariaDescribedBy,
360
- accessibilityState: {
361
- disabled: disabled || ariaDisabled
362
- },
363
- accessible: true
364
- }
365
- );
366
- }
367
- );
368
- InputPrimitive.displayName = "InputPrimitive";
369
-
370
- // ../primitives-native/src/TextArea.tsx
371
- var import_react3 = require("react");
372
- var import_react_native7 = require("react-native");
373
- var import_jsx_runtime7 = require("react/jsx-runtime");
374
- var TextAreaPrimitive = (0, import_react3.forwardRef)(
375
- ({
376
- value,
377
- placeholder,
378
- onChange,
379
- onChangeText,
380
- onFocus,
381
- onBlur,
382
- onKeyDown,
383
- disabled,
384
- style,
385
- color,
386
- fontSize,
387
- placeholderTextColor,
388
- maxLength,
389
- rows,
390
- id,
391
- "aria-describedby": ariaDescribedBy,
392
- "aria-label": ariaLabel,
393
- "aria-disabled": ariaDisabled,
394
- "data-testid": dataTestId
395
- }, ref) => {
396
- const handleChangeText = (text) => {
397
- onChangeText?.(text);
398
- if (onChange) {
399
- const syntheticEvent = {
400
- target: { value: text },
401
- currentTarget: { value: text },
402
- type: "change",
403
- nativeEvent: { text },
404
- preventDefault: () => {
405
- },
406
- stopPropagation: () => {
407
- },
408
- isTrusted: false
409
- };
410
- onChange(syntheticEvent);
411
- }
412
- };
413
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
414
- import_react_native7.TextInput,
415
- {
416
- ref,
417
- value,
418
- placeholder,
419
- onChangeText: handleChangeText,
420
- onFocus,
421
- onBlur,
422
- onKeyPress: (e) => {
423
- if (onKeyDown) {
424
- onKeyDown({
425
- key: e.nativeEvent.key,
426
- preventDefault: () => {
427
- }
428
- });
429
- }
430
- },
431
- editable: !disabled,
432
- multiline: true,
433
- numberOfLines: rows || 4,
434
- style: [
435
- {
436
- color,
437
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
438
- flex: 1,
439
- padding: 0,
440
- textAlignVertical: "top",
441
- textAlign: style?.textAlign || "left"
442
- },
443
- style
444
- ],
445
- placeholderTextColor,
446
- maxLength,
447
- testID: dataTestId || id,
448
- accessibilityLabel: ariaLabel,
449
- accessibilityHint: ariaDescribedBy,
450
- accessibilityState: {
451
- disabled: disabled || ariaDisabled
452
- },
453
- accessible: true
454
- }
455
- );
456
- }
457
- );
458
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
459
-
460
193
  // src/IconWrapper.tsx
461
194
  var import_xui_core = require("@xsolla/xui-core");
462
- var import_jsx_runtime8 = require("react/jsx-runtime");
195
+ var import_jsx_runtime2 = require("react/jsx-runtime");
463
196
  var IconWrapper = ({
464
197
  size = "md",
465
198
  shape = "none",
@@ -476,7 +209,7 @@ var IconWrapper = ({
476
209
  borderRadius = Math.max(4, Math.floor(sizeConfig.size / 6));
477
210
  }
478
211
  const bg = backgroundColor || (shape === "none" ? "transparent" : theme.colors.background.secondary);
479
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
212
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
480
213
  Box,
481
214
  {
482
215
  width: sizeConfig.size,
@@ -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/IconWrapper.tsx"],"sourcesContent":["export * from \"./IconWrapper\";\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 React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\n\nexport interface IconWrapperProps {\n /** Size of the wrapper */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\" | \"xxs\";\n /** Shape of the wrapper */\n shape?: \"none\" | \"full\" | \"smooth\";\n /** Type of content being wrapped. Affects default styling. */\n type?: \"icon\" | \"label\" | \"image\" | \"avatar\" | \"brand\" | \"custom\";\n /** Children to be rendered inside the wrapper */\n children?: React.ReactNode;\n /** Background color override */\n backgroundColor?: string;\n /** Border color override */\n borderColor?: string;\n}\n\n/**\n * A universal container component used to display small visual elements in a consistent and scalable way.\n * It ensures uniform sizing, alignment, and shapes across different types of content.\n */\nexport const IconWrapper: React.FC<IconWrapperProps> = ({\n size = \"md\",\n shape = \"none\",\n children,\n backgroundColor,\n borderColor,\n}) => {\n const { theme } = useDesignSystem();\n\n const sizeConfig = theme.sizing.iconWrapper(size);\n\n let borderRadius = 0;\n if (shape === \"full\") {\n borderRadius = 999;\n } else if (shape === \"smooth\") {\n // \"Smooth\" is slightly rounded. We use a relative radius based on size.\n borderRadius = Math.max(4, Math.floor(sizeConfig.size / 6));\n }\n\n const bg =\n backgroundColor ||\n (shape === \"none\" ? \"transparent\" : theme.colors.background.secondary);\n\n return (\n <Box\n width={sizeConfig.size}\n height={sizeConfig.size}\n borderRadius={borderRadius}\n backgroundColor={bg}\n alignItems=\"center\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n borderColor={borderColor}\n borderWidth={borderColor ? 1 : 0}\n position=\"relative\"\n >\n {children}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;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;A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AAgB;AAElC,QAAM,aAAa,MAAM,OAAO,YAAY,IAAI;AAEhD,MAAI,eAAe;AACnB,MAAI,UAAU,QAAQ;AACpB,mBAAe;AAAA,EACjB,WAAW,UAAU,UAAU;AAE7B,mBAAe,KAAK,IAAI,GAAG,KAAK,MAAM,WAAW,OAAO,CAAC,CAAC;AAAA,EAC5D;AAEA,QAAM,KACJ,oBACC,UAAU,SAAS,gBAAgB,MAAM,OAAO,WAAW;AAE9D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,WAAW;AAAA,MAClB,QAAQ,WAAW;AAAA,MACnB;AAAA,MACA,iBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,UAAS;AAAA,MACT;AAAA,MACA,aAAa,cAAc,IAAI;AAAA,MAC/B,UAAS;AAAA,MAER;AAAA;AAAA,EACH;AAEJ;","names":["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","../../../primitives-native/src/Box.tsx","../../src/IconWrapper.tsx"],"sourcesContent":["export * from \"./IconWrapper\";\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\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\n\nexport interface IconWrapperProps {\n /** Size of the wrapper */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\" | \"xxs\";\n /** Shape of the wrapper */\n shape?: \"none\" | \"full\" | \"smooth\";\n /** Type of content being wrapped. Affects default styling. */\n type?: \"icon\" | \"label\" | \"image\" | \"avatar\" | \"brand\" | \"custom\";\n /** Children to be rendered inside the wrapper */\n children?: React.ReactNode;\n /** Background color override */\n backgroundColor?: string;\n /** Border color override */\n borderColor?: string;\n}\n\n/**\n * A universal container component used to display small visual elements in a consistent and scalable way.\n * It ensures uniform sizing, alignment, and shapes across different types of content.\n */\nexport const IconWrapper: React.FC<IconWrapperProps> = ({\n size = \"md\",\n shape = \"none\",\n children,\n backgroundColor,\n borderColor,\n}) => {\n const { theme } = useDesignSystem();\n\n const sizeConfig = theme.sizing.iconWrapper(size);\n\n let borderRadius = 0;\n if (shape === \"full\") {\n borderRadius = 999;\n } else if (shape === \"smooth\") {\n // \"Smooth\" is slightly rounded. We use a relative radius based on size.\n borderRadius = Math.max(4, Math.floor(sizeConfig.size / 6));\n }\n\n const bg =\n backgroundColor ||\n (shape === \"none\" ? \"transparent\" : theme.colors.background.secondary);\n\n return (\n <Box\n width={sizeConfig.size}\n height={sizeConfig.size}\n borderRadius={borderRadius}\n backgroundColor={bg}\n alignItems=\"center\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n borderColor={borderColor}\n borderWidth={borderColor ? 1 : 0}\n position=\"relative\"\n >\n {children}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;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,oBAAo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AG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,kBAAkB;AAAA,MACzB,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;;;ACrLA,sBAAgC;AA6C5B,IAAAA,sBAAA;AAxBG,IAAM,cAA0C,CAAC;AAAA,EACtD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,MAAM,QAAI,iCAAgB;AAElC,QAAM,aAAa,MAAM,OAAO,YAAY,IAAI;AAEhD,MAAI,eAAe;AACnB,MAAI,UAAU,QAAQ;AACpB,mBAAe;AAAA,EACjB,WAAW,UAAU,UAAU;AAE7B,mBAAe,KAAK,IAAI,GAAG,KAAK,MAAM,WAAW,OAAO,CAAC,CAAC;AAAA,EAC5D;AAEA,QAAM,KACJ,oBACC,UAAU,SAAS,gBAAgB,MAAM,OAAO,WAAW;AAE9D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,WAAW;AAAA,MAClB,QAAQ,WAAW;AAAA,MACnB;AAAA,MACA,iBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,UAAS;AAAA,MACT;AAAA,MACA,aAAa,cAAc,IAAI;AAAA,MAC/B,UAAS;AAAA,MAER;AAAA;AAAA,EACH;AAEJ;","names":["import_jsx_runtime"]}
package/native/index.mjs CHANGED
@@ -168,266 +168,9 @@ var Box = ({
168
168
  );
169
169
  };
170
170
 
171
- // ../primitives-native/src/Text.tsx
172
- import { Text as RNText } from "react-native";
173
- import { jsx as jsx2 } from "react/jsx-runtime";
174
-
175
- // ../primitives-native/src/Spinner.tsx
176
- import { ActivityIndicator, View as View2 } from "react-native";
177
- import { jsx as jsx3 } from "react/jsx-runtime";
178
- var Spinner = ({
179
- color,
180
- size,
181
- role,
182
- "aria-label": ariaLabel,
183
- "aria-live": ariaLive,
184
- testID
185
- }) => {
186
- return /* @__PURE__ */ jsx3(
187
- View2,
188
- {
189
- accessible: true,
190
- accessibilityRole: role === "status" ? "none" : void 0,
191
- accessibilityLabel: ariaLabel,
192
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
193
- testID,
194
- children: /* @__PURE__ */ jsx3(
195
- ActivityIndicator,
196
- {
197
- color,
198
- size: typeof size === "number" ? size : "small"
199
- }
200
- )
201
- }
202
- );
203
- };
204
- Spinner.displayName = "Spinner";
205
-
206
- // ../primitives-native/src/Icon.tsx
207
- import React from "react";
208
- import { View as View3 } from "react-native";
209
- import { jsx as jsx4 } from "react/jsx-runtime";
210
-
211
- // ../primitives-native/src/Divider.tsx
212
- import { View as View4 } from "react-native";
213
- import { jsx as jsx5 } from "react/jsx-runtime";
214
-
215
- // ../primitives-native/src/Input.tsx
216
- import { forwardRef } from "react";
217
- import { TextInput as RNTextInput } from "react-native";
218
- import { jsx as jsx6 } from "react/jsx-runtime";
219
- var keyboardTypeMap = {
220
- text: "default",
221
- number: "numeric",
222
- email: "email-address",
223
- tel: "phone-pad",
224
- url: "url",
225
- decimal: "decimal-pad"
226
- };
227
- var inputModeToKeyboardType = {
228
- none: "default",
229
- text: "default",
230
- decimal: "decimal-pad",
231
- numeric: "number-pad",
232
- tel: "phone-pad",
233
- search: "default",
234
- email: "email-address",
235
- url: "url"
236
- };
237
- var autoCompleteToTextContentType = {
238
- "one-time-code": "oneTimeCode",
239
- email: "emailAddress",
240
- username: "username",
241
- password: "password",
242
- "new-password": "newPassword",
243
- tel: "telephoneNumber",
244
- "postal-code": "postalCode",
245
- name: "name"
246
- };
247
- var InputPrimitive = forwardRef(
248
- ({
249
- value,
250
- placeholder,
251
- onChange,
252
- onChangeText,
253
- onFocus,
254
- onBlur,
255
- onKeyDown,
256
- disabled,
257
- secureTextEntry,
258
- style,
259
- color,
260
- fontSize,
261
- placeholderTextColor,
262
- maxLength,
263
- type,
264
- inputMode,
265
- autoComplete,
266
- id,
267
- "aria-describedby": ariaDescribedBy,
268
- "aria-label": ariaLabel,
269
- "aria-disabled": ariaDisabled,
270
- "data-testid": dataTestId
271
- }, ref) => {
272
- const handleChangeText = (text) => {
273
- onChangeText?.(text);
274
- if (onChange) {
275
- const syntheticEvent = {
276
- target: { value: text },
277
- currentTarget: { value: text },
278
- type: "change",
279
- nativeEvent: { text },
280
- preventDefault: () => {
281
- },
282
- stopPropagation: () => {
283
- },
284
- isTrusted: false
285
- };
286
- onChange(syntheticEvent);
287
- }
288
- };
289
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
290
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
291
- return /* @__PURE__ */ jsx6(
292
- RNTextInput,
293
- {
294
- ref,
295
- value,
296
- placeholder,
297
- onChangeText: handleChangeText,
298
- onFocus,
299
- onBlur,
300
- onKeyPress: (e) => {
301
- if (onKeyDown) {
302
- onKeyDown({
303
- key: e.nativeEvent.key,
304
- preventDefault: () => {
305
- }
306
- });
307
- }
308
- },
309
- editable: !disabled,
310
- secureTextEntry: secureTextEntry || type === "password",
311
- keyboardType,
312
- textContentType,
313
- style: [
314
- {
315
- color,
316
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
317
- flex: 1,
318
- padding: 0,
319
- textAlign: style?.textAlign || "left"
320
- },
321
- style
322
- ],
323
- placeholderTextColor,
324
- maxLength,
325
- testID: dataTestId || id,
326
- accessibilityLabel: ariaLabel,
327
- accessibilityHint: ariaDescribedBy,
328
- accessibilityState: {
329
- disabled: disabled || ariaDisabled
330
- },
331
- accessible: true
332
- }
333
- );
334
- }
335
- );
336
- InputPrimitive.displayName = "InputPrimitive";
337
-
338
- // ../primitives-native/src/TextArea.tsx
339
- import { forwardRef as forwardRef2 } from "react";
340
- import { TextInput as RNTextInput2 } from "react-native";
341
- import { jsx as jsx7 } from "react/jsx-runtime";
342
- var TextAreaPrimitive = forwardRef2(
343
- ({
344
- value,
345
- placeholder,
346
- onChange,
347
- onChangeText,
348
- onFocus,
349
- onBlur,
350
- onKeyDown,
351
- disabled,
352
- style,
353
- color,
354
- fontSize,
355
- placeholderTextColor,
356
- maxLength,
357
- rows,
358
- id,
359
- "aria-describedby": ariaDescribedBy,
360
- "aria-label": ariaLabel,
361
- "aria-disabled": ariaDisabled,
362
- "data-testid": dataTestId
363
- }, ref) => {
364
- const handleChangeText = (text) => {
365
- onChangeText?.(text);
366
- if (onChange) {
367
- const syntheticEvent = {
368
- target: { value: text },
369
- currentTarget: { value: text },
370
- type: "change",
371
- nativeEvent: { text },
372
- preventDefault: () => {
373
- },
374
- stopPropagation: () => {
375
- },
376
- isTrusted: false
377
- };
378
- onChange(syntheticEvent);
379
- }
380
- };
381
- return /* @__PURE__ */ jsx7(
382
- RNTextInput2,
383
- {
384
- ref,
385
- value,
386
- placeholder,
387
- onChangeText: handleChangeText,
388
- onFocus,
389
- onBlur,
390
- onKeyPress: (e) => {
391
- if (onKeyDown) {
392
- onKeyDown({
393
- key: e.nativeEvent.key,
394
- preventDefault: () => {
395
- }
396
- });
397
- }
398
- },
399
- editable: !disabled,
400
- multiline: true,
401
- numberOfLines: rows || 4,
402
- style: [
403
- {
404
- color,
405
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
406
- flex: 1,
407
- padding: 0,
408
- textAlignVertical: "top",
409
- textAlign: style?.textAlign || "left"
410
- },
411
- style
412
- ],
413
- placeholderTextColor,
414
- maxLength,
415
- testID: dataTestId || id,
416
- accessibilityLabel: ariaLabel,
417
- accessibilityHint: ariaDescribedBy,
418
- accessibilityState: {
419
- disabled: disabled || ariaDisabled
420
- },
421
- accessible: true
422
- }
423
- );
424
- }
425
- );
426
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
427
-
428
171
  // src/IconWrapper.tsx
429
172
  import { useDesignSystem } from "@xsolla/xui-core";
430
- import { jsx as jsx8 } from "react/jsx-runtime";
173
+ import { jsx as jsx2 } from "react/jsx-runtime";
431
174
  var IconWrapper = ({
432
175
  size = "md",
433
176
  shape = "none",
@@ -444,7 +187,7 @@ var IconWrapper = ({
444
187
  borderRadius = Math.max(4, Math.floor(sizeConfig.size / 6));
445
188
  }
446
189
  const bg = backgroundColor || (shape === "none" ? "transparent" : theme.colors.background.secondary);
447
- return /* @__PURE__ */ jsx8(
190
+ return /* @__PURE__ */ jsx2(
448
191
  Box,
449
192
  {
450
193
  width: sizeConfig.size,