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

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,19 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to `@boostdev/design-system-react-native` are documented here.
4
+ ## [0.2.5] - 2026-06-12
5
+ ### Fixed
6
+ - Fix(side-sheet): body sizes to content instead of collapsing to zero height
7
+
8
+ The panel is content-sized (maxHeight 90%, no explicit height). Yoga
9
+ resolves a flex:1 child of an auto-height parent to basis 0 with nothing
10
+ to grow into, so the body collapsed to zero height: opening a SideSheet
11
+ showed only the header bar (title + close), with all children invisible.
12
+
13
+ body now uses flexShrink:1, so it sizes to its content and shrinks (for
14
+ inner scrolling) once the panel hits maxHeight. The body View gained
15
+ testID "bds-sidesheet-body"; the spec pins no-flex-grow + shrinkability. ([`8242d9d`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/8242d9dd795d3d4ece0513f4002f951f13469a2e))
16
+
4
17
  ## [0.2.4] - 2026-06-11
5
18
  ### Fixed
6
19
  - Fix(form): optical vertical centering for single-line input text
package/dist/index.cjs CHANGED
@@ -3884,7 +3884,9 @@ var styles41 = import_react_native45.StyleSheet.create({
3884
3884
  lineHeight: 24
3885
3885
  },
3886
3886
  body: {
3887
- flex: 1
3887
+ // The panel is content-sized (maxHeight only): a flex-grow body would
3888
+ // resolve to zero height there. Shrink past maxHeight, never grow.
3889
+ flexShrink: 1
3888
3890
  }
3889
3891
  });
3890
3892
  function SideSheet({
@@ -3993,7 +3995,7 @@ function SideSheet({
3993
3995
  ]
3994
3996
  }
3995
3997
  ),
3996
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native45.View, { style: styles41.body, children })
3998
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native45.View, { style: styles41.body, testID: "bds-sidesheet-body", children })
3997
3999
  ]
3998
4000
  }
3999
4001
  )
package/dist/index.js CHANGED
@@ -3877,7 +3877,9 @@ var styles41 = StyleSheet41.create({
3877
3877
  lineHeight: 24
3878
3878
  },
3879
3879
  body: {
3880
- flex: 1
3880
+ // The panel is content-sized (maxHeight only): a flex-grow body would
3881
+ // resolve to zero height there. Shrink past maxHeight, never grow.
3882
+ flexShrink: 1
3881
3883
  }
3882
3884
  });
3883
3885
  function SideSheet({
@@ -3986,7 +3988,7 @@ function SideSheet({
3986
3988
  ]
3987
3989
  }
3988
3990
  ),
3989
- /* @__PURE__ */ jsx45(View38, { style: styles41.body, children })
3991
+ /* @__PURE__ */ jsx45(View38, { style: styles41.body, testID: "bds-sidesheet-body", children })
3990
3992
  ]
3991
3993
  }
3992
3994
  )
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.5",
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>