@wlloyalty/wll-react-sdk 1.0.99 → 1.0.100
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/dist/native.js +27 -5
- package/dist/native.js.map +1 -1
- package/dist/web.js +20 -5
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/native.js
CHANGED
|
@@ -2311,11 +2311,33 @@ var Text = function (_a) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
};
|
|
2313
2313
|
var variantStyle = getVariantStyle(variant);
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
//
|
|
2318
|
-
|
|
2314
|
+
// NOTE: React Native Web has different style resolution rules compared to CSS.
|
|
2315
|
+
// 1. We create styles using StyleSheet.create for better performance
|
|
2316
|
+
// 2. Base styles set the initial fontFamily
|
|
2317
|
+
// 3. variantStyle contains responsive fontSize and other variant-specific styles
|
|
2318
|
+
// 4. webOverrides ensures fontFamily is correctly applied on web platform
|
|
2319
|
+
// (prevents system font stack from being incorrectly applied)
|
|
2320
|
+
// 5. custom style prop has highest precedence
|
|
2321
|
+
// The order matters because RN Web resolves styles by specific properties
|
|
2322
|
+
// rather than last-declaration-wins like in CSS
|
|
2323
|
+
// https://necolas.github.io/react-native-web/docs/styling/#how-it-works
|
|
2324
|
+
var styles = reactNative.StyleSheet.create({
|
|
2325
|
+
base: {
|
|
2326
|
+
fontFamily: theme.fontFamily,
|
|
2327
|
+
},
|
|
2328
|
+
webOverrides: IS_WEB
|
|
2329
|
+
? {
|
|
2330
|
+
fontFamily: theme.fontFamily,
|
|
2331
|
+
}
|
|
2332
|
+
: {},
|
|
2333
|
+
});
|
|
2334
|
+
var combinedStyles = [
|
|
2335
|
+
styles.base,
|
|
2336
|
+
variantStyle,
|
|
2337
|
+
styles.webOverrides,
|
|
2338
|
+
style,
|
|
2339
|
+
];
|
|
2340
|
+
return jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: combinedStyles }, props));
|
|
2319
2341
|
};
|
|
2320
2342
|
|
|
2321
2343
|
var MAX_WIDTH = 1080;
|