@boostdev/design-system-react-native 0.3.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,6 +1,23 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to `@boostdev/design-system-react-native` are documented here.
4
+ ## [0.4.0] - 2026-09-24
5
+ ### Added
6
+ - Feat(segmented-control): xlarge size with a 56 pt tap target
7
+
8
+ CoachHelpr requires 56 pt tap targets app-wide (the DS Button's own
9
+ `large` is already 56 high). SegmentedControl's largest size was 48,
10
+ short of that minimum.
11
+
12
+ Add an additive `xlarge` size (minHeight 56, font.size.body,
13
+ px spacing.m, py spacing.s) alongside the existing small/medium/large —
14
+ no change to their values. Cover it with a spec asserting a rendered
15
+ xlarge segment has a 56px minHeight, add an XLarge story, and document
16
+ the new size in the component's size table and props reference in
17
+ SegmentedControl.mdx.
18
+
19
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`4e3121d`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/4e3121db4c8f7f1931bcdb8c78a28337ee78d259))
20
+
4
21
  ## [0.3.0] - 2026-09-23
5
22
  ### Added
6
23
  - Feat(alert): support arbitrary and theme-aware children
package/dist/index.cjs CHANGED
@@ -2891,7 +2891,8 @@ var TRACK_PADDING = import_native.spacing.xxxs;
2891
2891
  var sizeTokens2 = {
2892
2892
  small: { minHeight: 32, fontSize: import_native.font.size.bodyS, px: import_native.spacing.s, py: import_native.spacing.xxs },
2893
2893
  medium: { minHeight: 44, fontSize: import_native.font.size.body, px: import_native.spacing.m, py: import_native.spacing.xs },
2894
- large: { minHeight: 48, fontSize: import_native.font.size.body, px: import_native.spacing.m, py: import_native.spacing.s }
2894
+ large: { minHeight: 48, fontSize: import_native.font.size.body, px: import_native.spacing.m, py: import_native.spacing.s },
2895
+ xlarge: { minHeight: 56, fontSize: import_native.font.size.body, px: import_native.spacing.m, py: import_native.spacing.s }
2895
2896
  };
