@boostdev/design-system-react-native 0.2.4 → 0.2.6

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/CHANGELOG.md CHANGED
@@ -1,6 +1,29 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to `@boostdev/design-system-react-native` are documented here.
4
+ ## [0.2.6] - 2026-06-15
5
+ ### Fixed
6
+ - Fix(collapsible): render the disclosure indicator as a border-box chevron instead of the ▸ (U+25B8) glyph char
7
+
8
+ The Collapsible's caret was a text glyph, which reads as a stray unicode
9
+ character rather than a crisp icon. It is now a small View with two adjacent
10
+ borders, rotated -45deg when collapsed (points right) to 45deg when expanded
11
+ (points down) — font-independent and icon-like, with the toggle animation
12
+ preserved. The spec pins it as a border chevron, not a glyph. ([`ee649db`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/ee649db))
13
+
14
+ ## [0.2.5] - 2026-06-12
15
+ ### Fixed
16
+ - Fix(side-sheet): body sizes to content instead of collapsing to zero height
17
+
18
+ The panel is content-sized (maxHeight 90%, no explicit height). Yoga
19
+ resolves a flex:1 child of an auto-height parent to basis 0 with nothing
20
+ to grow into, so the body collapsed to zero height: opening a SideSheet
21
+ showed only the header bar (title + close), with all children invisible.
22
+
23
+ body now uses flexShrink:1, so it sizes to its content and shrinks (for
24
+ inner scrolling) once the panel hits maxHeight. The body View gained
25
+ testID "bds-sidesheet-body"; the spec pins no-flex-grow + shrinkability. ([`8242d9d`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/8242d9dd795d3d4ece0513f4002f951f13469a2e))
26
+
4
27
  ## [0.2.4] - 2026-06-11
5
28
  ### Fixed
6
29
  - Fix(form): optical vertical centering for single-line input text
package/dist/index.cjs CHANGED
@@ -1145,7 +1145,12 @@ var styles15 = import_react_native17.StyleSheet.create({
1145
1145
  lineHeight: lineHeight.body
1146
1146
  },
1147
1147
  chevron: {
1148
- fontSize: import_native.font.size.body,
1148
+ // Border-box chevron (no glyph font dependency): a small square with two
1149
+ // adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
1150
+ width: 8,
1151
+ height: 8,
1152
+ borderRightWidth: 2,
1153
+ borderBottomWidth: 2,
1149
1154
  marginStart: import_native.spacing.xs
1150
1155
  },
1151
1156
  content: {
@@ -1184,9 +1189,9 @@ function Collapsible({
1184
1189
  }
1185
1190
  onToggle?.(next);
1186
1191
  }, [isOpen, isControlled, onToggle, rotation]);
1187
- const rotateZ = rotation.interpolate({
1192
+ const rotate = rotation.interpolate({
1188
1193
  inputRange: [0, 1],
1189
- outputRange: ["0deg", "90deg"]
1194
+ outputRange: ["-45deg", "45deg"]
1190
1195
  });
1191
1196
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1192
1197
  import_react_native17.View,
@@ -1205,12 +1210,12 @@ function Collapsible({
1205
1210
  children: [
1206
1211
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native17.Text, { style: [styles15.summaryText, { color: colors2.colorOnBg }], children: summary }),
1207
1212
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1208
- import_react_native17.Animated.Text,
1213
+ import_react_native17.Animated.View,
1209
1214
  {
1210
- style: [styles15.chevron, { color: colors2.colorOnBgSubtle, transform: [{ rotateZ }] }],
1215
+ testID: "bds-collapsible-chevron",
1216
+ style: [styles15.chevron, { borderColor: colors2.colorOnBgSubtle, transform: [{ rotate }] }],
1211
1217
  importantForAccessibility: "no",
1212
- accessibilityElementsHidden: true,
1213
- children: "\u25B8"
1218
+ accessibilityElementsHidden: true
1214
1219
  }
1215
1220
  )
1216
1221
  ]
@@ -3884,7 +3889,9 @@ var styles41 = import_react_native45.StyleSheet.create({
3884
3889
  lineHeight: 24
3885
3890
  },
3886
3891
  body: {
3887
- flex: 1
3892
+ // The panel is content-sized (maxHeight only): a flex-grow body would
3893
+ // resolve to zero height there. Shrink past maxHeight, never grow.
3894
+ flexShrink: 1
3888
3895
  }
3889
3896
  });
3890
3897
  function SideSheet({
@@ -3993,7 +4000,7 @@ function SideSheet({
3993
4000
  ]
3994
4001
  }
3995
4002
  ),
3996
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native45.View, { style: styles41.body, children })
4003
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native45.View, { style: styles41.body, testID: "bds-sidesheet-body", children })
3997
4004
  ]
