@ledgerhq/lumen-ui-rnative 0.1.10 → 0.1.12

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 (233) hide show
  1. package/dist/module/i18n/locales/de.json +3 -0
  2. package/dist/module/i18n/locales/en.json +3 -0
  3. package/dist/module/i18n/locales/es.json +3 -0
  4. package/dist/module/i18n/locales/fr.json +3 -0
  5. package/dist/module/i18n/locales/ja.json +3 -0
  6. package/dist/module/i18n/locales/ko.json +3 -0
  7. package/dist/module/i18n/locales/pt.json +3 -0
  8. package/dist/module/i18n/locales/ru.json +3 -0
  9. package/dist/module/i18n/locales/th.json +3 -0
  10. package/dist/module/i18n/locales/tr.json +3 -0
  11. package/dist/module/i18n/locales/zh.json +3 -0
  12. package/dist/module/lib/Animations/Pulse/Pulse.js +1 -1
  13. package/dist/module/lib/Animations/Spin/Spin.js +1 -1
  14. package/dist/module/lib/Components/AmountDisplay/AmountDisplay.js +21 -21
  15. package/dist/module/lib/Components/AmountDisplay/AmountDisplay.js.map +1 -1
  16. package/dist/module/lib/Components/AmountInput/AmountInput.js +19 -13
  17. package/dist/module/lib/Components/AmountInput/AmountInput.js.map +1 -1
  18. package/dist/module/lib/Components/BaseInput/BaseInput.js +16 -9
  19. package/dist/module/lib/Components/BaseInput/BaseInput.js.map +1 -1
  20. package/dist/module/lib/Components/BottomSheet/BottomSheet.stories.js.map +1 -1
  21. package/dist/module/lib/Components/Button/BaseButton.js +8 -1
  22. package/dist/module/lib/Components/Button/BaseButton.js.map +1 -1
  23. package/dist/module/lib/Components/Card/Card.js +20 -14
  24. package/dist/module/lib/Components/Card/Card.js.map +1 -1
  25. package/dist/module/lib/Components/CardButton/CardButton.js +8 -1
  26. package/dist/module/lib/Components/CardButton/CardButton.js.map +1 -1
  27. package/dist/module/lib/Components/Checkbox/Checkbox.js +8 -1
  28. package/dist/module/lib/Components/Checkbox/Checkbox.js.map +1 -1
  29. package/dist/module/lib/Components/InteractiveIcon/InteractiveIcon.js +32 -5
  30. package/dist/module/lib/Components/InteractiveIcon/InteractiveIcon.js.map +1 -1
  31. package/dist/module/lib/Components/Label/Label.js +9 -2
  32. package/dist/module/lib/Components/Label/Label.js.map +1 -1
  33. package/dist/module/lib/Components/Link/Link.mdx +1 -0
  34. package/dist/module/lib/Components/ListItem/ListItem.js +14 -19
  35. package/dist/module/lib/Components/ListItem/ListItem.js.map +1 -1
  36. package/dist/module/lib/Components/MediaCard/MediaCard.js +183 -0
  37. package/dist/module/lib/Components/MediaCard/MediaCard.js.map +1 -0
  38. package/dist/module/lib/Components/MediaCard/MediaCard.mdx +111 -0
  39. package/dist/module/lib/Components/MediaCard/MediaCard.stories.js +199 -0
  40. package/dist/module/lib/Components/MediaCard/MediaCard.stories.js.map +1 -0
  41. package/dist/module/lib/Components/MediaCard/MediaCard.test.js +140 -0
  42. package/dist/module/lib/Components/MediaCard/MediaCard.test.js.map +1 -0
  43. package/dist/module/lib/Components/MediaCard/index.js +5 -0
  44. package/dist/module/lib/Components/MediaCard/index.js.map +1 -0
  45. package/dist/module/lib/Components/MediaCard/types.js +4 -0
  46. package/dist/module/lib/Components/MediaCard/types.js.map +1 -0
  47. package/dist/module/lib/Components/PageIndicator/PageIndicator.js +2 -2
  48. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.js +8 -1
  49. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.js.map +1 -1
  50. package/dist/module/lib/Components/SegmentedControl/usePillLayout.js +1 -1
  51. package/dist/module/lib/Components/Select/Select.js +8 -1
  52. package/dist/module/lib/Components/Select/Select.js.map +1 -1
  53. package/dist/module/lib/Components/Spot/Spot.js +4 -4
  54. package/dist/module/lib/Components/Spot/Spot.js.map +1 -1
  55. package/dist/module/lib/Components/Stepper/Stepper.js +10 -4
  56. package/dist/module/lib/Components/Stepper/Stepper.js.map +1 -1
  57. package/dist/module/lib/Components/Subheader/Subheader.js +1 -34
  58. package/dist/module/lib/Components/Subheader/Subheader.js.map +1 -1
  59. package/dist/module/lib/Components/Subheader/Subheader.mdx +26 -61
  60. package/dist/module/lib/Components/Subheader/Subheader.stories.js +23 -12
  61. package/dist/module/lib/Components/Subheader/Subheader.stories.js.map +1 -1
  62. package/dist/module/lib/Components/Subheader/Subheader.test.js +2 -26
  63. package/dist/module/lib/Components/Subheader/Subheader.test.js.map +1 -1
  64. package/dist/module/lib/Components/Subheader/index.js +1 -1
  65. package/dist/module/lib/Components/Subheader/index.js.map +1 -1
  66. package/dist/module/lib/Components/Switch/BaseSwitch.js +1 -1
  67. package/dist/module/lib/Components/Switch/Switch.js +8 -1
  68. package/dist/module/lib/Components/Switch/Switch.js.map +1 -1
  69. package/dist/module/lib/Components/TabBar/TabBar.js +8 -7
  70. package/dist/module/lib/Components/TabBar/TabBar.js.map +1 -1
  71. package/dist/module/lib/Components/Tag/Tag.js +9 -2
  72. package/dist/module/lib/Components/Tag/Tag.js.map +1 -1
  73. package/dist/module/lib/Components/ThemeProvider/ThemeProvider.test.js +22 -20
  74. package/dist/module/lib/Components/ThemeProvider/ThemeProvider.test.js.map +1 -1
  75. package/dist/module/lib/Components/Tile/Tile.js +27 -48
  76. package/dist/module/lib/Components/Tile/Tile.js.map +1 -1
  77. package/dist/module/lib/Components/Tile/Tile.mdx +34 -26
  78. package/dist/module/lib/Components/Tile/Tile.stories.js +31 -28
  79. package/dist/module/lib/Components/Tile/Tile.stories.js.map +1 -1
  80. package/dist/module/lib/Components/Tile/Tile.test.js +33 -188
  81. package/dist/module/lib/Components/Tile/Tile.test.js.map +1 -1
  82. package/dist/module/lib/Components/Tile/index.js +1 -1
  83. package/dist/module/lib/Components/Tile/index.js.map +1 -1
  84. package/dist/module/lib/Components/TileButton/TileButton.js +8 -2
  85. package/dist/module/lib/Components/TileButton/TileButton.js.map +1 -1
  86. package/dist/module/lib/Components/TriggerButton/TriggerButton.js +197 -0
  87. package/dist/module/lib/Components/TriggerButton/TriggerButton.js.map +1 -0
  88. package/dist/module/lib/Components/TriggerButton/TriggerButton.mdx +44 -0
  89. package/dist/module/lib/Components/TriggerButton/TriggerButton.stories.js +170 -0
  90. package/dist/module/lib/Components/TriggerButton/TriggerButton.stories.js.map +1 -0
  91. package/dist/module/lib/Components/TriggerButton/TriggerButton.test.js +146 -0
  92. package/dist/module/lib/Components/TriggerButton/TriggerButton.test.js.map +1 -0
  93. package/dist/module/lib/Components/TriggerButton/index.js +5 -0
  94. package/dist/module/lib/Components/TriggerButton/index.js.map +1 -0
  95. package/dist/module/lib/Components/TriggerButton/types.js +4 -0
  96. package/dist/module/lib/Components/TriggerButton/types.js.map +1 -0
  97. package/dist/module/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.stories.js.map +1 -1
  98. package/dist/module/lib/Components/index.js +2 -0
  99. package/dist/module/lib/Components/index.js.map +1 -1
  100. package/dist/module/lib/Symbols/Icons/NanoGen5.js +49 -0
  101. package/dist/module/lib/Symbols/Icons/NanoGen5.js.map +1 -0
  102. package/dist/module/lib/Symbols/index.js +1 -0
  103. package/dist/module/lib/Symbols/index.js.map +1 -1
  104. package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  105. package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  106. package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  107. package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  108. package/dist/typescript/src/lib/Components/Button/BaseButton.d.ts +1 -1
  109. package/dist/typescript/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
  110. package/dist/typescript/src/lib/Components/Card/Card.d.ts.map +1 -1
  111. package/dist/typescript/src/lib/Components/Card/types.d.ts +1 -3
  112. package/dist/typescript/src/lib/Components/Card/types.d.ts.map +1 -1
  113. package/dist/typescript/src/lib/Components/CardButton/CardButton.d.ts +1 -1
  114. package/dist/typescript/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  115. package/dist/typescript/src/lib/Components/Checkbox/Checkbox.d.ts +1 -1
  116. package/dist/typescript/src/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
  117. package/dist/typescript/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
  118. package/dist/typescript/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  119. package/dist/typescript/src/lib/Components/InteractiveIcon/types.d.ts +14 -1
  120. package/dist/typescript/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  121. package/dist/typescript/src/lib/Components/Label/Label.d.ts +1 -1
  122. package/dist/typescript/src/lib/Components/Label/Label.d.ts.map +1 -1
  123. package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts +1 -1
  124. package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  125. package/dist/typescript/src/lib/Components/MediaCard/MediaCard.d.ts +32 -0
  126. package/dist/typescript/src/lib/Components/MediaCard/MediaCard.d.ts.map +1 -0
  127. package/dist/typescript/src/lib/Components/MediaCard/index.d.ts +3 -0
  128. package/dist/typescript/src/lib/Components/MediaCard/index.d.ts.map +1 -0
  129. package/dist/typescript/src/lib/Components/MediaCard/types.d.ts +38 -0
  130. package/dist/typescript/src/lib/Components/MediaCard/types.d.ts.map +1 -0
  131. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  132. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  133. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
  134. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  135. package/dist/typescript/src/lib/Components/Select/Select.d.ts +1 -1
  136. package/dist/typescript/src/lib/Components/Select/Select.d.ts.map +1 -1
  137. package/dist/typescript/src/lib/Components/Stepper/Stepper.d.ts +1 -1
  138. package/dist/typescript/src/lib/Components/Stepper/Stepper.d.ts.map +1 -1
  139. package/dist/typescript/src/lib/Components/Subheader/Subheader.d.ts +2 -7
  140. package/dist/typescript/src/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  141. package/dist/typescript/src/lib/Components/Subheader/index.d.ts +1 -1
  142. package/dist/typescript/src/lib/Components/Subheader/index.d.ts.map +1 -1
  143. package/dist/typescript/src/lib/Components/Subheader/types.d.ts +1 -11
  144. package/dist/typescript/src/lib/Components/Subheader/types.d.ts.map +1 -1
  145. package/dist/typescript/src/lib/Components/Switch/Switch.d.ts +1 -1
  146. package/dist/typescript/src/lib/Components/Switch/Switch.d.ts.map +1 -1
  147. package/dist/typescript/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
  148. package/dist/typescript/src/lib/Components/Tag/Tag.d.ts +1 -1
  149. package/dist/typescript/src/lib/Components/Tag/Tag.d.ts.map +1 -1
  150. package/dist/typescript/src/lib/Components/Tile/Tile.d.ts +17 -23
  151. package/dist/typescript/src/lib/Components/Tile/Tile.d.ts.map +1 -1
  152. package/dist/typescript/src/lib/Components/Tile/index.d.ts +1 -1
  153. package/dist/typescript/src/lib/Components/Tile/index.d.ts.map +1 -1
  154. package/dist/typescript/src/lib/Components/Tile/types.d.ts +0 -9
  155. package/dist/typescript/src/lib/Components/Tile/types.d.ts.map +1 -1
  156. package/dist/typescript/src/lib/Components/TileButton/TileButton.d.ts +1 -1
  157. package/dist/typescript/src/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  158. package/dist/typescript/src/lib/Components/TriggerButton/TriggerButton.d.ts +26 -0
  159. package/dist/typescript/src/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -0
  160. package/dist/typescript/src/lib/Components/TriggerButton/index.d.ts +3 -0
  161. package/dist/typescript/src/lib/Components/TriggerButton/index.d.ts.map +1 -0
  162. package/dist/typescript/src/lib/Components/TriggerButton/types.d.ts +38 -0
  163. package/dist/typescript/src/lib/Components/TriggerButton/types.d.ts.map +1 -0
  164. package/dist/typescript/src/lib/Components/index.d.ts +2 -0
  165. package/dist/typescript/src/lib/Components/index.d.ts.map +1 -1
  166. package/dist/typescript/src/lib/Symbols/Icons/NanoGen5.d.ts +35 -0
  167. package/dist/typescript/src/lib/Symbols/Icons/NanoGen5.d.ts.map +1 -0
  168. package/dist/typescript/src/lib/Symbols/index.d.ts +1 -0
  169. package/dist/typescript/src/lib/Symbols/index.d.ts.map +1 -1
  170. package/package.json +4 -4
  171. package/src/i18n/locales/de.json +3 -0
  172. package/src/i18n/locales/en.json +3 -0
  173. package/src/i18n/locales/es.json +3 -0
  174. package/src/i18n/locales/fr.json +3 -0
  175. package/src/i18n/locales/ja.json +3 -0
  176. package/src/i18n/locales/ko.json +3 -0
  177. package/src/i18n/locales/pt.json +3 -0
  178. package/src/i18n/locales/ru.json +3 -0
  179. package/src/i18n/locales/th.json +3 -0
  180. package/src/i18n/locales/tr.json +3 -0
  181. package/src/i18n/locales/zh.json +3 -0
  182. package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +20 -20
  183. package/src/lib/Components/AmountInput/AmountInput.tsx +15 -7
  184. package/src/lib/Components/BaseInput/BaseInput.tsx +12 -7
  185. package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +9 -9
  186. package/src/lib/Components/Button/BaseButton.tsx +6 -1
  187. package/src/lib/Components/Card/Card.tsx +16 -16
  188. package/src/lib/Components/Card/types.ts +1 -4
  189. package/src/lib/Components/CardButton/CardButton.tsx +7 -1
  190. package/src/lib/Components/Checkbox/Checkbox.tsx +7 -1
  191. package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +34 -7
  192. package/src/lib/Components/InteractiveIcon/types.ts +14 -1
  193. package/src/lib/Components/Label/Label.tsx +7 -2
  194. package/src/lib/Components/Link/Link.mdx +1 -0
  195. package/src/lib/Components/ListItem/ListItem.tsx +15 -12
  196. package/src/lib/Components/MediaCard/MediaCard.mdx +111 -0
  197. package/src/lib/Components/MediaCard/MediaCard.stories.tsx +190 -0
  198. package/src/lib/Components/MediaCard/MediaCard.test.tsx +125 -0
  199. package/src/lib/Components/MediaCard/MediaCard.tsx +203 -0
  200. package/src/lib/Components/MediaCard/index.ts +2 -0
  201. package/src/lib/Components/MediaCard/types.ts +39 -0
  202. package/src/lib/Components/SegmentedControl/SegmentedControl.tsx +6 -1
  203. package/src/lib/Components/SegmentedControl/SegmentedControlContext.tsx +1 -1
  204. package/src/lib/Components/Select/Select.tsx +6 -1
  205. package/src/lib/Components/Spot/Spot.tsx +4 -4
  206. package/src/lib/Components/Stepper/Stepper.tsx +9 -2
  207. package/src/lib/Components/Subheader/Subheader.mdx +26 -61
  208. package/src/lib/Components/Subheader/Subheader.stories.tsx +16 -10
  209. package/src/lib/Components/Subheader/Subheader.test.tsx +0 -22
  210. package/src/lib/Components/Subheader/Subheader.tsx +1 -42
  211. package/src/lib/Components/Subheader/index.ts +0 -1
  212. package/src/lib/Components/Subheader/types.ts +1 -16
  213. package/src/lib/Components/Switch/Switch.tsx +6 -1
  214. package/src/lib/Components/TabBar/TabBar.tsx +5 -2
  215. package/src/lib/Components/Tag/Tag.tsx +7 -2
  216. package/src/lib/Components/ThemeProvider/ThemeProvider.test.tsx +16 -18
  217. package/src/lib/Components/Tile/Tile.mdx +34 -26
  218. package/src/lib/Components/Tile/Tile.stories.tsx +26 -26
  219. package/src/lib/Components/Tile/Tile.test.tsx +17 -137
  220. package/src/lib/Components/Tile/Tile.tsx +28 -40
  221. package/src/lib/Components/Tile/index.ts +0 -1
  222. package/src/lib/Components/Tile/types.ts +0 -11
  223. package/src/lib/Components/TileButton/TileButton.tsx +9 -2
  224. package/src/lib/Components/TriggerButton/TriggerButton.mdx +44 -0
  225. package/src/lib/Components/TriggerButton/TriggerButton.stories.tsx +132 -0
  226. package/src/lib/Components/TriggerButton/TriggerButton.test.tsx +157 -0
  227. package/src/lib/Components/TriggerButton/TriggerButton.tsx +228 -0
  228. package/src/lib/Components/TriggerButton/index.ts +2 -0
  229. package/src/lib/Components/TriggerButton/types.ts +38 -0
  230. package/src/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.stories.tsx +1 -1
  231. package/src/lib/Components/index.ts +2 -0
  232. package/src/lib/Symbols/Icons/NanoGen5.tsx +44 -0
  233. package/src/lib/Symbols/index.ts +1 -0
