@xsolla/xui-input-phone 0.112.0 → 0.113.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
@@ -219,29 +219,57 @@ var roleMap = {
219
219
  link: "link",
220
220
  text: "text"
221
221
  };
222
+ var parseNumericValue = (value) => {
223
+ if (value === void 0) return void 0;
224
+ if (typeof value === "number") return value;
225
+ const parsed = parseFloat(value);
226
+ return isNaN(parsed) ? void 0 : parsed;
227
+ };
222
228
  var Text = ({
223
229
  children,
224
230
  color,
225
231
  fontSize,
226
232
  fontWeight,
227
233
  fontFamily,
234
+ textAlign,
235
+ lineHeight,
236
+ numberOfLines,
228
237
  id,
229
238
  role,
239
+ style: styleProp,
230
240
  ...props
231
241
  }) => {
232
242
  let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
233
243
  if (resolvedFontFamily === "Pilat Wide" || resolvedFontFamily === "Pilat Wide Bold" || resolvedFontFamily === "Aktiv Grotesk") {
234
244
  resolvedFontFamily = void 0;
235
245
  }
236
- const style = {
246
+ const incomingStyle = import_react_native2.StyleSheet.flatten(styleProp);
247
+ const baseStyle = {
237
248
  color,
238
249
  fontSize: typeof fontSize === "number" ? fontSize : void 0,
239
250
  fontWeight,
240
251
  fontFamily: resolvedFontFamily,
241
- textDecorationLine: props.textDecoration
252
+ textDecorationLine: props.textDecoration,
253
+ textAlign: textAlign ?? incomingStyle?.textAlign,
254
+ lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),
255
+ marginTop: parseNumericValue(
256
+ incomingStyle?.marginTop
257
+ ),
258
+ marginBottom: parseNumericValue(
259
+ incomingStyle?.marginBottom
260
+ )
242
261
  };
243
262
  const accessibilityRole = role ? roleMap[role] : void 0;
244
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style, testID: id, accessibilityRole, children });
263
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
264
+ import_react_native2.Text,
265
+ {
266
+ style: baseStyle,
267
+ numberOfLines,
268
+ testID: id,
269
+ accessibilityRole,
270
+ children
271
+ }
272
+ );
245
273
  };
246
274
 
247
275
  // ../primitives-native/src/Icon.tsx