@avenue-ticketing/native 0.1.0 → 0.1.2

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/input.js CHANGED
@@ -17,6 +17,7 @@ import { CheckIcon } from 'phosphor-react-native/src/icons/Check';
17
17
  import Svg, { Path } from 'react-native-svg';
18
18
  import { MagnifyingGlassIcon } from 'phosphor-react-native/src/icons/MagnifyingGlass';
19
19
  import { XIcon } from 'phosphor-react-native/src/icons/X';
20
+ import { IconContext } from 'phosphor-react-native/src/lib';
20
21
  import { styled } from 'nativewind';
21
22
  import DateTimePicker from '@react-native-community/datetimepicker';
22
23
  import { CalendarBlankIcon } from 'phosphor-react-native/src/icons/CalendarBlank';
@@ -6648,6 +6649,12 @@ var Button = ({
6648
6649
  const isInactive = disabled || loading;
6649
6650
  const showTitle = Boolean(titleText) && (!loading || showTextWhileLoading);
6650
6651
  const iconSizePx = resolveButtonIconSizePx(size, isIcon);
6652
+ const iconToken = buttonStyles.colors[color].icon.replace(/^text-/, "");
6653
+ const onSolid = iconToken.startsWith("white");
6654
+ const resolvedIconColor = useNativeVariable(
6655
+ onSolid ? "--color-white" : iconToken.startsWith("fg-") ? `--color-${iconToken}` : `--color-text-${iconToken}`
6656
+ );
6657
+ const iconColor = onSolid ? "rgba(255,255,255,0.7)" : typeof resolvedIconColor === "string" ? resolvedIconColor : void 0;
6651
6658
  const iconClassName = cx(
6652
6659
  buttonStyles.common.icon,
6653
6660
  resolveButtonIconSizeClass(size, isIcon),
@@ -6691,8 +6698,10 @@ var Button = ({
6691
6698
  /* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.topHighlight })
6692
6699
  ] }),
6693
6700
  !flattenInGroup && isSecondarySkeuomorphic(color) && /* @__PURE__ */ jsx(View, { pointerEvents: "none", className: nativeButtonInteraction.clip, children: /* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.secondaryBottom }) }),
6694
- isValidElement(IconLeading) && !loading && IconLeading,
6695
- LeadingIcon && !loading && /* @__PURE__ */ jsx(LeadingIcon, { className: iconClassName, size: iconSizePx }),
6701
+ /* @__PURE__ */ jsxs(IconContext.Provider, { value: iconColor ? { color: iconColor } : {}, children: [
6702
+ isValidElement(IconLeading) && !loading && IconLeading,
6703
+ LeadingIcon && !loading && /* @__PURE__ */ jsx(LeadingIcon, { className: iconClassName, size: iconSizePx })
6704
+ ] }),
6696
6705
  loading && /* @__PURE__ */ jsx(
6697
6706
  ButtonSpinner,
6698
6707
  {
@@ -6718,8 +6727,10 @@ var Button = ({
6718
6727
  }
6719
6728
  ),
6720
6729
  !loading && customChildren,
6721
- isValidElement(IconTrailing) && !loading && IconTrailing,
6722
- TrailingIcon && !loading && /* @__PURE__ */ jsx(TrailingIcon, { className: iconClassName, size: iconSizePx })
6730
+ /* @__PURE__ */ jsxs(IconContext.Provider, { value: iconColor ? { color: iconColor } : {}, children: [
6731
+ isValidElement(IconTrailing) && !loading && IconTrailing,
6732
+ TrailingIcon && !loading && /* @__PURE__ */ jsx(TrailingIcon, { className: iconClassName, size: iconSizePx })
6733
+ ] })
6723
6734
  ] })
6724
6735
  }
6725
6736
  );