@xsolla/xui-multi-select 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 +32 -3
- package/native/index.js.map +1 -1
- package/native/index.mjs +36 -4
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.d.ts +89 -0
- package/web/index.js +2 -0
- package/web/index.js.flow +124 -0
- package/web/index.js.map +1 -1
- package/web/index.mjs +2 -0
- package/web/index.mjs.map +1 -1
package/native/index.mjs
CHANGED
|
@@ -172,7 +172,10 @@ var Box = ({
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
// ../primitives-native/src/Text.tsx
|
|
175
|
-
import {
|
|
175
|
+
import {
|
|
176
|
+
Text as RNText,
|
|
177
|
+
StyleSheet
|
|
178
|
+
} from "react-native";
|
|
176
179
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
177
180
|
var roleMap = {
|
|
178
181
|
alert: "alert",
|
|
@@ -181,29 +184,57 @@ var roleMap = {
|
|
|
181
184
|
link: "link",
|
|
182
185
|
text: "text"
|
|
183
186
|
};
|
|
187
|
+
var parseNumericValue = (value) => {
|
|
188
|
+
if (value === void 0) return void 0;
|
|
189
|
+
if (typeof value === "number") return value;
|
|
190
|
+
const parsed = parseFloat(value);
|
|
191
|
+
return isNaN(parsed) ? void 0 : parsed;
|
|
192
|
+
};
|
|
184
193
|
var Text = ({
|
|
185
194
|
children,
|
|
186
195
|
color,
|
|
187
196
|
fontSize,
|
|
188
197
|
fontWeight,
|
|
189
198
|
fontFamily,
|
|
199
|
+
textAlign,
|
|
200
|
+
lineHeight,
|
|
201
|
+
numberOfLines,
|
|
190
202
|
id,
|
|
191
203
|
role,
|
|
204
|
+
style: styleProp,
|
|
192
205
|
...props
|
|
193
206
|
}) => {
|
|
194
207
|
let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
|
|
195
208
|
if (resolvedFontFamily === "Pilat Wide" || resolvedFontFamily === "Pilat Wide Bold" || resolvedFontFamily === "Aktiv Grotesk") {
|
|
196
209
|
resolvedFontFamily = void 0;
|
|
197
210
|
}
|
|
198
|
-
const
|
|
211
|
+
const incomingStyle = StyleSheet.flatten(styleProp);
|
|
212
|
+
const baseStyle = {
|
|
199
213
|
color,
|
|
200
214
|
fontSize: typeof fontSize === "number" ? fontSize : void 0,
|
|
201
215
|
fontWeight,
|
|
202
216
|
fontFamily: resolvedFontFamily,
|
|
203
|
-
textDecorationLine: props.textDecoration
|
|
217
|
+
textDecorationLine: props.textDecoration,
|
|
218
|
+
textAlign: textAlign ?? incomingStyle?.textAlign,
|
|
219
|
+
lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),
|
|
220
|
+
marginTop: parseNumericValue(
|
|
221
|
+
incomingStyle?.marginTop
|
|
222
|
+
),
|
|
223
|
+
marginBottom: parseNumericValue(
|
|
224
|
+
incomingStyle?.marginBottom
|
|
225
|
+
)
|
|
204
226
|
};
|
|
205
227
|
const accessibilityRole = role ? roleMap[role] : void 0;
|
|
206
|
-
return /* @__PURE__ */ jsx2(
|
|
228
|
+
return /* @__PURE__ */ jsx2(
|
|
229
|
+
RNText,
|
|
230
|
+
{
|
|
231
|
+
style: baseStyle,
|
|
232
|
+
numberOfLines,
|
|
233
|
+
testID: id,
|
|
234
|
+
accessibilityRole,
|
|
235
|
+
children
|
|
236
|
+
}
|
|
237
|
+
);
|
|
207
238
|
};
|
|
208
239
|
|
|
209
240
|
// ../primitives-native/src/Icon.tsx
|
|
@@ -983,6 +1014,7 @@ var Text2 = ({
|
|
|
983
1014
|
className,
|
|
984
1015
|
id,
|
|
985
1016
|
role,
|
|
1017
|
+
numberOfLines: _numberOfLines,
|
|
986
1018
|
...props
|
|
987
1019
|
}) => {
|
|
988
1020
|
return /* @__PURE__ */ jsx2101(
|