@xsolla/xui-spinner 0.87.0 → 0.89.0-pr137.1770210437

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
@@ -34,17 +24,9 @@ __export(index_exports, {
34
24
  });
35
25
  module.exports = __toCommonJS(index_exports);
36
26
 
37
- // ../primitives-native/src/Box.tsx
27
+ // ../primitives-native/src/Spinner.tsx
38
28
  var import_react_native = require("react-native");
39
29
  var import_jsx_runtime = require("react/jsx-runtime");
40
-
41
- // ../primitives-native/src/Text.tsx
42
- var import_react_native2 = require("react-native");
43
- var import_jsx_runtime2 = require("react/jsx-runtime");
44
-
45
- // ../primitives-native/src/Spinner.tsx
46
- var import_react_native3 = require("react-native");
47
- var import_jsx_runtime3 = require("react/jsx-runtime");
48
30
  var Spinner = ({
49
31
  color,
50
32
  size,
@@ -53,16 +35,16 @@ var Spinner = ({
53
35
  "aria-live": ariaLive,
54
36
  testID
55
37
  }) => {
56
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
57
- import_react_native3.View,
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
+ import_react_native.View,
58
40
  {
59
41
  accessible: true,
60
42
  accessibilityRole: role === "status" ? "none" : void 0,
61
43
  accessibilityLabel: ariaLabel,
62
44
  accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
63
45
  testID,
64
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
65
- import_react_native3.ActivityIndicator,
46
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
+ import_react_native.ActivityIndicator,
66
48
  {
67
49
  color,
68
50
  size: typeof size === "number" ? size : "small"
@@ -73,231 +55,9 @@ var Spinner = ({
73
55
  };
74
56
  Spinner.displayName = "Spinner";
75
57
 
76
- // ../primitives-native/src/Icon.tsx
77
- var import_react = __toESM(require("react"));
78
- var import_react_native4 = require("react-native");
79
- var import_jsx_runtime4 = require("react/jsx-runtime");
80
-
81
- // ../primitives-native/src/Divider.tsx
82
- var import_react_native5 = require("react-native");
83
- var import_jsx_runtime5 = require("react/jsx-runtime");
84
-
85
- // ../primitives-native/src/Input.tsx
86
- var import_react2 = require("react");
87
- var import_react_native6 = require("react-native");
88
- var import_jsx_runtime6 = require("react/jsx-runtime");
89
- var keyboardTypeMap = {
90
- text: "default",
91
- number: "numeric",
92
- email: "email-address",
93
- tel: "phone-pad",
94
- url: "url",
95
- decimal: "decimal-pad"
96
- };
97
- var inputModeToKeyboardType = {
98
- none: "default",
99
- text: "default",
100
- decimal: "decimal-pad",
101
- numeric: "number-pad",
102
- tel: "phone-pad",
103
- search: "default",
104
- email: "email-address",
105
- url: "url"
106
- };
107
- var autoCompleteToTextContentType = {
108
- "one-time-code": "oneTimeCode",
109
- email: "emailAddress",
110
- username: "username",
111
- password: "password",
112
- "new-password": "newPassword",
113
- tel: "telephoneNumber",
114
- "postal-code": "postalCode",
115
- name: "name"
116
- };
117
- var InputPrimitive = (0, import_react2.forwardRef)(
118
- ({
119
- value,
120
- placeholder,
121
- onChange,
122
- onChangeText,
123
- onFocus,
124
- onBlur,
125
- onKeyDown,
126
- disabled,
127
- secureTextEntry,
128
- style,
129
- color,
130
- fontSize,
131
- placeholderTextColor,
132
- maxLength,
133
- type,
134
- inputMode,
135
- autoComplete,
136
- id,
137
- "aria-describedby": ariaDescribedBy,
138
- "aria-label": ariaLabel,
139
- "aria-disabled": ariaDisabled,
140
- "data-testid": dataTestId
141
- }, ref) => {
142
- const handleChangeText = (text) => {
143
- onChangeText?.(text);
144
- if (onChange) {
145
- const syntheticEvent = {
146
- target: { value: text },
147
- currentTarget: { value: text },
148
- type: "change",
149
- nativeEvent: { text },
150
- preventDefault: () => {
151
- },
152
- stopPropagation: () => {
153
- },
154
- isTrusted: false
155
- };
156
- onChange(syntheticEvent);
157
- }
158
- };
159
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
160
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
161
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
162
- import_react_native6.TextInput,
163
- {
164
- ref,
165
- value,
166
- placeholder,
167
- onChangeText: handleChangeText,
168
- onFocus,
169
- onBlur,
170
- onKeyPress: (e) => {
171
- if (onKeyDown) {
172
- onKeyDown({
173
- key: e.nativeEvent.key,
174
- preventDefault: () => {
175
- }
176
- });
177
- }
178
- },
179
- editable: !disabled,
180
- secureTextEntry: secureTextEntry || type === "password",
181
- keyboardType,
182
- textContentType,
183
- style: [
184
- {
185
- color,
186
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
187
- flex: 1,
188
- padding: 0,
189
- textAlign: style?.textAlign || "left"
190
- },
191
- style
192
- ],
193
- placeholderTextColor,
194
- maxLength,
195
- testID: dataTestId || id,
196
- accessibilityLabel: ariaLabel,
197
- accessibilityHint: ariaDescribedBy,
198
- accessibilityState: {
199
- disabled: disabled || ariaDisabled
200
- },
201
- accessible: true
202
- }
203
- );
204
- }
205
- );
206
- InputPrimitive.displayName = "InputPrimitive";
207
-
208
- // ../primitives-native/src/TextArea.tsx
209
- var import_react3 = require("react");
210
- var import_react_native7 = require("react-native");
211
- var import_jsx_runtime7 = require("react/jsx-runtime");
212
- var TextAreaPrimitive = (0, import_react3.forwardRef)(
213
- ({
214
- value,
215
- placeholder,
216
- onChange,
217
- onChangeText,
218
- onFocus,
219
- onBlur,
220
- onKeyDown,
221
- disabled,
222
- style,
223
- color,
224
- fontSize,
225
- placeholderTextColor,
226
- maxLength,
227
- rows,
228
- id,
229
- "aria-describedby": ariaDescribedBy,
230
- "aria-label": ariaLabel,
231
- "aria-disabled": ariaDisabled,
232
- "data-testid": dataTestId
233
- }, ref) => {
234
- const handleChangeText = (text) => {
235
- onChangeText?.(text);
236
- if (onChange) {
237
- const syntheticEvent = {
238
- target: { value: text },
239
- currentTarget: { value: text },
240
- type: "change",
241
- nativeEvent: { text },
242
- preventDefault: () => {
243
- },
244
- stopPropagation: () => {
245
- },
246
- isTrusted: false
247
- };
248
- onChange(syntheticEvent);
249
- }
250
- };
251
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
252
- import_react_native7.TextInput,
253
- {
254
- ref,
255
- value,
256
- placeholder,
257
- onChangeText: handleChangeText,
258
- onFocus,
259
- onBlur,
260
- onKeyPress: (e) => {
261
- if (onKeyDown) {
262
- onKeyDown({
263
- key: e.nativeEvent.key,
264
- preventDefault: () => {
265
- }
266
- });
267
- }
268
- },
269
- editable: !disabled,
270
- multiline: true,
271
- numberOfLines: rows || 4,
272
- style: [
273
- {
274
- color,
275
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
276
- flex: 1,
277
- padding: 0,
278
- textAlignVertical: "top",
279
- textAlign: style?.textAlign || "left"
280
- },
281
- style
282
- ],
283
- placeholderTextColor,
284
- maxLength,
285
- testID: dataTestId || id,
286
- accessibilityLabel: ariaLabel,
287
- accessibilityHint: ariaDescribedBy,
288
- accessibilityState: {
289
- disabled: disabled || ariaDisabled
290
- },
291
- accessible: true
292
- }
293
- );
294
- }
295
- );
296
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
297
-
298
58
  // src/Spinner.tsx
299
59
  var import_xui_core = require("@xsolla/xui-core");
300
- var import_jsx_runtime8 = require("react/jsx-runtime");
60
+ var import_jsx_runtime2 = require("react/jsx-runtime");
301
61
  var Spinner2 = ({
302
62
  size = "md",
303
63
  color,
@@ -308,7 +68,7 @@ var Spinner2 = ({
308
68
  const { theme } = (0, import_xui_core.useDesignSystem)();
309
69
  const sizeConfig = theme.sizing.spinner(size);
310
70
  const defaultColor = theme.colors.content.primary;
311
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
71
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
312
72
  Spinner,
313
73
  {
314
74
  size: 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/Spinner.tsx"],"sourcesContent":["export * from \"./Spinner\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, it's better to use the system font\n // to avoid rendering issues or missing text.\n if (resolvedFontFamily === \"Pilat Wide Bold\") {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n","import type React from \"react\";\nimport { ActivityIndicator, View } from \"react-native\";\nimport type { SpinnerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Spinner: React.FC<SpinnerProps> = ({\n color,\n size,\n role,\n \"aria-label\": ariaLabel,\n \"aria-live\": ariaLive,\n testID,\n}) => {\n return (\n <View\n accessible={true}\n accessibilityRole={role === \"status\" ? \"none\" : undefined}\n accessibilityLabel={ariaLabel}\n accessibilityLiveRegion={\n ariaLive === \"polite\"\n ? \"polite\"\n : ariaLive === \"assertive\"\n ? \"assertive\"\n : \"none\"\n }\n testID={testID}\n >\n <ActivityIndicator\n color={color}\n size={typeof size === \"number\" ? size : \"small\"}\n />\n </View>\n );\n};\n\nSpinner.displayName = \"Spinner\";\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { DividerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Divider: React.FC<DividerProps> = ({\n color,\n height,\n width,\n vertical,\n dashStroke,\n}) => {\n const style: ViewStyle = {\n backgroundColor: dashStroke\n ? \"transparent\"\n : color || \"rgba(255, 255, 255, 0.15)\",\n width: vertical ? (typeof width === \"number\" ? width : 1) : \"100%\",\n height: vertical ? \"100%\" : typeof height === \"number\" ? height : 1,\n ...(dashStroke && {\n borderStyle: \"dashed\",\n borderColor: color || \"rgba(255, 255, 255, 0.15)\",\n borderWidth: 0,\n ...(vertical\n ? { borderLeftWidth: typeof width === \"number\" ? width : 1 }\n : { borderTopWidth: typeof height === \"number\" ? height : 1 }),\n }),\n };\n\n return <View style={style} />;\n};\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web input types to React Native keyboard types\nconst keyboardTypeMap: Record<string, any> = {\n text: \"default\",\n number: \"numeric\",\n email: \"email-address\",\n tel: \"phone-pad\",\n url: \"url\",\n decimal: \"decimal-pad\",\n};\n\n// Map web inputMode to React Native keyboard types\nconst inputModeToKeyboardType: Record<string, any> = {\n none: \"default\",\n text: \"default\",\n decimal: \"decimal-pad\",\n numeric: \"number-pad\",\n tel: \"phone-pad\",\n search: \"default\",\n email: \"email-address\",\n url: \"url\",\n};\n\n// Map web autoComplete to React Native textContentType (iOS)\nconst autoCompleteToTextContentType: Record<string, any> = {\n \"one-time-code\": \"oneTimeCode\",\n email: \"emailAddress\",\n username: \"username\",\n password: \"password\",\n \"new-password\": \"newPassword\",\n tel: \"telephoneNumber\",\n \"postal-code\": \"postalCode\",\n name: \"name\",\n};\n\nexport const InputPrimitive = forwardRef<RNTextInput, InputPrimitiveProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n secureTextEntry,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n // Create a synthetic event for onChange compatibility\n // Include nativeEvent and no-op methods to prevent runtime errors\n // when consumers expect DOM-like event behavior\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n // Determine keyboard type - inputMode takes precedence over type\n const keyboardType = inputMode\n ? inputModeToKeyboardType[inputMode] || \"default\"\n : type\n ? keyboardTypeMap[type] || \"default\"\n : \"default\";\n\n // Determine textContentType for iOS autofill\n const textContentType = autoComplete\n ? autoCompleteToTextContentType[autoComplete]\n : undefined;\n\n return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n // Map onKeyPress to onKeyDown for cross-platform compatibility\n // Include preventDefault to avoid runtime errors when consumers call it\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n secureTextEntry={secureTextEntry || type === \"password\"}\n keyboardType={keyboardType}\n textContentType={textContentType}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n // React Native accessibility props\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { TextAreaPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nexport const TextAreaPrimitive = forwardRef<\n RNTextInput,\n TextAreaPrimitiveProps\n>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n rows,\n id,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLTextAreaElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n multiline={true}\n numberOfLines={rows || 4}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlignVertical: \"top\",\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nTextAreaPrimitive.displayName = \"TextAreaPrimitive\";\n","import type React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Spinner as SpinnerPrimitive } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\n\nexport interface SpinnerProps {\n /**\n * The size of the spinner.\n * @default 'md'\n */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /**\n * The color of the spinner.\n * If not provided, it will use the default text color from the theme.\n */\n color?: string;\n /**\n * Accessible label for screen readers.\n * @default 'Loading'\n */\n \"aria-label\"?: string;\n /**\n * ID of the element being loaded (for aria-describedby on the loading container).\n */\n \"aria-describedby\"?: string;\n /**\n * Test ID for testing frameworks.\n */\n testID?: string;\n}\n\n/**\n * Spinner - An accessible loading indicator component\n *\n * Displays a spinning animation to indicate loading state.\n *\n * ## Accessibility Features\n *\n * - **role=\"status\"**: Announces to screen readers that this is a status indicator\n * - **aria-live=\"polite\"**: Screen readers will announce when the spinner appears\n * - **aria-label**: Provides accessible name for the spinner (defaults to \"Loading\")\n *\n * ## Sizes\n *\n * - xl: 96px\n * - l: 48px\n * - m: 24px (default)\n * - s: 16px\n * - xs: 8px\n */\nexport const Spinner: React.FC<SpinnerProps> = ({\n size = \"md\",\n color,\n \"aria-label\": ariaLabel = \"Loading\",\n \"aria-describedby\": ariaDescribedBy,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n\n const sizeConfig = theme.sizing.spinner(size);\n const defaultColor = theme.colors.content.primary;\n\n return (\n <SpinnerPrimitive\n size={sizeConfig.size}\n strokeWidth={sizeConfig.strokeWidth}\n color={color || defaultColor}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n testID={testID}\n />\n );\n};\n\nSpinner.displayName = \"Spinner\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;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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;;;AC1FhC,sBAAgC;AA4D5B,IAAAC,sBAAA;AAbG,IAAMC,WAAkC,CAAC;AAAA,EAC9C,OAAO;AAAA,EACP;AAAA,EACA,cAAc,YAAY;AAAA,EAC1B,oBAAoB;AAAA,EACpB;AACF,MAAM;AACJ,QAAM,EAAE,MAAM,QAAI,iCAAgB;AAElC,QAAM,aAAa,MAAM,OAAO,QAAQ,IAAI;AAC5C,QAAM,eAAe,MAAM,OAAO,QAAQ;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,WAAW;AAAA,MACjB,aAAa,WAAW;AAAA,MACxB,OAAO,SAAS;AAAA,MAChB,MAAK;AAAA,MACL,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,oBAAkB;AAAA,MAClB;AAAA;AAAA,EACF;AAEJ;AAEAA,SAAQ,cAAc;","names":["Spinner","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","Spinner"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../../primitives-native/src/Spinner.tsx","../../src/Spinner.tsx"],"sourcesContent":["export * from \"./Spinner\";\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 type React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Spinner as SpinnerPrimitive } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\n\nexport interface SpinnerProps {\n /**\n * The size of the spinner.\n * @default 'md'\n */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /**\n * The color of the spinner.\n * If not provided, it will use the default text color from the theme.\n */\n color?: string;\n /**\n * Accessible label for screen readers.\n * @default 'Loading'\n */\n \"aria-label\"?: string;\n /**\n * ID of the element being loaded (for aria-describedby on the loading container).\n */\n \"aria-describedby\"?: string;\n /**\n * Test ID for testing frameworks.\n */\n testID?: string;\n}\n\n/**\n * Spinner - An accessible loading indicator component\n *\n * Displays a spinning animation to indicate loading state.\n *\n * ## Accessibility Features\n *\n * - **role=\"status\"**: Announces to screen readers that this is a status indicator\n * - **aria-live=\"polite\"**: Screen readers will announce when the spinner appears\n * - **aria-label**: Provides accessible name for the spinner (defaults to \"Loading\")\n *\n * ## Sizes\n *\n * - xl: 96px\n * - l: 48px\n * - m: 24px (default)\n * - s: 16px\n * - xs: 8px\n */\nexport const Spinner: React.FC<SpinnerProps> = ({\n size = \"md\",\n color,\n \"aria-label\": ariaLabel = \"Loading\",\n \"aria-describedby\": ariaDescribedBy,\n testID,\n}) => {\n const { theme } = useDesignSystem();\n\n const sizeConfig = theme.sizing.spinner(size);\n const defaultColor = theme.colors.content.primary;\n\n return (\n <SpinnerPrimitive\n size={sizeConfig.size}\n strokeWidth={sizeConfig.strokeWidth}\n color={color || defaultColor}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n testID={testID}\n />\n );\n};\n\nSpinner.displayName = \"Spinner\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACCA,0BAAwC;AAyBlC;AAtBC,IAAM,UAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb;AACF,MAAM;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ,mBAAmB,SAAS,WAAW,SAAS;AAAA,MAChD,oBAAoB;AAAA,MACpB,yBACE,aAAa,WACT,WACA,aAAa,cACX,cACA;AAAA,MAER;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,MAAM,OAAO,SAAS,WAAW,OAAO;AAAA;AAAA,MAC1C;AAAA;AAAA,EACF;AAEJ;AAEA,QAAQ,cAAc;;;AC/BtB,sBAAgC;AA4D5B,IAAAC,sBAAA;AAbG,IAAMC,WAAkC,CAAC;AAAA,EAC9C,OAAO;AAAA,EACP;AAAA,EACA,cAAc,YAAY;AAAA,EAC1B,oBAAoB;AAAA,EACpB;AACF,MAAM;AACJ,QAAM,EAAE,MAAM,QAAI,iCAAgB;AAElC,QAAM,aAAa,MAAM,OAAO,QAAQ,IAAI;AAC5C,QAAM,eAAe,MAAM,OAAO,QAAQ;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,WAAW;AAAA,MACjB,aAAa,WAAW;AAAA,MACxB,OAAO,SAAS;AAAA,MAChB,MAAK;AAAA,MACL,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,oBAAkB;AAAA,MAClB;AAAA;AAAA,EACF;AAEJ;AAEAA,SAAQ,cAAc;","names":["Spinner","import_jsx_runtime","Spinner"]}
package/native/index.mjs CHANGED
@@ -1,18 +1,6 @@
1
- // ../primitives-native/src/Box.tsx
2
- import {
3
- View,
4
- Pressable,
5
- Image
6
- } from "react-native";
7
- import { jsx } from "react/jsx-runtime";
8
-
9
- // ../primitives-native/src/Text.tsx
10
- import { Text as RNText } from "react-native";
11
- import { jsx as jsx2 } from "react/jsx-runtime";
12
-
13
1
  // ../primitives-native/src/Spinner.tsx
14
- import { ActivityIndicator, View as View2 } from "react-native";
15
- import { jsx as jsx3 } from "react/jsx-runtime";
2
+ import { ActivityIndicator, View } from "react-native";
3
+ import { jsx } from "react/jsx-runtime";
16
4
  var Spinner = ({
17
5
  color,
18
6
  size,
@@ -21,15 +9,15 @@ var Spinner = ({
21
9
  "aria-live": ariaLive,
22
10
  testID
23
11
  }) => {
24
- return /* @__PURE__ */ jsx3(
25
- View2,
12
+ return /* @__PURE__ */ jsx(
13
+ View,
26
14
  {
27
15
  accessible: true,
28
16
  accessibilityRole: role === "status" ? "none" : void 0,
29
17
  accessibilityLabel: ariaLabel,
30
18
  accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
31
19
  testID,
32
- children: /* @__PURE__ */ jsx3(
20
+ children: /* @__PURE__ */ jsx(
33
21
  ActivityIndicator,
34
22
  {
35
23
  color,
@@ -41,231 +29,9 @@ var Spinner = ({
41
29
  };
42
30
  Spinner.displayName = "Spinner";
43
31
 
44
- // ../primitives-native/src/Icon.tsx
45
- import React from "react";
46
- import { View as View3 } from "react-native";
47
- import { jsx as jsx4 } from "react/jsx-runtime";
48
-
49
- // ../primitives-native/src/Divider.tsx
50
- import { View as View4 } from "react-native";
51
- import { jsx as jsx5 } from "react/jsx-runtime";
52
-
53
- // ../primitives-native/src/Input.tsx
54
- import { forwardRef } from "react";
55
- import { TextInput as RNTextInput } from "react-native";
56
- import { jsx as jsx6 } from "react/jsx-runtime";
57
- var keyboardTypeMap = {
58
- text: "default",
59
- number: "numeric",
60
- email: "email-address",
61
- tel: "phone-pad",
62
- url: "url",
63
- decimal: "decimal-pad"
64
- };
65
- var inputModeToKeyboardType = {
66
- none: "default",
67
- text: "default",
68
- decimal: "decimal-pad",
69
- numeric: "number-pad",
70
- tel: "phone-pad",
71
- search: "default",
72
- email: "email-address",
73
- url: "url"
74
- };
75
- var autoCompleteToTextContentType = {
76
- "one-time-code": "oneTimeCode",
77
- email: "emailAddress",
78
- username: "username",
79
- password: "password",
80
- "new-password": "newPassword",
81
- tel: "telephoneNumber",
82
- "postal-code": "postalCode",
83
- name: "name"
84
- };
85
- var InputPrimitive = forwardRef(
86
- ({
87
- value,
88
- placeholder,
89
- onChange,
90
- onChangeText,
91
- onFocus,
92
- onBlur,
93
- onKeyDown,
94
- disabled,
95
- secureTextEntry,
96
- style,
97
- color,
98
- fontSize,
99
- placeholderTextColor,
100
- maxLength,
101
- type,
102
- inputMode,
103
- autoComplete,
104
- id,
105
- "aria-describedby": ariaDescribedBy,
106
- "aria-label": ariaLabel,
107
- "aria-disabled": ariaDisabled,
108
- "data-testid": dataTestId
109
- }, ref) => {
110
- const handleChangeText = (text) => {
111
- onChangeText?.(text);
112
- if (onChange) {
113
- const syntheticEvent = {
114
- target: { value: text },
115
- currentTarget: { value: text },
116
- type: "change",
117
- nativeEvent: { text },
118
- preventDefault: () => {
119
- },
120
- stopPropagation: () => {
121
- },
122
- isTrusted: false
123
- };
124
- onChange(syntheticEvent);
125
- }
126
- };
127
- const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
128
- const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
129
- return /* @__PURE__ */ jsx6(
130
- RNTextInput,
131
- {
132
- ref,
133
- value,
134
- placeholder,
135
- onChangeText: handleChangeText,
136
- onFocus,
137
- onBlur,
138
- onKeyPress: (e) => {
139
- if (onKeyDown) {
140
- onKeyDown({
141
- key: e.nativeEvent.key,
142
- preventDefault: () => {
143
- }
144
- });
145
- }
146
- },
147
- editable: !disabled,
148
- secureTextEntry: secureTextEntry || type === "password",
149
- keyboardType,
150
- textContentType,
151
- style: [
152
- {
153
- color,
154
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
155
- flex: 1,
156
- padding: 0,
157
- textAlign: style?.textAlign || "left"
158
- },
159
- style
160
- ],
161
- placeholderTextColor,
162
- maxLength,
163
- testID: dataTestId || id,
164
- accessibilityLabel: ariaLabel,
165
- accessibilityHint: ariaDescribedBy,
166
- accessibilityState: {
167
- disabled: disabled || ariaDisabled
168
- },
169
- accessible: true
170
- }
171
- );
172
- }
173
- );
174
- InputPrimitive.displayName = "InputPrimitive";
175
-
176
- // ../primitives-native/src/TextArea.tsx
177
- import { forwardRef as forwardRef2 } from "react";
178
- import { TextInput as RNTextInput2 } from "react-native";
179
- import { jsx as jsx7 } from "react/jsx-runtime";
180
- var TextAreaPrimitive = forwardRef2(
181
- ({
182
- value,
183
- placeholder,
184
- onChange,
185
- onChangeText,
186
- onFocus,
187
- onBlur,
188
- onKeyDown,
189
- disabled,
190
- style,
191
- color,
192
- fontSize,
193
- placeholderTextColor,
194
- maxLength,
195
- rows,
196
- id,
197
- "aria-describedby": ariaDescribedBy,
198
- "aria-label": ariaLabel,
199
- "aria-disabled": ariaDisabled,
200
- "data-testid": dataTestId
201
- }, ref) => {
202
- const handleChangeText = (text) => {
203
- onChangeText?.(text);
204
- if (onChange) {
205
- const syntheticEvent = {
206
- target: { value: text },
207
- currentTarget: { value: text },
208
- type: "change",
209
- nativeEvent: { text },
210
- preventDefault: () => {
211
- },
212
- stopPropagation: () => {
213
- },
214
- isTrusted: false
215
- };
216
- onChange(syntheticEvent);
217
- }
218
- };
219
- return /* @__PURE__ */ jsx7(
220
- RNTextInput2,
221
- {
222
- ref,
223
- value,
224
- placeholder,
225
- onChangeText: handleChangeText,
226
- onFocus,
227
- onBlur,
228
- onKeyPress: (e) => {
229
- if (onKeyDown) {
230
- onKeyDown({
231
- key: e.nativeEvent.key,
232
- preventDefault: () => {
233
- }
234
- });
235
- }
236
- },
237
- editable: !disabled,
238
- multiline: true,
239
- numberOfLines: rows || 4,
240
- style: [
241
- {
242
- color,
243
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
244
- flex: 1,
245
- padding: 0,
246
- textAlignVertical: "top",
247
- textAlign: style?.textAlign || "left"
248
- },
249
- style
250
- ],
251
- placeholderTextColor,
252
- maxLength,
253
- testID: dataTestId || id,
254
- accessibilityLabel: ariaLabel,
255
- accessibilityHint: ariaDescribedBy,
256
- accessibilityState: {
257
- disabled: disabled || ariaDisabled
258
- },
259
- accessible: true
260
- }
261
- );
262
- }
263
- );
264
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
265
-
266
32
  // src/Spinner.tsx
267
33
  import { useDesignSystem } from "@xsolla/xui-core";
268
- import { jsx as jsx8 } from "react/jsx-runtime";
34
+ import { jsx as jsx2 } from "react/jsx-runtime";
269
35
  var Spinner2 = ({
270
36
  size = "md",
271
37
  color,
@@ -276,7 +42,7 @@ var Spinner2 = ({
276
42
  const { theme } = useDesignSystem();
277
43
  const sizeConfig = theme.sizing.spinner(size);
278
44
  const defaultColor = theme.colors.content.primary;
279
- return /* @__PURE__ */ jsx8(
45
+ return /* @__PURE__ */ jsx2(
280
46
  Spinner,
281
47
  {
282
48
  size: sizeConfig.size,