@lotics/ui 19.0.0 → 19.0.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/sources.tsx +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "19.0.0",
3
+ "version": "19.0.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./vite": {
package/src/sources.tsx CHANGED
@@ -75,7 +75,7 @@ function SourceChip({ source, openable }: { source: SourceRef; openable?: boolea
75
75
  <View style={[styles.iconDisc, { backgroundColor: tint(k.color, 0.14) }]}>
76
76
  <Icon name={k.icon} size={13} color={solid(k.color)} />
77
77
  </View>
78
- <Text size="xs" weight="medium" numberOfLines={1}>
78
+ <Text size="xs" weight="medium" numberOfLines={1} style={styles.label}>
79
79
  {source.label}
80
80
  </Text>
81
81
  {source.detail ? (
@@ -93,6 +93,14 @@ const styles = StyleSheet.create({
93
93
  chip: {
94
94
  flexDirection: "row",
95
95
  alignItems: "center",
96
+ // A source label is a document TITLE and can be long — "Thành phần hồ sơ
97
+ // mua NOXH — Khoản 7 — Sĩ quan, hạ sĩ quan, quân nhân chuyên nghiệp". The
98
+ // chip must never exceed its row: `numberOfLines` alone cannot truncate a
99
+ // flex child that is free to grow, so the chip is capped and the label is
100
+ // the part that gives way (`flexShrink`), keeping the icon, the locator and
101
+ // the open glyph intact — they are what make the chip readable once the
102
+ // title is clipped.
103
+ maxWidth: "100%",
96
104
  gap: 8,
97
105
  paddingLeft: 5,
98
106
  paddingRight: 10,
@@ -102,8 +110,10 @@ const styles = StyleSheet.create({
102
110
  borderColor: colors.border,
103
111
  backgroundColor: colors.white,
104
112
  },
113
+ label: { flexShrink: 1 },
105
114
  iconDisc: {
106
115
  width: 24,
116
+ flexShrink: 0,
107
117
  height: 24,
108
118
  borderRadius: 7,
109
119
  alignItems: "center",