@@ -1,3 +1,4 @@
1
+ import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
1
2
  import React, { useState, useEffect, useCallback, useId } from 'react';
2
3
  import { StyleSheet, View } from 'react-native';
3
4
  import { useStyleSheet } from '../../../styles';
@@ -57,8 +58,12 @@ export const Select = ({
57
58
  value: controlledValue,
58
59
  defaultValue,
59
60
  onValueChange,
60
- disabled = false,
61
+ disabled: disabledProp = false,
61
62
  }: SelectProps) => {
63
+ const disabled = useDisabledContext({
64
+ consumerName: 'Select',
65
+ mergeWith: { disabled: disabledProp },
66
+ });
62
67
  const selectId = useId();
63
68
 
64
69
  const [internalOpen, setInternalOpen] = useControllableState({
@@ -129,18 +129,18 @@ const useStyles = ({
129
129
  export const Spot = (props: SpotProps) => {
130
130
  const {
131
131
  appearance,
132
- disabled = false,
132
+ disabled: disabledProp = false,
133
133
  size = 48,
134
134
  lx = {},
135
135
  style,
136
136
  ...rest
137
137
  } = props;
138
- const mergedDisabled = useDisabledContext({
138
+ const disabled = useDisabledContext({
139
139
  consumerName: 'Spot',
140
- mergeWith: { disabled },
140
+ mergeWith: { disabled: disabledProp },
141
141
  });
142
142
 
143
- const styles = useStyles({ size, appearance, disabled: mergedDisabled });
143
+ const styles = useStyles({ size, appearance, disabled });
144
144
  const calculatedIconSize = iconSizeMap[size];
145
145
 
146
146
  const content = useMemo(() => {
@@ -1,4 +1,7 @@
1
- import { getStepperCalculations } from '@ledgerhq/lumen-utils-shared';
1
+ import {
2
+ getStepperCalculations,
3
+ useDisabledContext,
4
+ } from '@ledgerhq/lumen-utils-shared';
2
5
  import { useEffect } from 'react';
3
6
  import Animated, {
4
7
  cancelAnimation,
@@ -59,11 +62,15 @@ export const Stepper = ({
59
62
  lx = {},
60
63
  currentStep,
61
64
  totalSteps,
62
- disabled = false,
65
+ disabled: disabledProp = false,
63
66
  label,
64
67
  ref,
65
68
  ...props
66
69
  }: StepperProps) => {
70
+ const disabled = useDisabledContext({
71
+ consumerName: 'Stepper',
72
+ mergeWith: { disabled: disabledProp },
73
+ });
67
74
  const { t } = useCommonTranslation();
68
75
  const { theme } = useTheme();
69
76
 
@@ -9,7 +9,6 @@ import {
9
9
  SubheaderInfo,
10
10
  SubheaderShowMore,
11
11
  SubheaderDescription,
12
- SubheaderAction,
13
12
  } from './Subheader';
14
13
  import {
15
14
  CustomTabs,
@@ -29,7 +28,7 @@ import CommonRulesDoAndDont from '../../../../.storybook/components/DoVsDont/Com
29
28
 
30
29
  ## Introduction
31
30
 
32
- Subheaders are section headers that provide context and organization to content blocks. They use a composite component pattern that provides full flexibility over layout and content through composable sub-components.
31
+ Subheaders are section headers that provide context and organization to content blocks. They use a composite component pattern that provides full flexibility over layout and content through composable sub-components. The right-side action slot (`SubheaderAction`) has been removed to simplify the API.
33
32
 
34
33
  > View in [Figma](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=your-node-id).
35
34
 
@@ -46,7 +45,6 @@ The Subheader uses a composite structure with the following components:
46
45
  - **SubheaderShowMore**: Static chevron right icon to indicate expandable content, positioned after the count (optional)
47
46
  - **SubheaderInfo**: Information icon that can be wrapped in tooltips or bottom sheets (optional)
48
47
  - **SubheaderDescription**: Additional descriptive text below the row (optional)
49
- - **SubheaderAction**: Container for action elements, positioned at the far right (optional)
50
48
 
51
49
  ## Properties
52
50
 
@@ -67,9 +65,9 @@ Use the info icon to provide contextual help:
67
65
 
68
66
  <Canvas of={SubheaderStories.WithInfoIcon} />
69
67
 
70
- ### With Action
68
+ ### With action (layout)
71
69
 
72
- Use actions for quick access to related functionality:
70
+ You can add an action by placing a Link in a flex row aligned with the title row.
73
71
 
74
72
  <Canvas of={SubheaderStories.WithAction} />
75
73
 
@@ -79,7 +77,6 @@ Use actions for quick access to related functionality:
79
77
  > - Title truncates with ellipsis when too long for the available space
80
78
  > - Count, hint, and action elements maintain their positions
81
79
  > - Uses flex layout for responsive arrangement
82
- > - Action elements are positioned at the far right using `marginLeft: 'auto'`
83
80
 
84
81
  ## Accessibility
85
82
 
@@ -208,27 +205,39 @@ function InfoExample() {
208
205
  }
209
206
  ```
210
207
 
211
- ### With Action
208
+ ### With action (layout pattern)
212
209
 
213
- Include an action element in the row (automatically aligned to the right):
210
+ Add an action by placing a Link in a flex row aligned with the title:
214
211
 
215
212
  ```tsx
216
213
  import {
217
214
  Subheader,
218
215
  SubheaderRow,
219
216
  SubheaderTitle,
220
- SubheaderAction,
217
+ SubheaderDescription,
218
+ Link,
221
219
  } from '@ledgerhq/lumen-ui-rnative';
220
+ import { View } from 'react-native';
222
221
 
223
- function ActionExample() {
222
+ function WithActionExample() {
224
223
  return (
225
224
  <Subheader>
226
- <SubheaderRow>
227
- <SubheaderTitle>Section Title</SubheaderTitle>
228
- <SubheaderAction onPress={() => console.log('Action clicked')}>
229
- View More
230
- </SubheaderAction>
231
- </SubheaderRow>
225
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 24 }}>
226
+ <SubheaderRow style={{ flex: 1, minWidth: 0 }}>
227
+ <SubheaderTitle>Recent Activity</SubheaderTitle>
228
+ </SubheaderRow>
229
+ <Link
230
+ onPress={() => {}}
231
+ appearance="accent"
232
+ size="sm"
233
+ underline={false}
234
+ >
235
+ View all
236
+ </Link>
237
+ </View>
238
+ <SubheaderDescription>
239
+ Place the action link in a flex layout beside the subheader
240
+ </SubheaderDescription>
232
241
  </Subheader>
233
242
  );
234
243
  }
@@ -303,7 +312,7 @@ function InteractiveExample() {
303
312
 
304
313
  ### Combining Multiple Options
305
314
 
306
- You can combine different components as needed. The `SubheaderRow` and `SubheaderTitle` are required, while all other components (`SubheaderCount`, `SubheaderInfo`, `SubheaderDescription`, `SubheaderAction`) are optional:
315
+ You can combine different components as needed. The `SubheaderRow` and `SubheaderTitle` are required, while all other components (`SubheaderCount`, `SubheaderInfo`, `SubheaderDescription`) are optional:
307
316
 
308
317
  ```tsx
309
318
  import {
@@ -313,7 +322,6 @@ import {
313
322
  SubheaderCount,
314
323
  SubheaderInfo,
315
324
  SubheaderDescription,
316
- SubheaderAction,
317
325
  Tooltip,
318
326
  TooltipTrigger,
319
327
  TooltipContent,
@@ -332,9 +340,6 @@ function FullExample() {
332
340
  </TooltipTrigger>
333
341
  <TooltipContent content={<Text>Additional info</Text>} />
334
342
  </Tooltip>
335
- <SubheaderAction onPress={() => console.log('Action clicked')}>
336
- Action
337
- </SubheaderAction>
338
343
  </SubheaderRow>
339
344
  <SubheaderDescription>
340
345
  This is a detailed description of the section.
@@ -435,46 +440,6 @@ The following guidelines ensure consistent usage of the Subheader component and
435
440
 
436
441
  </DoVsDontRow>
437
442
 
438
- <DoVsDontRow>
439
- <DoBlockItem
440
- title='Use Action in Row with onPress'
441
- description='Action should have an onPress handler and be placed in Row for right alignment'
442
- >
443
-
444
- {/* prettier-ignore */}
445
- ```tsx
446
- <Subheader>
447
- <SubheaderRow>
448
- <SubheaderTitle>Title</SubheaderTitle>
449
- <SubheaderAction onPress={handleAction}>
450
- Action
451
- </SubheaderAction>
452
- </SubheaderRow>
453
- </Subheader>
454
- ```
455
-
456
- </DoBlockItem>
457
- <DontBlockItem
458
- title="Don't place Action outside Row"
459
- description='Action must be inside SubheaderRow for proper positioning'
460
- >
461
-
462
- {/* prettier-ignore */}
463
- ```tsx
464
- <Subheader>
465
- <SubheaderRow>
466
- <SubheaderTitle>Title</SubheaderTitle>
467
- </SubheaderRow>
468
- <SubheaderAction onPress={handleAction}>
469
- Action
470
- </SubheaderAction>
471
- </Subheader>
472
- ```
473
-
474
- </DontBlockItem>
475
-
476
- </DoVsDontRow>
477
-
478
443
  <DoVsDontRow>
479
444
  <DoBlockItem
480
445
  title='Use lx for layout adjustments only'
@@ -1,6 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native';
2
2
  import React from 'react';
3
3
  import { View, Text } from 'react-native';
4
+ import { Link } from '../Link';
4
5
  import { Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip';
5
6
  import {
6
7
  Subheader,
@@ -10,11 +11,10 @@ import {
10
11
  SubheaderInfo,
11
12
  SubheaderShowMore,
12
13
  SubheaderDescription,
13
- SubheaderAction,
14
14
  } from './Subheader';
15
15
 
16
16
  const Container = ({ children }: { children: React.ReactNode }) => (
17
- <View style={{ padding: 8, backgroundColor: '#ffffff', width: '100%' }}>
17
+ <View style={{ padding: 8, backgroundColor: '#ffffff', width: 400 }}>
18
18
  {children}
19
19
  </View>
20
20
  );
@@ -29,7 +29,6 @@ const meta: Meta<typeof Subheader> = {
29
29
  SubheaderCount,
30
30
  SubheaderInfo,
31
31
  SubheaderShowMore,
32
- SubheaderAction,
33
32
  },
34
33
  decorators: [
35
34
  (Story) => (
@@ -96,15 +95,22 @@ export const WithInfoIcon: Story = {
96
95
 
97
96
  export const WithAction: Story = {
98
97
  render: () => (
99
- <Subheader lx={{ maxWidth: 's480' }}>
100
- <SubheaderRow>
101
- <SubheaderTitle>Recent Activity</SubheaderTitle>
102
- <SubheaderAction onPress={() => console.log('View all')}>
98
+ <Subheader>
99
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 24 }}>
100
+ <SubheaderRow style={{ flex: 1, minWidth: 0 }}>
101
+ <SubheaderTitle>Recent Activity</SubheaderTitle>
102
+ </SubheaderRow>
103
+ <Link
104
+ onPress={() => console.log('View all')}
105
+ appearance='accent'
106
+ size='sm'
107
+ underline={false}
108
+ >
103
109
  View all
104
- </SubheaderAction>
105
- </SubheaderRow>
110
+ </Link>
111
+ </View>
106
112
  <SubheaderDescription>
107
- Use actions for quick access to related functionality
113
+ Place the action link in a flex layout beside the subheader
108
114
  </SubheaderDescription>
109
115
  </Subheader>
110
116
  ),
@@ -11,7 +11,6 @@ import {
11
11
  SubheaderInfo,
12
12
  SubheaderShowMore,
13
13
  SubheaderDescription,
14
- SubheaderAction,
15
14
  } from './Subheader';
16
15
 
17
16
  const TestWrapper = ({ children }: { children: React.ReactNode }) => (
@@ -122,24 +121,6 @@ describe('Subheader', () => {
122
121
  expect(screen.getByText('This is a description')).toBeTruthy();
123
122
  });
124
123
 
125
- it('renders the action in row', () => {
126
- const handlePress = jest.fn();
127
- render(
128
- <TestWrapper>
129
- <Subheader>
130
- <SubheaderRow>
131
- <SubheaderTitle>Title</SubheaderTitle>
132
- <SubheaderAction onPress={handlePress}>Action</SubheaderAction>
133
- </SubheaderRow>
134
- </Subheader>
135
- </TestWrapper>,
136
- );
137
- const button = screen.getByText('Action');
138
- expect(button).toBeTruthy();
139
- fireEvent.press(button);
140
- expect(handlePress).toHaveBeenCalledTimes(1);
141
- });
142
-
143
124
  it('renders interactive row with onPress', () => {
144
125
  const handlePress = jest.fn();
145
126
  render(
@@ -160,7 +141,6 @@ describe('Subheader', () => {
160
141
  });
161
142
 
162
143
  it('renders all components together', () => {
163
- const handleAction = jest.fn();
164
144
  render(
165
145
  <TestWrapper>
166
146
  <Subheader>
@@ -168,7 +148,6 @@ describe('Subheader', () => {
168
148
  <SubheaderTitle>Title</SubheaderTitle>
169
149
  <SubheaderCount value={42} />
170
150
  <SubheaderInfo />
171
- <SubheaderAction onPress={handleAction}>Action</SubheaderAction>
172
151
  </SubheaderRow>
173
152
  <SubheaderDescription>Description text</SubheaderDescription>
174
153
  </Subheader>
@@ -176,7 +155,6 @@ describe('Subheader', () => {
176
155
  );
177
156
  expect(screen.getByText('Title')).toBeTruthy();
178
157
  expect(screen.getByText('(42)')).toBeTruthy();
179
- expect(screen.getByText('Action')).toBeTruthy();
180
158
  expect(screen.getByText('Description text')).toBeTruthy();
181
159
  });
182
160
 
@@ -4,7 +4,6 @@ import { ChevronRight, Information } from '../../Symbols';
4
4
  import { InteractiveIcon } from '../InteractiveIcon';
5
5
  import { Box, Pressable, Text } from '../Utility';
6
6
  import {
7
- SubheaderActionProps,
8
7
  SubheaderCountProps,
9
8
  SubheaderDescriptionProps,
10
9
  SubheaderInfoProps,
@@ -201,46 +200,6 @@ export const SubheaderDescription = ({
201
200
  );
202
201
  };
203
202
 
204
- /**
205
- * Action component for the Subheader. Displays an interactive text button.
206
- * Automatically positions itself at the end of the row using marginLeft: 'auto'.
207
- */
208
- export const SubheaderAction = ({
209
- children,
210
- onPress,
211
- lx,
212
- style,
213
- ...props
214
- }: SubheaderActionProps) => {
215
- const styles = useStyleSheet(
216
- (t) => ({
217
- container: {
218
- flexShrink: 0,
219
- marginLeft: 'auto',
220
- paddingLeft: t.spacings.s8,
221
- },
222
- text: StyleSheet.flatten([
223
- t.typographies.body2,
224
- {
225
- color: t.colors.text.interactive,
226
- },
227
- ]),
228
- }),
229
- [],
230
- );
231
-
232
- return (
233
- <Pressable
234
- lx={lx}
235
- onPress={onPress}
236
- style={[styles.container, style]}
237
- {...props}
238
- >
239
- <Text style={styles.text}>{children}</Text>
240
- </Pressable>
241
- );
242
- };
243
-
244
203
  /**
245
204
  * A subheader component for displaying section titles with optional count, hints, descriptions, and action elements.
246
205
  * Uses a composable API where you explicitly nest sub-components to define the layout.
@@ -269,7 +228,7 @@ export const SubheaderAction = ({
269
228
  * </Subheader>
270
229
  *
271
230
  * @example
272
- * // Interactive row with action
231
+ * // Interactive row
273
232
  * <Subheader>
274
233
  * <SubheaderRow onPress={handleClick}>
275
234
  * <SubheaderTitle>Accounts</SubheaderTitle>
@@ -6,6 +6,5 @@ export {
6
6
  SubheaderInfo,
7
7
  SubheaderShowMore,
8
8
  SubheaderDescription,
9
- SubheaderAction,
10
9
  } from './Subheader';
11
10
  export * from './types';
@@ -1,9 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import {
3
- StyledPressableProps,
4
- StyledTextProps,
5
- StyledViewProps,
6
- } from '../../../styles';
2
+ import { StyledTextProps, StyledViewProps } from '../../../styles';
7
3
  import { InteractiveIconProps } from '../InteractiveIcon';
8
4
 
9
5
  export type SubheaderProps = {
@@ -61,15 +57,4 @@ export type SubheaderDescriptionProps = {
61
57
  children: ReactNode;
62
58
  } & Omit<StyledTextProps, 'children'>;
63
59
 
64
- export type SubheaderActionProps = {
65
- /**
66
- * The action text to display.
67
- */
68
- children: ReactNode;
69
- /**
70
- * Press handler for the action.
71
- */
72
- onPress: () => void;
73
- } & Omit<StyledPressableProps, 'children' | 'onPress'>;
74
-
75
60
  export type SubheaderShowMoreProps = Omit<StyledViewProps, 'children'>;
@@ -1,3 +1,4 @@
1
+ import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
1
2
  import { useControllableState } from '../../utils';
2
3
  import { Pressable } from '../Utility';
3
4
  import { BaseSwitchThumb, BaseSwitchRoot } from './BaseSwitch';
@@ -33,11 +34,15 @@ export const Switch = ({
33
34
  checked: checkedProp,
34
35
  onCheckedChange: onCheckedChangeProp,
35
36
  defaultChecked = false,
36
- disabled,
37
+ disabled: disabledProp,
37
38
  size = 'md',
38
39
  ref,
39
40
  ...props
40
41
  }: SwitchProps) => {
42
+ const disabled = useDisabledContext({
43
+ consumerName: 'Switch',
44
+ mergeWith: { disabled: disabledProp },
45
+ });
41
46
  const [checked, onCheckedChange] = useControllableState({
42
47
  prop: checkedProp,
43
48
  onChange: onCheckedChangeProp,
@@ -268,7 +268,7 @@ export function TabBar({
268
268
  >
269
269
  {children}
270
270
  {Platform.OS === 'android' ? (
271
- <View style={styles.androidBackground} />
271
+ <View style={styles.fallbackBackground} />
272
272
  ) : (
273
273
  <BlurView
274
274
  style={styles.blur}
@@ -279,6 +279,9 @@ export function TabBar({
279
279
  ? 'rgba(0,0,0,0.15)'
280
280
  : 'rgba(255,255,255,0.2)'
281
281
  }
282
+ reducedTransparencyFallbackColor={
283
+ styles.fallbackBackground.backgroundColor
284
+ }
282
285
  />
283
286
  )}
284
287
  <Animated.View style={[styles.pill, animatedPillStyle]} />
@@ -305,7 +308,7 @@ const useStyles = () =>
305
308
  height: TAB_BAR_HEIGHT + t.sizes.s16,
306
309
  zIndex: -1,
307
310
  },
308
- androidBackground: {
311
+ fallbackBackground: {
309
312
  ...StyleSheet.absoluteFillObject,
310
313
  zIndex: -1,
311
314
  backgroundColor: t.colors.bg.muted,
@@ -1,3 +1,4 @@
1
+ import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
1
2
  import { StyleSheet, Text } from 'react-native';
2
3
  import { useStyleSheet } from '../../../styles';
3
4
  import { IconSize } from '../Icon';
@@ -131,13 +132,17 @@ export const Tag = ({
131
132
  size = 'md',
132
133
  icon,
133
134
  label,
134
- disabled = false,
135
+ disabled: disabledProp = false,
135
136
  lx = {},
136
137
  style,
137
138
  ref,
138
139
  ...props
139
140
  }: TagProps) => {
140
- const styles = useStyles({ appearance, size, disabled });
141
+ const disabled = useDisabledContext({
142
+ consumerName: 'Tag',
143
+ mergeWith: { disabled: disabledProp },
144
+ });
145
+ const styles = useStyles({ appearance, size, disabled: !!disabled });
141
146
 
142
147
  const IconComponent = icon;
143
148
  const iconSize = iconSizeMap[size];
@@ -1,30 +1,28 @@
1
1
  import { describe, expect, it } from '@jest/globals';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
2
3
  import { render, screen } from '@testing-library/react-native';
3
- import { Text } from 'react-native';
4
+ import { ChevronBigLeft, Wallet } from '../../Symbols';
5
+ import { Button } from '../Button';
6
+ import { Spot } from '../Spot';
7
+ import { Tile } from '../Tile/Tile';
8
+ import { Box, Text } from '../Utility';
4
9
  import { ThemeProvider } from './ThemeProvider';
5
10
 
6
- const themes: any = {
7
- light: {
8
- typographies: {
9
- xs: {},
10
- },
11
- },
12
- dark: {
13
- typographies: {
14
- xs: {},
15
- },
16
- },
17
- };
18
-
19
11
  describe('ThemeProvider', () => {
20
12
  it('renders children correctly', () => {
21
13
  render(
22
- <ThemeProvider themes={themes}>
23
- <Text testID='child'>Hello World</Text>
14
+ <ThemeProvider themes={ledgerLiveThemes}>
15
+ <Button testID='child'>Hello World</Button>
16
+ <Tile>Tile</Tile>
17
+ <Spot appearance='icon' icon={Wallet} />
18
+ <Box>
19
+ <Text>Text</Text>
20
+ </Box>
21
+ <ChevronBigLeft />
24
22
  </ThemeProvider>,
25
23
  );
26
24
 
27
- expect(screen.getByTestId('child'));
28
- expect(screen.getByText('Hello World'));
25
+ expect(screen.getByTestId('child')).toBeTruthy();
26
+ expect(screen.getByText('Hello World')).toBeTruthy();
29
27
  });
30
28
  });