@boostdev/design-system-react-native 0.5.0 → 0.6.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +35 -1
  3. package/dist/index.cjs +596 -545
  4. package/dist/index.d.cts +17 -1
  5. package/dist/index.d.ts +17 -1
  6. package/dist/index.js +488 -437
  7. package/package.json +1 -1
  8. package/src/components/interaction/Button/Button.mdx +13 -1
  9. package/src/components/interaction/Button/Button.spec.tsx +83 -0
  10. package/src/components/interaction/Button/Button.tsx +9 -8
  11. package/src/components/interaction/form/Combobox/Combobox.spec.tsx +22 -0
  12. package/src/components/interaction/form/Combobox/Combobox.tsx +4 -3
  13. package/src/components/interaction/form/FileInput/FileInput.spec.tsx +18 -0
  14. package/src/components/interaction/form/FileInput/FileInput.tsx +3 -3
  15. package/src/components/interaction/form/FormInput/FormInput.spec.tsx +20 -0
  16. package/src/components/interaction/form/FormInput/FormInput.tsx +5 -4
  17. package/src/components/interaction/form/NumberInput/NumberInput.spec.tsx +21 -0
  18. package/src/components/interaction/form/NumberInput/NumberInput.tsx +7 -6
  19. package/src/components/interaction/form/Select/Select.mdx +2 -1
  20. package/src/components/interaction/form/Select/Select.spec.tsx +35 -1
  21. package/src/components/interaction/form/Select/Select.tsx +8 -7
  22. package/src/components/interaction/form/Textarea/Textarea.spec.tsx +18 -0
  23. package/src/components/interaction/form/Textarea/Textarea.tsx +3 -3
  24. package/src/components/ui/Collapsible/Collapsible.spec.tsx +1 -1
  25. package/src/components/ui/Collapsible/Collapsible.tsx +5 -10
  26. package/src/index.ts +1 -1
  27. package/src/native/Chevron.spec.tsx +34 -0
  28. package/src/native/Chevron.tsx +50 -0
  29. package/src/native/ThemeContext.spec.tsx +81 -1
  30. package/src/native/ThemeContext.tsx +32 -3
  31. package/src/test/cornerRadii.ts +15 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,76 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to `@boostdev/design-system-react-native` are documented here.
4
+ ## [0.6.0] - 2026-09-29
5
+ ### Added
6
+ - Feat(theme): radius overrides for buttons and fields
7
+
8
+ ThemeProvider takes `tokens.radius` ({ button, iconButton, field }, in
9
+ points), the native equivalent of the web `--button_radius`. The
10
+ defaults are 0.5.1's values (m, full, m), so nothing changes for an app
11
+ that does not set it. `useTheme()` returns the resolved `radius` next
12
+ to `colors` and `isDark`, and `ThemeRadius` is exported.
13
+
14
+ A nested ThemeProvider merges its radius over its parent's, so a
15
+ provider that only recolors a subtree keeps the app's corners. Colors
16
+ still merge over the foundation, not over the parent.
17
+
18
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`d8200d3`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/d8200d39ed24b30658a6c45692883dd1128898c1))
19
+
20
+ ### Changed
21
+ - Refactor(button): corner radius comes from the theme
22
+
23
+ A text button uses `radius.button` and an icon-only button
24
+ `radius.iconButton` instead of the hardcoded border.radius.m and
25
+ border.radius.full. A borderRadius in `style` still wins.
26
+
27
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`d672541`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/d6725412c7a6406203b6887e34512a09994c5265))
28
+ - Refactor(form): fields take their corner radius from the theme
29
+
30
+ FormInput, Select, Combobox, Textarea and the FileInput drop zone use
31
+ `radius.field` instead of the hardcoded border.radius.m. NumberInput
32
+ uses it for the outer corners on its steppers.
33
+
34
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`17b93bf`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/17b93bfa554c060b1ae83ca488b738d9a307b4b9))
35
+
36
+ ## [0.5.1] - 2026-09-28
37
+ ### Fixed
38
+ - Fix(button): text buttons get medium corners
39
+
40
+ A button with a text label now uses border.radius.m (16) on every
41
+ size instead of border.radius.full. An icon-only button (isIconOnly)
42
+ stays round. A borderRadius in `style` still wins, since `style` is
43
+ applied last.
44
+
45
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`085e779`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/085e77953480a1724df35b716c4f8dcf23ed14a3))
46
+ - Fix(form): fields get the same medium corners as buttons
47
+
48
+ FormInput, Combobox, Select and NumberInput went from a pill
49
+ (border.radius.full) to border.radius.m (16). Textarea (xs) and the
50
+ FileInput drop zone (s) move to m as well, so every field matches.
51
+ NumberInput rounds only its outer corners, on the steppers.
52
+
53
+ FormInput and Combobox draw the border on an inner View, so a
54
+ consumer could not override the radius through `style`.
55
+
56
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`70f88f9`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/70f88f9d44e9c6552330eeaadb8e0c3e9f056a6c))
57
+ - Fix(select): a chevron replaces the ▾ glyph
58
+
59
+ The trigger drew its indicator as a ▾ character in the body font, so
60
+ it rendered small and its size and weight differed per platform and
61
+ font. It is now a thin open V in colorOnBgSubtle, drawn with borders
62
+ like Collapsible's disclosure chevron, sized to the body text and
63
+ centred on it. It stays hidden from assistive technology and the
64
+ trigger's accessibility label is unchanged.
65
+
66
+ Collapsible's chevron moves into one internal Chevron that both use,
67
+ so Collapsible changes a little too: its stroke goes from 2 to 1.5 pt
68
+ to match regular body text, and the V is centred on its box whichever
69
+ way it points. The old Collapsible stroke assertion passed a number to
70
+ toHaveStyle, which matched anything; it now checks '1.5px'.
71
+
72
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`ecf0dc0`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/ecf0dc0f43980128dd3e49a86d313dd4ab932cde))
73
+
4
74
  ## [0.5.0] - 2026-09-27
