@xsolla/xui-multi-select 0.112.0 → 0.114.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
@@ -213,29 +213,57 @@ var roleMap = {
213
213
  link: "link",
214
214
  text: "text"
215
215
  };
216
+ var parseNumericValue = (value) => {
217
+ if (value === void 0) return void 0;
218
+ if (typeof value === "number") return value;
219
+ const parsed = parseFloat(value);
220
+ return isNaN(parsed) ? void 0 : parsed;
221
+ };
216
222
  var Text = ({
217
223
  children,
218
224
  color,
219
225
  fontSize,
220
226
  fontWeight,
221
227
  fontFamily,
228
+ textAlign,
229
+ lineHeight,
230
+ numberOfLines,
222
231
  id,
223
232
  role,
233
+ style: styleProp,
224
234
  ...props
225
235
  }) => {
226
236
  let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
227
237
  if (resolvedFontFamily === "Pilat Wide" || resolvedFontFamily === "Pilat Wide Bold" || resolvedFontFamily === "Aktiv Grotesk") {
228
238
  resolvedFontFamily = void 0;
229
239
  }
230
- const style = {
240
+ const incomingStyle = import_react_native2.StyleSheet.flatten(styleProp);
241
+ const baseStyle = {
231
242
  color,
232
243
  fontSize: typeof fontSize === "number" ? fontSize : void 0,
233
244
  fontWeight,
234
245
  fontFamily: resolvedFontFamily,
235
- textDecorationLine: props.textDecoration
246
+ textDecorationLine: props.textDecoration,
247
+ textAlign: textAlign ?? incomingStyle?.textAlign,
248
+ lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),
249
+ marginTop: parseNumericValue(
250
+ incomingStyle?.marginTop
251
+ ),
252
+ marginBottom: parseNumericValue(
253
+ incomingStyle?.marginBottom
254
+ )
236
255
  };
237
256
  const accessibilityRole = role ? roleMap[role] : void 0;
238
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style, testID: id, accessibilityRole, children });
257
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
258
+ import_react_native2.Text,
259
+ {
260
+ style: baseStyle,
261
+ numberOfLines,
262
+ testID: id,
263
+ accessibilityRole,
264
+ children
265
+ }
266
+ );
239
267
  };
240
268
 
241
269
  // ../primitives-native/src/Icon.tsx
@@ -1010,6 +1038,7 @@ var Text2 = ({
1010
1038
  className,
1011
1039
  id,
1012
1040
  role,
1041
+ numberOfLines: _numberOfLines,
1013
1042
  ...props
1014
1043
  }) => {
1015
1044
  return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)(