@boostdev/design-system-react-native 0.4.0 → 0.5.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 (56) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +10 -0
  3. package/dist/index.cjs +587 -535
  4. package/dist/index.d.cts +35 -4
  5. package/dist/index.d.ts +35 -4
  6. package/dist/index.js +440 -492
  7. package/package.json +1 -1
  8. package/src/components/interaction/Button/Button.spec.tsx +17 -0
  9. package/src/components/interaction/Button/Button.tsx +8 -2
  10. package/src/components/interaction/Dialog/Dialog.tsx +2 -9
  11. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +2 -13
  12. package/src/components/interaction/Rating/Rating.tsx +2 -1
  13. package/src/components/interaction/SideSheet/SideSheet.tsx +2 -11
  14. package/src/components/interaction/Toast/Toast.tsx +2 -9
  15. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +2 -1
  16. package/src/components/interaction/form/Combobox/Combobox.tsx +2 -10
  17. package/src/components/interaction/form/FileInput/FileInput.tsx +2 -1
  18. package/src/components/interaction/form/FormInput/FormInput.spec.tsx +11 -9
  19. package/src/components/interaction/form/FormInput/FormInput.tsx +4 -10
  20. package/src/components/interaction/form/NumberInput/NumberInput.tsx +2 -9
  21. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +2 -1
  22. package/src/components/interaction/form/SegmentedControl/SegmentedControl.spec.tsx +40 -0
  23. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +8 -2
  24. package/src/components/interaction/form/Select/Select.tsx +2 -11
  25. package/src/components/interaction/form/Slider/Slider.tsx +2 -9
  26. package/src/components/interaction/form/Textarea/Textarea.tsx +2 -7
  27. package/src/components/interaction/form/atoms/Label.tsx +2 -1
  28. package/src/components/interaction/form/atoms/Message.tsx +2 -1
  29. package/src/components/layout/SectionHeader/SectionHeader.tsx +2 -1
  30. package/src/components/ui/Accordion/Accordion.tsx +2 -11
  31. package/src/components/ui/Alert/Alert.tsx +2 -1
  32. package/src/components/ui/Avatar/Avatar.tsx +2 -1
  33. package/src/components/ui/Badge/Badge.spec.tsx +28 -0
  34. package/src/components/ui/Badge/Badge.tsx +9 -3
  35. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +2 -1
  36. package/src/components/ui/Calendar/Calendar.tsx +2 -8
  37. package/src/components/ui/Carousel/Carousel.tsx +2 -12
  38. package/src/components/ui/Collapsible/Collapsible.tsx +2 -12
  39. package/src/components/ui/DescriptionList/DescriptionList.tsx +2 -1
  40. package/src/components/ui/Link/Link.tsx +2 -1
  41. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +2 -1
  42. package/src/components/ui/Pagination/Pagination.tsx +2 -1
  43. package/src/components/ui/Progress/Progress.tsx +2 -1
  44. package/src/components/ui/ProgressCircle/ProgressCircle.tsx +2 -1
  45. package/src/components/ui/Table/Table.tsx +2 -9
  46. package/src/components/ui/Tabs/Tabs.tsx +2 -10
  47. package/src/components/ui/Tooltip/Tooltip.tsx +2 -1
  48. package/src/components/ui/Typography/Typography.mdx +2 -0
  49. package/src/components/ui/Typography/Typography.spec.tsx +59 -0
  50. package/src/components/ui/Typography/Typography.tsx +18 -2
  51. package/src/index.ts +2 -0
  52. package/src/native/ScaledText.guard.spec.ts +25 -0
  53. package/src/native/ScaledText.spec.tsx +77 -0
  54. package/src/native/ScaledText.tsx +30 -0
  55. package/src/native/fontScale.spec.ts +35 -0
  56. package/src/native/fontScale.ts +15 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,33 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to `@boostdev/design-system-react-native` are documented here.
4
+ ## [0.5.0] - 2026-09-27
5
+ ### Added
6
+ - Feat(text): ScaledText with a ceiling from its own font size
7
+
8
+ maxFontScaleFor(fontSize): below 20 pt text may double with the OS text
9
+ size, 20-25 pt grows to 1.5x, 26-59 pt to 1.3x, and 60 pt or more stays
10
+ as it is. ScaledText and ScaledTextInput apply it to React Native's own
11
+ Text and TextInput, which otherwise grow up to 3.57x on iOS
12
+ accessibility sizes.
13
+
14
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`6420767`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/6420767083a8b2549583d933a9493816a23e537e))
15
+ - Feat(text): every component text goes through ScaledText
16
+
17
+ A guard spec fails when a component takes Text or TextInput from
18
+ react-native directly.
19
+
20
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`e1202d5`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/e1202d5f1e91debf8b66667a14615b6674c775c5))
21
+ - Feat(text): components hold a larger OS text size
22
+
23
+ Typography takes maxFontSizeMultiplier and numberOfLines. Button and
24
+ FormInput grow from a minimum height instead of a fixed one, and a
25
+ long Button label wraps. SegmentedControl labels stay on one line and
26
+ shrink to fit. Badge takes maxFontSizeMultiplier for a count on a
27
+ fixed shape.
28
+
29
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> ([`27af98d`](https://gitlab.com/b00stdev/boostdev-design-system-react-native/-/commit/27af98d047ee97ad0870827a3254d6ea02802546))
30
+
4
31
  ## [0.4.0] - 2026-09-24
5
32
  ### Added
6
33
  - Feat(segmented-control): xlarge size with a 56 pt tap target
package/README.md CHANGED
@@ -135,6 +135,16 @@ Both standalone (`useTheme`) and Navigation (`useReactNavigationTheme` / `create
135
135
  2. Pass it as `tokens` to `createReactNavigationTheme({ tokens, dark })` for the Navigation layer.
136
136
  3. For the standalone layer — and to have overrides flow through to the Navigation theme automatically — use the `tokens` prop on `ThemeProvider` (see [Brand theming](#brand-theming-token-overrides) above).
137
137
 
138
+ ## Text size
139
+
140
+ Every DS text grows with the OS text size (iOS Dynamic Type, Android font scale) up to a ceiling
141
+ taken from its own font size (`maxFontScaleFor`): below 20pt grows up to 2×, 20–25pt up to 1.5×,
142
+ 26–59pt up to 1.3×, and 60pt or more stays at 1× (a countdown, a score). Override a component's
143
+ `maxFontSizeMultiplier` prop to set a different ceiling, e.g. `1` for text in a fixed shape.
144
+
145
+ In your own app code, use `ScaledText` / `ScaledTextInput` instead of React Native's `Text` /
146
+ `TextInput` to get the same rule.
147
+
138
148
  ## Development
139
149
 
140
150
  ```bash