5
75
  ### Added
6
76
  - Feat(text): ScaledText with a ceiling from its own font size
package/README.md CHANGED
@@ -34,7 +34,7 @@ export default function App() {
34
34
  }
35
35
  ```
36
36
 
37
- `ThemeProvider` auto-detects the system color scheme (light/dark) via `useColorScheme`, or you can pass `colorScheme="light" | "dark"` to force one. Inside the tree, `useTheme()` exposes `{ colors, isDark }` where `colors` is the full foundation token palette (`colorBg`, `colorOnBg`, `colorInteractive`, …).
37
+ `ThemeProvider` auto-detects the system color scheme (light/dark) via `useColorScheme`, or you can pass `colorScheme="light" | "dark"` to force one. Inside the tree, `useTheme()` exposes `{ colors, isDark, radius }` where `colors` is the full foundation token palette (`colorBg`, `colorOnBg`, `colorInteractive`, …) and `radius` holds the corner radii of the controls (see [Control radius](#control-radius)).
38
38
 
39
39
  ## Brand theming (token overrides)
40
40
 
@@ -62,6 +62,40 @@ Unspecified tokens keep their foundation values. Available token names are the k
62
62
  Pass a stable `tokens` reference (a module-level constant, not an inline object
63
63
  literal) — the provider memoizes the merged colors on that reference.
64
64
 
65
+ ### Control radius
66
+
67
+ The corner radius of buttons and fields comes from the theme, not from the
68
+ components — the React Native equivalent of the web `--button_radius` custom
69
+ property. Override it with `tokens.radius`, in points; it is the same in light
70
+ and dark:
71
+
72
+ ```tsx
73
+ import { ThemeProvider, border } from '@boostdev/design-system-react-native';
74
+ import type { ThemeTokenOverrides } from '@boostdev/design-system-react-native';
75
+
76
+ const tokens: ThemeTokenOverrides = {
77
+ light: { colorInteractive: '#00c853' },
78
+ radius: { button: border.radius.s, iconButton: border.radius.s, field: border.radius.s },
79
+ };
80
+
81
+ <ThemeProvider tokens={tokens}>
82
+ <App />
83
+ </ThemeProvider>;
84
+ ```
85
+
86
+ | Key | Applies to | Default |
87
+ | ------------ | ------------------------------------------------------------------------- | --------------------------- |
88
+ | `button` | `Button` with a text label | `border.radius.m` (16) |
89
+ | `iconButton` | `Button` with `isIconOnly` | `border.radius.full` (9999) |
90
+ | `field` | `FormInput`, `Select`, `Combobox`, `Textarea`, `FileInput`, `NumberInput` | `border.radius.m` (16) |
91
+
92
+ Unspecified keys keep their default. A nested `ThemeProvider` inherits its
93
+ parent's radii and merges its own `radius` over them, so a provider that only
94
+ recolors a subtree keeps the app's corners. (Colors differ: a nested provider
95
+ merges its colors over the foundation, not over its parent.) A `borderRadius`
96
+ in a `Button`'s `style` still wins over the theme. Your own controls can read
97
+ the same values through `useTheme().radius` (type `ThemeRadius`).
98
+
65
99
  ## React Navigation compatibility
66
100
 
67
101
  The library also ships a thin, **opt-in** bridge that produces a [React Navigation](https://reactnavigation.org/) `Theme` from the same foundation tokens. The bridge is purely additive — nothing about the standalone API changes when you use it, and `@react-navigation/native` is only required if you actually consume the bridge.