@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 CHANGED
@@ -1,4 +1,4 @@
1
- import * as LucideIcons from 'lucide-react';
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 LucideIcons;
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 LucideIcons = require('lucide-react');
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 LucideIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideIcons);
26
+ var LucideReactIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideReactIcons);
27
27
 
28
28
  var jsxRuntime = {exports: {}};
29
29
 
@@ -1669,14 +1669,11 @@ var validateTheme = function (theme) {
1669
1669
  var requiredColors = [
1670
1670
  'accent',
1671
1671
  'background',
1672
- 'errorPrimary',
1673
- 'negative',
1674
- 'pageButtonBackground',
1675
- 'pageButtonText',
1676
- 'positive',
1677
1672
  'primary',
1678
1673
  'surface',
1679
1674
  'surfaceText',
1675
+ 'positive',
1676
+ 'negative',
1680
1677
  'text',
1681
1678
  ];
1682
1679
  return requiredColors.every(function (color) { return theme[color] && isValidColor(theme[color]); });
@@ -2102,14 +2099,35 @@ var Button = function (_a) {
2102
2099
  }, 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
2100
  };
2104
2101
 
2102
+ var LucideReactNativeIcons;
2103
+ if (reactNative.Platform.OS !== 'web') {
2104
+ // This dynamic import pattern helps with tree-shaking for web builds
2105
+ try {
2106
+ LucideReactNativeIcons = require('lucide-react-native');
2107
+ }
2108
+ catch (e) {
2109
+ console.warn('lucide-react-native is not installed. Icons may not render correctly on native platforms.');
2110
+ }
2111
+ }
2105
2112
  var Icon = function (_a) {
2106
2113
  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
- var LucideIcon = LucideIcons__namespace[name];
2114
+ // Choose the appropriate icon library based on platform
2115
+ var iconLib = reactNative.Platform.OS === 'web' ? LucideReactIcons__namespace : LucideReactNativeIcons;
2116
+ if (!iconLib) {
2117
+ console.warn('Icon library not available for this platform');
2118
+ return null;
2119
+ }
2120
+ var LucideIcon = iconLib[name];
2108
2121
  if (!LucideIcon) {
2109
2122
  console.warn("Icon \"".concat(name, "\" not found in Lucide icons"));
2110
2123
  return null;
2111
2124
  }
2112
- return (jsxRuntimeExports.jsx(reactNative.View, __assign({}, props, { children: jsxRuntimeExports.jsx(LucideIcon, { color: color, size: size, strokeWidth: strokeWidth }) })));
2125
+ if (reactNative.Platform.OS === 'web') {
2126
+ return (jsxRuntimeExports.jsx(reactNative.View, __assign({}, props, { children: jsxRuntimeExports.jsx(LucideIcon, { color: color, size: size, strokeWidth: strokeWidth }) })));
2127
+ }
2128
+ else {
2129
+ return (jsxRuntimeExports.jsx(reactNative.View, __assign({}, props, { children: jsxRuntimeExports.jsx(LucideIcon, { color: color, size: size, strokeWidth: strokeWidth }) })));
2130
+ }
2113
2131
  };
2114
2132
 
2115
2133
  var LoadingIndicator = function () {
@@ -4562,8 +4580,6 @@ var useTierTileStyles = function () {
4562
4580
  },
4563
4581
  name: {
4564
4582
  marginBottom: 0,
4565
- numberOfLines: 1,
4566
- ellipsizeMode: 'tail',
4567
4583
  },
4568
4584
  });
4569
4585
  };