2896
2897
  var thumbShadow = {
2897
2898
  shadowColor: "#000",
package/dist/index.d.cts CHANGED
@@ -468,7 +468,7 @@ interface ComboboxProps {
468
468
  }
469
469
  declare function Combobox({ label, name, options, placeholder, value, onChange, disabled, error, hint, style, }: Readonly<ComboboxProps>): react_jsx_runtime.JSX.Element;
470
470
 
471
- type SegmentedControlSize = 'small' | 'medium' | 'large';
471
+ type SegmentedControlSize = 'small' | 'medium' | 'large' | 'xlarge';
472
472
  type SegmentedControlVariant = 'outline' | 'filled';
473
473
  interface SegmentedControlProps {
474
474
  selectedIndex?: number;
package/dist/index.d.ts CHANGED
@@ -468,7 +468,7 @@ interface ComboboxProps {
468
468
  }
469
469
  declare function Combobox({ label, name, options, placeholder, value, onChange, disabled, error, hint, style, }: Readonly<ComboboxProps>): react_jsx_runtime.JSX.Element;
470
470
 
471
- type SegmentedControlSize = 'small' | 'medium' | 'large';
471
+ type SegmentedControlSize = 'small' | 'medium' | 'large' | 'xlarge';
472
472
  type SegmentedControlVariant = 'outline' | 'filled';
473
473
  interface SegmentedControlProps {
474
474
  selectedIndex?: number;
package/dist/index.js CHANGED
@@ -2844,7 +2844,8 @@ var TRACK_PADDING = spacing.xxxs;
2844
2844
  var sizeTokens2 = {
2845
2845
  small: { minHeight: 32, fontSize: font.size.bodyS, px: spacing.s, py: spacing.xxs },
2846
2846
  medium: { minHeight: 44, fontSize: font.size.body, px: spacing.m, py: spacing.xs },
2847
- large: { minHeight: 48, fontSize: font.size.body, px: spacing.m, py: spacing.s }
2847
+ large: { minHeight: 48, fontSize: font.size.body, px: spacing.m, py: spacing.s },
2848
+ xlarge: { minHeight: 56, fontSize: font.size.body, px: spacing.m, py: spacing.s }
2848
2849
  };
2849
2850
  var thumbShadow = {
2850
2851
  shadowColor: "#000",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boostdev/design-system-react-native",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
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",
@@ -5,7 +5,7 @@ import * as Stories from './SegmentedControl.stories';
5
5
 
6
6
  # SegmentedControl (React Native)
7
7
 
8
- A horizontal control with multiple segments, where each segment acts as a tab. Supports `outline` and `filled` variants with three size options.
8
+ A horizontal control with multiple segments, where each segment acts as a tab. Supports `outline` and `filled` variants with four size options.
9
9
 
10
10
  > **Status: alpha** -- API may change before stable release.
11
11
 
@@ -46,6 +46,9 @@ function Example() {
46
46
  ### Large
47
47
  <Canvas of={Stories.Large} />
48
48
 
49
+ ### XLarge
50
+ <Canvas of={Stories.XLarge} />
51
+
49
52
  ### Disabled
50
53
  <Canvas of={Stories.Disabled} />
51
54
 
@@ -65,16 +68,27 @@ function Example() {
65
68
  |------|------|---------|-------------|
66
69
  | `selectedIndex` | number | `0` | Zero-based index of the active segment |
67
70
  | `disabled` | boolean | `false` | Disables all segments |
68
- | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Controls height and font size |
71
+ | `size` | `'small' \| 'medium' \| 'large' \| 'xlarge'` | `'medium'` | Controls height and font size |
69
72
  | `variant` | `'outline' \| 'filled'` | `'outline'` | Visual style of the control |
70
73
  | `children` | ReactNode | -- | Segment labels (strings or elements) |
71
74
  | `accessibilityLabel` | string | -- | Label for the tab group |
72
75
  | `onValueChange` | `(index: number) => void` | -- | Called with the tapped segment index |
73
76
 
77
+ ## Sizes
78
+
79
+ | Size | minHeight | fontSize | Horizontal padding | Vertical padding |
80
+ |------|-----------|----------|---------------------|-------------------|
81
+ | `small` | 32 | `font.size.bodyS` | `spacing.s` | `spacing.xxs` |
82
+ | `medium` | 44 | `font.size.body` | `spacing.m` | `spacing.xs` |
83
+ | `large` | 48 | `font.size.body` | `spacing.m` | `spacing.s` |
84
+ | `xlarge` | 56 | `font.size.body` | `spacing.m` | `spacing.s` |
85
+
86
+ `xlarge` matches the DS `Button`'s own `large` height (56 pt) — use it wherever a 56 pt tap target is required (e.g. CoachHelpr's app-wide minimum).
87
+
74
88
  ## Visual structure
75
89
 
76
90
  - **Track** — a single rounded container (`flexDirection: 'row'`, `borderRadius: full`, `colorBgSubtle` background, 2 px inner padding). No per-segment borders.
77
- - **Segments** — equal-width (`flex: 1`), min touch target 44 dp for medium/large.
91
+ - **Segments** — equal-width (`flex: 1`), min touch target 44 dp for medium/large, 56 dp for xlarge.
78
92
  - **Selected thumb** — contrasting background rendered on the active segment only:
79
93
  - `outline` variant → `colorBg` (elevated white / dark-elevated) + subtle shadow, label uses `colorInteractiveOnBg`.
80
94
  - `filled` variant → `colorInteractive` background, label uses `colorOnInteractive`.
@@ -121,4 +121,19 @@ describe('SegmentedControl (native)', () => {
121
121
  expect(screen.getByText('Day')).toBeInTheDocument();
122
122
  expect(screen.getByText('Week')).toBeInTheDocument();
123
123
  });
124
+
125
+ it('renders an xlarge segment with a 56pt minHeight', () => {
126
+ renderWithTheme(
127
+ <SegmentedControl accessibilityLabel="View" size="xlarge">
128
+ {'Day'}
129
+ {'Week'}
130
+ </SegmentedControl>,
131
+ );
132
+ const tabs = screen.getAllByRole('tab');
133
+ expect(tabs).toHaveLength(2);
134
+ tabs.forEach((tab) => {
135
+ const style = tab.getAttribute('style') ?? '';
136
+ expect(style).toMatch(/min-height:\s*56px/);
137
+ });
138
+ });
124
139
  });
@@ -50,6 +50,15 @@ export const Large: Story = {
50
50
  },
51
51
  };
52
52
 
53
+ export const XLarge: Story = {
54
+ args: {
55
+ size: 'xlarge',
56
+ selectedIndex: 0,
57
+ children: ['First', 'Second', 'Third'],
58
+ accessibilityLabel: 'Selection',
59
+ },
60
+ };
61
+
53
62
  export const Disabled: Story = {
54
63
  args: {
55
64
  selectedIndex: 0,
@@ -3,7 +3,7 @@ import { StyleSheet, View, Pressable, Text, StyleProp, ViewStyle } from 'react-n
3
3
  import { spacing, font, border } from '../../../../native/tokens';
4
4
  import { useTheme } from '../../../../native/ThemeContext';
5
5
 
6
- type SegmentedControlSize = 'small' | 'medium' | 'large';
6
+ type SegmentedControlSize = 'small' | 'medium' | 'large' | 'xlarge';
7
7
  type SegmentedControlVariant = 'outline' | 'filled';
8
8
 
9
9
  interface SegmentedControlProps {
@@ -24,6 +24,7 @@ const sizeTokens: Record<SegmentedControlSize, { minHeight: number; fontSize: nu
24
24
  small: { minHeight: 32, fontSize: font.size.bodyS, px: spacing.s, py: spacing.xxs },
25
25
  medium: { minHeight: 44, fontSize: font.size.body, px: spacing.m, py: spacing.xs },
26
26
  large: { minHeight: 48, fontSize: font.size.body, px: spacing.m, py: spacing.s },
27
+ xlarge: { minHeight: 56, fontSize: font.size.body, px: spacing.m, py: spacing.s },
27
28
  };
28
29
 
29
30
  const thumbShadow = {