@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.
@@ -1,6 +1,6 @@
1
- import * as LucideIcons from 'lucide-react';
1
+ import * as LucideReactIcons from 'lucide-react';
2
2
  import { ViewProps } from 'react-native';
3
- type IconName = keyof typeof LucideIcons;
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 LucideIcons = require('lucide-react');
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 LucideIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideIcons);
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;
@@ -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
- var LucideIcon = LucideIcons__namespace[name];
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
- return jsxRuntimeExports.jsx(View$2, __assign({}, props, {
10078
- children: jsxRuntimeExports.jsx(LucideIcon, {
10079
- color: color,
10080
- size: size,
10081
- strokeWidth: strokeWidth
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"];