@wlloyalty/wll-react-sdk 1.0.66 → 1.0.68
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 +27 -11
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/Icon/index.d.ts +2 -2
- package/dist/types/components/organisms/TierTileUpdated/styles.d.ts +0 -2
- package/dist/web.js +37 -14
- package/dist/web.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as LucideReactIcons from 'lucide-react';
|
|
2
2
|
import { ViewProps } from 'react-native';
|
|
3
|
-
type IconName = keyof typeof
|
|
3
|
+
type IconName = keyof typeof LucideReactIcons;
|
|
4
4
|
type IconProps = {
|
|
5
5
|
name: IconName;
|
|
6
6
|
color?: string;
|
package/dist/web.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var Color = require('color');
|
|
5
|
-
var
|
|
5
|
+
var LucideReactIcons = require('lucide-react');
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -22,7 +22,7 @@ function _interopNamespaceDefault(e) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
|
-
var
|
|
25
|
+
var LucideReactIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideReactIcons);
|
|
26
26
|
|
|
27
27
|
function getDefaultExportFromCjs (x) {
|
|
28
28
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -9398,7 +9398,7 @@ var isValidColor = function (color) {
|
|
|
9398
9398
|
* @returns Boolean indicating if theme is valid
|
|
9399
9399
|
*/
|
|
9400
9400
|
var validateTheme = function (theme) {
|
|
9401
|
-
var requiredColors = ['accent', 'background', '
|
|
9401
|
+
var requiredColors = ['accent', 'background', 'primary', 'surface', 'surfaceText', 'positive', 'negative', 'text'];
|
|
9402
9402
|
return requiredColors.every(function (color) {
|
|
9403
9403
|
return theme[color] && isValidColor(theme[color]);
|
|
9404
9404
|
});
|
|
@@ -10060,6 +10060,15 @@ var Button = function (_a) {
|
|
|
10060
10060
|
});
|
|
10061
10061
|
};
|
|
10062
10062
|
|
|
10063
|
+
var LucideReactNativeIcons;
|
|
10064
|
+
if (Platform$1.OS !== 'web') {
|
|
10065
|
+
// This dynamic import pattern helps with tree-shaking for web builds
|
|
10066
|
+
try {
|
|
10067
|
+
LucideReactNativeIcons = require('lucide-react-native');
|
|
10068
|
+
} catch (e) {
|
|
10069
|
+
console.warn('lucide-react-native is not installed. Icons may not render correctly on native platforms.');
|
|
10070
|
+
}
|
|
10071
|
+
}
|
|
10063
10072
|
var Icon = function (_a) {
|
|
10064
10073
|
var name = _a.name,
|
|
10065
10074
|
_b = _a.color,
|
|
@@ -10069,18 +10078,34 @@ var Icon = function (_a) {
|
|
|
10069
10078
|
_d = _a.strokeWidth,
|
|
10070
10079
|
strokeWidth = _d === void 0 ? 2 : _d,
|
|
10071
10080
|
props = __rest(_a, ["name", "color", "size", "strokeWidth"]);
|
|
10072
|
-
|
|
10081
|
+
// Choose the appropriate icon library based on platform
|
|
10082
|
+
var iconLib = Platform$1.OS === 'web' ? LucideReactIcons__namespace : LucideReactNativeIcons;
|
|
10083
|
+
if (!iconLib) {
|
|
10084
|
+
console.warn('Icon library not available for this platform');
|
|
10085
|
+
return null;
|
|
10086
|
+
}
|
|
10087
|
+
var LucideIcon = iconLib[name];
|
|
10073
10088
|
if (!LucideIcon) {
|
|
10074
10089
|
console.warn("Icon \"".concat(name, "\" not found in Lucide icons"));
|
|
10075
10090
|
return null;
|
|
10076
10091
|
}
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10092
|
+
if (Platform$1.OS === 'web') {
|
|
10093
|
+
return jsxRuntimeExports.jsx(View$2, __assign({}, props, {
|
|
10094
|
+
children: jsxRuntimeExports.jsx(LucideIcon, {
|
|
10095
|
+
color: color,
|
|
10096
|
+
size: size,
|
|
10097
|
+
strokeWidth: strokeWidth
|
|
10098
|
+
})
|
|
10099
|
+
}));
|
|
10100
|
+
} else {
|
|
10101
|
+
return jsxRuntimeExports.jsx(View$2, __assign({}, props, {
|
|
10102
|
+
children: jsxRuntimeExports.jsx(LucideIcon, {
|
|
10103
|
+
color: color,
|
|
10104
|
+
size: size,
|
|
10105
|
+
strokeWidth: strokeWidth
|
|
10106
|
+
})
|
|
10107
|
+
}));
|
|
10108
|
+
}
|
|
10084
10109
|
};
|
|
10085
10110
|
|
|
10086
10111
|
var _excluded$8 = ["animating", "color", "hidesWhenStopped", "size", "style"];
|
|
@@ -23259,9 +23284,7 @@ var useTierTileStyles = function () {
|
|
|
23259
23284
|
resizeMode: 'cover'
|
|
23260
23285
|
},
|
|
23261
23286
|
name: {
|
|
23262
|
-
marginBottom: 0
|
|
23263
|
-
numberOfLines: 1,
|
|
23264
|
-
ellipsizeMode: 'tail'
|
|
23287
|
+
marginBottom: 0
|
|
23265
23288
|
}
|
|
23266
23289
|
});
|
|
23267
23290
|
};
|