@swan-io/lake 7.2.5 → 7.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/lake",
3
- "version": "7.2.5",
3
+ "version": "7.3.0",
4
4
  "engines": {
5
5
  "node": ">=18.0.0",
6
6
  "yarn": "^1.22.0"
@@ -71,7 +71,7 @@ export declare const BalanceCell: ({ value, currency, originalValue, formatCurre
71
71
  textAlign?: "left" | "right" | "center" | undefined;
72
72
  variant?: "light" | "semibold" | "medium" | "regular" | "smallSemibold" | "smallMedium" | "smallRegular" | undefined;
73
73
  }) => import("react/jsx-runtime").JSX.Element;
74
- export declare const LinkCell: ({ children, external, onPress, variant, tooltip, }: {
74
+ export declare const LinkCell: ({ children, external, onPress, variant, tooltip, buttonPosition, }: {
75
75
  children: ReactNode;
76
76
  onPress: () => void;
77
77
  external?: boolean | undefined;
@@ -90,6 +90,7 @@ export declare const LinkCell: ({ children, external, onPress, variant, tooltip,
90
90
  containerStyle?: import("react-native").StyleProp<import("react-native").ViewStyle>;
91
91
  disabled?: boolean | undefined;
92
92
  } & import("react").RefAttributes<import("./LakeTooltip").TooltipRef>, "children"> | undefined;
93
+ buttonPosition?: "end" | "start" | undefined;
93
94
  }) => import("react/jsx-runtime").JSX.Element;
94
95
  export declare const StartAlignedCell: ({ children }: {
95
96
  children: ReactNode;
@@ -142,11 +142,12 @@ export const BalanceCell = ({ value, currency, originalValue, formatCurrency, te
142
142
  value < 0 && { color: colors.negative.primary },
143
143
  ], children: [value > 0 && "+", formatCurrency(value, currency)] }) }), isNotNullish(originalValue) && originalValue.currency !== currency && (_jsx(View, { style: styles.cell, children: _jsxs(LakeText, { style: styles.mediumText, align: textAlign, color: colors.gray[500], variant: "smallRegular", children: [originalValue.value > 0 && "+", formatCurrency(originalValue.value, originalValue.currency)] }) }))] }));
144
144
  };
145
- export const LinkCell = ({ children, external = false, onPress, variant = "medium", tooltip, }) => {
146
- return (_jsxs(View, { style: styles.cell, children: [_jsx(Pressable, { style: ({ hovered }) => [styles.icon, hovered && styles.underline], onPress: event => {
147
- event.preventDefault();
148
- onPress();
149
- }, children: _jsx(Icon, { size: 14, name: external ? "open-regular" : "arrow-right-filled" }) }), _jsx(Space, { width: 8 }), _jsx(LakeText, { color: colors.gray[900], variant: variant, style: styles.mediumText, tooltip: tooltip, children: children })] }));
145
+ export const LinkCell = ({ children, external = false, onPress, variant = "medium", tooltip, buttonPosition = "start", }) => {
146
+ const ArrowButton = () => (_jsx(Pressable, { style: ({ hovered }) => [styles.icon, hovered && styles.underline], onPress: event => {
147
+ event.preventDefault();
148
+ onPress();
149
+ }, children: _jsx(Icon, { size: 14, name: external ? "open-regular" : "arrow-right-filled" }) }));
150
+ return (_jsxs(View, { style: styles.cell, children: [buttonPosition === "start" && (_jsxs(_Fragment, { children: [_jsx(ArrowButton, {}), _jsx(Space, { width: 8 })] })), _jsx(LakeText, { color: colors.gray[900], variant: variant, style: styles.mediumText, tooltip: tooltip, children: children }), buttonPosition === "end" && (_jsxs(_Fragment, { children: [_jsx(Space, { width: 8 }), _jsx(ArrowButton, {})] }))] }));
150
151
  };
151
152
  export const StartAlignedCell = ({ children }) => {
152
153
  return _jsx(View, { style: styles.cell, children: children });