@swan-io/lake 7.4.1 → 7.4.3

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.4.1",
3
+ "version": "7.4.3",
4
4
  "engines": {
5
5
  "node": ">=18.0.0",
6
6
  "yarn": "^1.22.0"
@@ -8,7 +8,9 @@ import { Icon } from "./Icon";
8
8
  import { LakeText } from "./LakeText";
9
9
  const styles = StyleSheet.create({
10
10
  container: {
11
- alignSelf: "flex-start",
11
+ display: "inline-flex",
12
+ flexDirection: "row",
13
+ alignItems: "center",
12
14
  borderRadius: radii[4],
13
15
  height: spacings[24],
14
16
  },
@@ -65,19 +67,19 @@ export const Tag = ({ children, label, color = "gray", size = "small", icon, ari
65
67
  const tint50 = variant[50];
66
68
  const tint100 = variant[100];
67
69
  const tint200 = variant[200];
68
- return (_jsxs(Box, { direction: "row", alignItems: "center", style: [
69
- styles.container,
70
- size === "large" && styles.larger,
71
- { backgroundColor: tint50 },
72
- style,
73
- ], children: [hasLabel && (_jsx(Box, { alignItems: "center", direction: "row", style: [styles.label, { backgroundColor: tint100, borderColor: tint200 }], children: _jsx(LakeText, { numberOfLines: 1, variant: "smallMedium", style: styles.unselectable, color: primary, children: label }) })), _jsxs(Box, { alignItems: "center", direction: "row", "aria-label": ariaLabel, style: styles.contents, children: [isNotNullish(icon) ? (_jsx(Box, { style: [styles.icon, { width: size === "large" ? spacings[40] : spacings[24] }], alignItems: "center", justifyContent: "center", children: _jsx(Icon, { name: icon, color: primary, size: 16 }) })) : null, children != null ? (_jsx(Box, { direction: "row", alignItems: "center", style: [styles.text, isNotNullish(icon) ? styles.textWithIcon : null], children: isValidElement(children) ? (children) : (_jsx(LakeText, { numberOfLines: 1, variant: "smallMedium", color: primary, style: styles.textContent, children: children })) })) : null] }), onPressRemove != null ? (_jsx(Pressable, { role: "button", onPress: onPressRemove, style: ({ hovered, pressed }) => [
74
- styles.dismiss,
75
- {
76
- color: primary,
77
- width: size === "large" ? spacings[40] : spacings[24],
78
- boxShadow: `-1px 0 ${tint200}`,
79
- },
80
- hovered && { backgroundColor: tint100 },
81
- pressed && { backgroundColor: tint200 },
82
- ], children: _jsx(Icon, { name: "dismiss-regular", color: primary, size: 14, style: styles.dismissIcon }) })) : null, _jsx(View, { style: [styles.border, { boxShadow: `inset 0 0 0 1px ${tint200}` }] })] }));
70
+ return (_jsx(Box, { direction: "row", children: _jsxs(View, { style: [
71
+ styles.container,
72
+ size === "large" && styles.larger,
73
+ { backgroundColor: tint50 },
74
+ style,
75
+ ], children: [hasLabel && (_jsx(Box, { alignItems: "center", direction: "row", style: [styles.label, { backgroundColor: tint100, borderColor: tint200 }], children: _jsx(LakeText, { numberOfLines: 1, variant: "smallMedium", style: styles.unselectable, color: primary, children: label }) })), _jsxs(Box, { alignItems: "center", direction: "row", "aria-label": ariaLabel, style: styles.contents, children: [isNotNullish(icon) ? (_jsx(Box, { style: [styles.icon, { width: size === "large" ? spacings[40] : spacings[24] }], alignItems: "center", justifyContent: "center", children: _jsx(Icon, { name: icon, color: primary, size: 16 }) })) : null, children != null ? (_jsx(Box, { direction: "row", alignItems: "center", style: [styles.text, isNotNullish(icon) ? styles.textWithIcon : null], children: isValidElement(children) ? (children) : (_jsx(LakeText, { numberOfLines: 1, variant: "smallMedium", color: primary, style: styles.textContent, children: children })) })) : null] }), onPressRemove != null ? (_jsx(Pressable, { role: "button", onPress: onPressRemove, style: ({ hovered, pressed }) => [
76
+ styles.dismiss,
77
+ {
78
+ color: primary,
79
+ width: size === "large" ? spacings[40] : spacings[24],
80
+ boxShadow: `-1px 0 ${tint200}`,
81
+ },
82
+ hovered && { backgroundColor: tint100 },
83
+ pressed && { backgroundColor: tint200 },
84
+ ], children: _jsx(Icon, { name: "dismiss-regular", color: primary, size: 14, style: styles.dismissIcon }) })) : null, _jsx(View, { style: [styles.border, { boxShadow: `inset 0 0 0 1px ${tint200}` }] })] }) }));
83
85
  };