@wlloyalty/wll-react-sdk 1.0.66 → 1.0.67
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/index.d.ts +2 -2
- package/dist/native.js +25 -4
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/Icon/index.d.ts +2 -2
- package/dist/web.js +35 -10
- package/dist/web.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as LucideReactIcons from 'lucide-react';
|
|
2
2
|
import * as react_native from 'react-native';
|
|
3
3
|
import { ViewProps, ImageSourcePropType, StyleProp, ViewStyle, TextProps as TextProps$1, TextStyle, ImageProps } from 'react-native';
|
|
4
4
|
import * as React$1 from 'react';
|
|
@@ -304,7 +304,7 @@ type ButtonProps = {
|
|
|
304
304
|
};
|
|
305
305
|
declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => JSX.Element;
|
|
306
306
|
|
|
307
|
-
type IconName = keyof typeof
|
|
307
|
+
type IconName = keyof typeof LucideReactIcons;
|
|
308
308
|
type IconProps = {
|
|
309
309
|
name: IconName;
|
|
310
310
|
color?: string;
|
package/dist/native.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
var Color = require('color');
|
|
6
|
-
var
|
|
6
|
+
var LucideReactIcons = require('lucide-react');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -23,7 +23,7 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
26
|
-
var
|
|
26
|
+
var LucideReactIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideReactIcons);
|
|
27
27
|
|
|
28
28
|
var jsxRuntime = {exports: {}};
|
|
29
29
|
|
|
@@ -2102,14 +2102,35 @@ var Button = function (_a) {
|
|
|
2102
2102
|
}, onPress: onPress, disabled: disabled, accessible: true, role: "button", accessibilityLabel: accessibilityLabel || title, accessibilityHint: accessibilityHint, accessibilityState: { disabled: disabled }, testID: testID, children: jsxRuntimeExports.jsx(reactNative.Text, { style: [styles.text, textStyle], children: title }) }));
|
|
2103
2103
|
};
|
|
2104
2104
|
|
|
2105
|
+
var LucideReactNativeIcons;
|
|
2106
|
+
if (reactNative.Platform.OS !== 'web') {
|
|
2107
|
+
// This dynamic import pattern helps with tree-shaking for web builds
|
|
2108
|
+
try {
|
|
2109
|
+
LucideReactNativeIcons = require('lucide-react-native');
|
|
2110
|
+
}
|
|
2111
|
+
catch (e) {
|
|
2112
|
+
console.warn('lucide-react-native is not installed. Icons may not render correctly on native platforms.');
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2105
2115
|
var Icon = function (_a) {
|
|
2106
2116
|
var name = _a.name, _b = _a.color, color = _b === void 0 ? 'black' : _b, _c = _a.size, size = _c === void 0 ? 24 : _c, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 2 : _d, props = __rest(_a, ["name", "color", "size", "strokeWidth"]);
|
|
2107
|
-
|
|
2117
|
+
// Choose the appropriate icon library based on platform
|
|
2118
|
+
var iconLib = reactNative.Platform.OS === 'web' ? LucideReactIcons__namespace : LucideReactNativeIcons;
|
|
2119
|
+
if (!iconLib) {
|
|
2120
|
+
console.warn('Icon library not available for this platform');
|
|
2121
|
+
return null;
|
|
2122
|
+
}
|
|
2123
|
+
var LucideIcon = iconLib[name];
|
|
2108
2124
|
if (!LucideIcon) {
|
|
2109
2125
|
console.warn("Icon \"".concat(name, "\" not found in Lucide icons"));
|
|
2110
2126
|
return null;
|
|
2111
2127
|
}
|
|
2112
|
-
|
|
2128
|
+
if (reactNative.Platform.OS === 'web') {
|
|
2129
|
+
return (jsxRuntimeExports.jsx(reactNative.View, __assign({}, props, { children: jsxRuntimeExports.jsx(LucideIcon, { color: color, size: size, strokeWidth: strokeWidth }) })));
|
|
2130
|
+
}
|
|
2131
|
+
else {
|
|
2132
|
+
return (jsxRuntimeExports.jsx(reactNative.View, __assign({}, props, { children: jsxRuntimeExports.jsx(LucideIcon, { color: color, size: size, strokeWidth: strokeWidth }) })));
|
|
2133
|
+
}
|
|
2113
2134
|
};
|
|
2114
2135
|
|
|
2115
2136
|
var LoadingIndicator = function () {
|