3998
4005
  }
3999
4006
  )
package/dist/index.js CHANGED
@@ -1059,7 +1059,12 @@ var styles15 = StyleSheet15.create({
1059
1059
  lineHeight: lineHeight.body
1060
1060
  },
1061
1061
  chevron: {
1062
- fontSize: font.size.body,
1062
+ // Border-box chevron (no glyph font dependency): a small square with two
1063
+ // adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
1064
+ width: 8,
1065
+ height: 8,
1066
+ borderRightWidth: 2,
1067
+ borderBottomWidth: 2,
1063
1068
  marginStart: spacing.xs
1064
1069
  },
1065
1070
  content: {
@@ -1098,9 +1103,9 @@ function Collapsible({
1098
1103
  }
1099
1104
  onToggle?.(next);
1100
1105
  }, [isOpen, isControlled, onToggle, rotation]);
1101
- const rotateZ = rotation.interpolate({
1106
+ const rotate = rotation.interpolate({
1102
1107
  inputRange: [0, 1],
1103
- outputRange: ["0deg", "90deg"]
1108
+ outputRange: ["-45deg", "45deg"]
1104
1109
  });
1105
1110
  return /* @__PURE__ */ jsxs9(
1106
1111
  View12,
@@ -1119,12 +1124,12 @@ function Collapsible({
1119
1124
  children: [
1120
1125
  /* @__PURE__ */ jsx17(Text13, { style: [styles15.summaryText, { color: colors2.colorOnBg }], children: summary }),
1121
1126
  /* @__PURE__ */ jsx17(
1122
- Animated2.Text,
1127
+ Animated2.View,
1123
1128
  {
1124
- style: [styles15.chevron, { color: colors2.colorOnBgSubtle, transform: [{ rotateZ }] }],
1129
+ testID: "bds-collapsible-chevron",
1130
+ style: [styles15.chevron, { borderColor: colors2.colorOnBgSubtle, transform: [{ rotate }] }],
1125
1131
  importantForAccessibility: "no",
1126
- accessibilityElementsHidden: true,
1127
- children: "\u25B8"
1132
+ accessibilityElementsHidden: true
1128
1133
  }
1129
1134
  )
1130
1135
  ]
@@ -3877,7 +3882,9 @@ var styles41 = StyleSheet41.create({
3877
3882
  lineHeight: 24
3878
3883
  },
3879
3884
  body: {
3880
- flex: 1
3885
+ // The panel is content-sized (maxHeight only): a flex-grow body would
3886
+ // resolve to zero height there. Shrink past maxHeight, never grow.
3887
+ flexShrink: 1
3881
3888
  }
3882
3889
  });
3883
3890
  function SideSheet({
@@ -3986,7 +3993,7 @@ function SideSheet({
3986
3993
  ]
3987
3994
  }
3988
3995
  ),
3989
- /* @__PURE__ */ jsx45(View38, { style: styles41.body, children })
3996
+ /* @__PURE__ */ jsx45(View38, { style: styles41.body, testID: "bds-sidesheet-body", children })
3990
3997
  ]
3991
3998
  }
3992
3999
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boostdev/design-system-react-native",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "BoostDev React Native component library: accessible, token-driven components built on @boostdev/design-system-foundation",
5
5
  "keywords": [
6
6
  "react-native",
@@ -77,4 +77,18 @@ describe('SideSheet (native)', () => {
77
77
  );
78
78
  expect(container).toBeInTheDocument();
79
79
  });
80
+
81
+ // The panel is content-sized (maxHeight only). A flex-grow body inside an
82
+ // auto-height parent resolves to zero height in Yoga, collapsing the sheet
83
+ // to just its header bar. The body must shrink, never grow from basis 0.
84
+ it('sizes the body to its content (no flex-grow collapse)', () => {
85
+ renderWithTheme(
86
+ <SideSheet isOpen onClose={() => {}} title="Sized">
87
+ <span>Body</span>
88
+ </SideSheet>,
89
+ );
90
+ const body = screen.getByTestId('bds-sidesheet-body');
91
+ expect(body).not.toHaveStyle({ flexGrow: '1' });
92
+ expect(body).toHaveStyle({ flexShrink: '1' });
93
+ });
80
94
  });
@@ -65,7 +65,9 @@ const styles = StyleSheet.create({
65
65
  lineHeight: 24,
66
66
  },
67
67
  body: {
68
- flex: 1,
68
+ // The panel is content-sized (maxHeight only): a flex-grow body would
69
+ // resolve to zero height there. Shrink past maxHeight, never grow.
70
+ flexShrink: 1,
69
71
  },
70
72
  });
71
73
 
@@ -167,7 +169,9 @@ export function SideSheet({
167
169
  </Text>
168
170
  </Pressable>
169
171
  </View>
170
- <View style={styles.body}>{children}</View>
172
+ <View style={styles.body} testID="bds-sidesheet-body">
173
+ {children}
174
+ </View>
171
175
  </Animated.View>
172
176
  </View>
173
177
  </Modal>
@@ -16,6 +16,17 @@ describe('Collapsible (native)', () => {
16
16
  expect(screen.getByText('Details')).toBeInTheDocument();
17
17
  });
18
18
 
19
+ it('renders the disclosure indicator as a border chevron, not a glyph char', () => {
20
+ renderWithTheme(
21
+ <Collapsible summary="Details">
22
+ <span>Content</span>
23
+ </Collapsible>,
24
+ );
25
+ const chevron = screen.getByTestId('bds-collapsible-chevron');
26
+ expect(chevron).toHaveStyle({ borderRightWidth: 2 });
27
+ expect(chevron).not.toHaveTextContent('▸');
28
+ });
29
+
19
30
  it('hides content by default', () => {
20
31
  renderWithTheme(
21
32
  <Collapsible summary="Details">
@@ -58,7 +58,12 @@ const styles = StyleSheet.create({
58
58
  lineHeight: lineHeight.body,
59
59
  },
60
60
  chevron: {
61
- fontSize: font.size.body,
61
+ // Border-box chevron (no glyph font dependency): a small square with two
62
+ // adjacent borders, rotated to form a crisp "›" / "⌄" disclosure indicator.
63
+ width: 8,
64
+ height: 8,
65
+ borderRightWidth: 2,
66
+ borderBottomWidth: 2,
62
67
  marginStart: spacing.xs,
63
68
  },
64
69
  content: {
@@ -103,9 +108,10 @@ export function Collapsible({
103
108
  onToggle?.(next);
104
109
  }, [isOpen, isControlled, onToggle, rotation]);
105
110
 
106
- const rotateZ = rotation.interpolate({
111
+ // Chevron points right when collapsed (-45deg) and down when expanded (45deg).
112
+ const rotate = rotation.interpolate({
107
113
  inputRange: [0, 1],
108
- outputRange: ['0deg', '90deg'],
114
+ outputRange: ['-45deg', '45deg'],
109
115
  });
110
116
 
111
117
  return (
@@ -121,13 +127,12 @@ export function Collapsible({
121
127
  style={({ pressed }) => [styles.header, pressed && styles.pressed]}
122
128
  >
123
129
  <Text style={[styles.summaryText, { color: colors.colorOnBg }]}>{summary}</Text>
124
- <Animated.Text
125
- style={[styles.chevron, { color: colors.colorOnBgSubtle, transform: [{ rotateZ }] }]}
130
+ <Animated.View
131
+ testID="bds-collapsible-chevron"
132
+ style={[styles.chevron, { borderColor: colors.colorOnBgSubtle, transform: [{ rotate }] }]}
126
133
  importantForAccessibility="no"
127
134
  accessibilityElementsHidden={true}
128
- >
129
- ▸
130
- </Animated.Text>
135
+ />
131
136
  </Pressable>
132
137
  {isOpen && (
133
138
  <View style={styles.content}>