jfs-components 0.0.62 → 0.0.64

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 (255) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/lib/commonjs/components/Accordion/Accordion.js +1 -1
  3. package/lib/commonjs/components/ActionFooter/ActionFooter.js +1 -1
  4. package/lib/commonjs/components/ActionTile/ActionTile.js +2 -1
  5. package/lib/commonjs/components/AmountInput/AmountInput.js +2 -1
  6. package/lib/commonjs/components/AppBar/AppBar.js +1 -1
  7. package/lib/commonjs/components/Avatar/Avatar.js +184 -162
  8. package/lib/commonjs/components/AvatarGroup/AvatarGroup.js +1 -1
  9. package/lib/commonjs/components/Badge/Badge.js +2 -1
  10. package/lib/commonjs/components/Balance/Balance.js +2 -1
  11. package/lib/commonjs/components/BottomNav/BottomNav.js +2 -1
  12. package/lib/commonjs/components/BottomNavItem/BottomNavItem.js +106 -86
  13. package/lib/commonjs/components/Button/Button.js +190 -93
  14. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +1 -1
  15. package/lib/commonjs/components/Card/Card.js +2 -1
  16. package/lib/commonjs/components/CardCTA/CardCTA.js +1 -1
  17. package/lib/commonjs/components/CardProviderInfo/CardProviderInfo.js +1 -1
  18. package/lib/commonjs/components/Carousel/Carousel.js +3 -2
  19. package/lib/commonjs/components/Checkbox/Checkbox.js +2 -1
  20. package/lib/commonjs/components/ChipGroup/ChipGroup.js +1 -1
  21. package/lib/commonjs/components/ChipSelect/ChipSelect.js +2 -1
  22. package/lib/commonjs/components/DebitCard/DebitCard.js +1 -1
  23. package/lib/commonjs/components/Disclaimer/Disclaimer.js +2 -1
  24. package/lib/commonjs/components/Divider/Divider.js +2 -1
  25. package/lib/commonjs/components/Drawer/Drawer.js +109 -48
  26. package/lib/commonjs/components/EmptyState/EmptyState.js +2 -1
  27. package/lib/commonjs/components/FilterBar/FilterBar.js +1 -1
  28. package/lib/commonjs/components/Form/Form.js +2 -1
  29. package/lib/commonjs/components/FormField/FormField.js +3 -2
  30. package/lib/commonjs/components/HStack/HStack.js +1 -1
  31. package/lib/commonjs/components/HoldingsCard/HoldingsCard.js +2 -1
  32. package/lib/commonjs/components/IconButton/IconButton.js +118 -128
  33. package/lib/commonjs/components/IconCapsule/IconCapsule.js +61 -57
  34. package/lib/commonjs/components/InputSearch/InputSearch.js +7 -3
  35. package/lib/commonjs/components/LazyList/LazyList.js +1 -1
  36. package/lib/commonjs/components/LinearMeter/LinearMeter.js +3 -2
  37. package/lib/commonjs/components/ListGroup/ListGroup.js +1 -1
  38. package/lib/commonjs/components/ListItem/ListItem.js +190 -142
  39. package/lib/commonjs/components/MediaCard/MediaCard.js +3 -3
  40. package/lib/commonjs/components/MerchantProfile/MerchantProfile.js +2 -1
  41. package/lib/commonjs/components/MoneyValue/MoneyValue.js +2 -1
  42. package/lib/commonjs/components/NavArrow/NavArrow.js +82 -59
  43. package/lib/commonjs/components/NoteInput/NoteInput.js +2 -1
  44. package/lib/commonjs/components/Nudge/Nudge.js +1 -1
  45. package/lib/commonjs/components/Numpad/Numpad.js +2 -1
  46. package/lib/commonjs/components/OTP/OTP.js +1 -1
  47. package/lib/commonjs/components/PaymentFeedback/PaymentFeedback.js +2 -1
  48. package/lib/commonjs/components/Popup/Popup.js +2 -1
  49. package/lib/commonjs/components/ProductLabel/ProductLabel.js +2 -1
  50. package/lib/commonjs/components/ProgressBadge/ProgressBadge.js +2 -1
  51. package/lib/commonjs/components/RadioButton/RadioButton.js +2 -1
  52. package/lib/commonjs/components/RechargeCard/RechargeCard.js +2 -1
  53. package/lib/commonjs/components/Screen/Screen.js +1 -1
  54. package/lib/commonjs/components/Section/Section.js +500 -166
  55. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +3 -2
  56. package/lib/commonjs/components/StatItem/StatItem.js +2 -1
  57. package/lib/commonjs/components/StatusHero/StatusHero.js +2 -1
  58. package/lib/commonjs/components/Stepper/Step.js +2 -1
  59. package/lib/commonjs/components/Stepper/StepLabel.js +2 -1
  60. package/lib/commonjs/components/Stepper/Stepper.js +2 -1
  61. package/lib/commonjs/components/SupportText/SupportText.js +2 -1
  62. package/lib/commonjs/components/SupportText/SupportTextIcon.js +2 -1
  63. package/lib/commonjs/components/SwappableAmount/SwappableAmount.js +2 -1
  64. package/lib/commonjs/components/Tabs/TabItem.js +2 -1
  65. package/lib/commonjs/components/Tabs/Tabs.js +2 -1
  66. package/lib/commonjs/components/Text/Text.js +2 -1
  67. package/lib/commonjs/components/TextInput/TextInput.js +2 -2
  68. package/lib/commonjs/components/ThreadHero/ThreadHero.js +2 -1
  69. package/lib/commonjs/components/Title/Title.js +2 -1
  70. package/lib/commonjs/components/Toast/Toast.js +2 -1
  71. package/lib/commonjs/components/Toggle/Toggle.js +2 -1
  72. package/lib/commonjs/components/Tooltip/Tooltip.js +2 -1
  73. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +1 -1
  74. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +2 -2
  75. package/lib/commonjs/components/TransactionStatus/TransactionStatus.js +3 -2
  76. package/lib/commonjs/components/UpiHandle/UpiHandle.js +144 -110
  77. package/lib/commonjs/components/VStack/VStack.js +1 -1
  78. package/lib/commonjs/design-tokens/figma-variables-resolver.js +21 -3
  79. package/lib/commonjs/icons/registry.js +1 -1
  80. package/lib/commonjs/utils/react-utils.js +17 -0
  81. package/lib/module/components/Accordion/Accordion.js +2 -2
  82. package/lib/module/components/ActionFooter/ActionFooter.js +2 -2
  83. package/lib/module/components/ActionTile/ActionTile.js +2 -1
  84. package/lib/module/components/AmountInput/AmountInput.js +2 -1
  85. package/lib/module/components/AppBar/AppBar.js +2 -2
  86. package/lib/module/components/Avatar/Avatar.js +184 -162
  87. package/lib/module/components/AvatarGroup/AvatarGroup.js +2 -2
  88. package/lib/module/components/Badge/Badge.js +2 -1
  89. package/lib/module/components/Balance/Balance.js +2 -1
  90. package/lib/module/components/BottomNav/BottomNav.js +2 -1
  91. package/lib/module/components/BottomNavItem/BottomNavItem.js +108 -88
  92. package/lib/module/components/Button/Button.js +192 -95
  93. package/lib/module/components/ButtonGroup/ButtonGroup.js +2 -2
  94. package/lib/module/components/Card/Card.js +2 -1
  95. package/lib/module/components/CardCTA/CardCTA.js +2 -2
  96. package/lib/module/components/CardProviderInfo/CardProviderInfo.js +2 -2
  97. package/lib/module/components/Carousel/Carousel.js +3 -2
  98. package/lib/module/components/Checkbox/Checkbox.js +2 -1
  99. package/lib/module/components/ChipGroup/ChipGroup.js +2 -2
  100. package/lib/module/components/ChipSelect/ChipSelect.js +2 -1
  101. package/lib/module/components/DebitCard/DebitCard.js +2 -2
  102. package/lib/module/components/Disclaimer/Disclaimer.js +2 -1
  103. package/lib/module/components/Divider/Divider.js +2 -1
  104. package/lib/module/components/Drawer/Drawer.js +109 -48
  105. package/lib/module/components/EmptyState/EmptyState.js +2 -1
  106. package/lib/module/components/FilterBar/FilterBar.js +2 -2
  107. package/lib/module/components/Form/Form.js +2 -1
  108. package/lib/module/components/FormField/FormField.js +3 -2
  109. package/lib/module/components/HStack/HStack.js +2 -2
  110. package/lib/module/components/HoldingsCard/HoldingsCard.js +2 -1
  111. package/lib/module/components/IconButton/IconButton.js +120 -130
  112. package/lib/module/components/IconCapsule/IconCapsule.js +60 -57
  113. package/lib/module/components/InputSearch/InputSearch.js +7 -3
  114. package/lib/module/components/LazyList/LazyList.js +2 -2
  115. package/lib/module/components/LinearMeter/LinearMeter.js +3 -2
  116. package/lib/module/components/ListGroup/ListGroup.js +2 -2
  117. package/lib/module/components/ListItem/ListItem.js +194 -146
  118. package/lib/module/components/MediaCard/MediaCard.js +4 -2
  119. package/lib/module/components/MerchantProfile/MerchantProfile.js +2 -1
  120. package/lib/module/components/MoneyValue/MoneyValue.js +2 -1
  121. package/lib/module/components/NavArrow/NavArrow.js +82 -58
  122. package/lib/module/components/NoteInput/NoteInput.js +2 -1
  123. package/lib/module/components/Nudge/Nudge.js +2 -2
  124. package/lib/module/components/Numpad/Numpad.js +2 -1
  125. package/lib/module/components/OTP/OTP.js +2 -2
  126. package/lib/module/components/PaymentFeedback/PaymentFeedback.js +2 -1
  127. package/lib/module/components/Popup/Popup.js +2 -1
  128. package/lib/module/components/ProductLabel/ProductLabel.js +2 -1
  129. package/lib/module/components/ProgressBadge/ProgressBadge.js +2 -1
  130. package/lib/module/components/RadioButton/RadioButton.js +2 -1
  131. package/lib/module/components/RechargeCard/RechargeCard.js +2 -1
  132. package/lib/module/components/Screen/Screen.js +2 -2
  133. package/lib/module/components/Section/Section.js +503 -169
  134. package/lib/module/components/SegmentedControl/SegmentedControl.js +3 -2
  135. package/lib/module/components/StatItem/StatItem.js +2 -1
  136. package/lib/module/components/StatusHero/StatusHero.js +2 -1
  137. package/lib/module/components/Stepper/Step.js +2 -1
  138. package/lib/module/components/Stepper/StepLabel.js +2 -1
  139. package/lib/module/components/Stepper/Stepper.js +2 -1
  140. package/lib/module/components/SupportText/SupportText.js +2 -1
  141. package/lib/module/components/SupportText/SupportTextIcon.js +2 -1
  142. package/lib/module/components/SwappableAmount/SwappableAmount.js +2 -1
  143. package/lib/module/components/Tabs/TabItem.js +2 -1
  144. package/lib/module/components/Tabs/Tabs.js +2 -1
  145. package/lib/module/components/Text/Text.js +2 -1
  146. package/lib/module/components/TextInput/TextInput.js +3 -3
  147. package/lib/module/components/ThreadHero/ThreadHero.js +2 -1
  148. package/lib/module/components/Title/Title.js +2 -1
  149. package/lib/module/components/Toast/Toast.js +2 -1
  150. package/lib/module/components/Toggle/Toggle.js +2 -1
  151. package/lib/module/components/Tooltip/Tooltip.js +2 -1
  152. package/lib/module/components/TransactionBubble/TransactionBubble.js +2 -2
  153. package/lib/module/components/TransactionDetails/TransactionDetails.js +3 -3
  154. package/lib/module/components/TransactionStatus/TransactionStatus.js +3 -2
  155. package/lib/module/components/UpiHandle/UpiHandle.js +147 -113
  156. package/lib/module/components/VStack/VStack.js +2 -2
  157. package/lib/module/design-tokens/figma-variables-resolver.js +21 -3
  158. package/lib/module/icons/registry.js +1 -1
  159. package/lib/module/utils/react-utils.js +16 -0
  160. package/lib/typescript/src/components/Avatar/Avatar.d.ts +11 -17
  161. package/lib/typescript/src/components/BottomNavItem/BottomNavItem.d.ts +12 -8
  162. package/lib/typescript/src/components/Button/Button.d.ts +18 -1
  163. package/lib/typescript/src/components/IconButton/IconButton.d.ts +12 -29
  164. package/lib/typescript/src/components/IconCapsule/IconCapsule.d.ts +10 -18
  165. package/lib/typescript/src/components/InputSearch/InputSearch.d.ts +8 -3
  166. package/lib/typescript/src/components/ListItem/ListItem.d.ts +14 -1
  167. package/lib/typescript/src/components/NavArrow/NavArrow.d.ts +12 -11
  168. package/lib/typescript/src/components/Section/Section.d.ts +43 -48
  169. package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +13 -12
  170. package/lib/typescript/src/icons/registry.d.ts +1 -1
  171. package/lib/typescript/src/utils/react-utils.d.ts +15 -0
  172. package/package.json +4 -6
  173. package/src/components/Accordion/Accordion.tsx +2 -2
  174. package/src/components/ActionFooter/ActionFooter.tsx +2 -2
  175. package/src/components/ActionTile/ActionTile.tsx +2 -1
  176. package/src/components/AmountInput/AmountInput.tsx +2 -1
  177. package/src/components/AppBar/AppBar.tsx +2 -2
  178. package/src/components/Avatar/Avatar.tsx +229 -158
  179. package/src/components/AvatarGroup/AvatarGroup.tsx +2 -2
  180. package/src/components/Badge/Badge.tsx +2 -1
  181. package/src/components/Balance/Balance.tsx +2 -1
  182. package/src/components/BottomNav/BottomNav.tsx +2 -1
  183. package/src/components/BottomNavItem/BottomNavItem.tsx +159 -88
  184. package/src/components/Button/Button.tsx +228 -101
  185. package/src/components/ButtonGroup/ButtonGroup.tsx +2 -2
  186. package/src/components/Card/Card.tsx +2 -1
  187. package/src/components/CardCTA/CardCTA.tsx +2 -2
  188. package/src/components/CardProviderInfo/CardProviderInfo.tsx +2 -2
  189. package/src/components/Carousel/Carousel.tsx +3 -2
  190. package/src/components/Checkbox/Checkbox.tsx +2 -1
  191. package/src/components/ChipGroup/ChipGroup.tsx +2 -2
  192. package/src/components/ChipSelect/ChipSelect.tsx +2 -1
  193. package/src/components/DebitCard/DebitCard.tsx +2 -2
  194. package/src/components/Disclaimer/Disclaimer.tsx +2 -1
  195. package/src/components/Divider/Divider.tsx +2 -1
  196. package/src/components/Drawer/Drawer.tsx +124 -58
  197. package/src/components/EmptyState/EmptyState.tsx +2 -1
  198. package/src/components/FilterBar/FilterBar.tsx +2 -2
  199. package/src/components/Form/Form.tsx +2 -1
  200. package/src/components/FormField/FormField.tsx +3 -2
  201. package/src/components/HStack/HStack.tsx +2 -2
  202. package/src/components/HoldingsCard/HoldingsCard.tsx +2 -1
  203. package/src/components/IconButton/IconButton.tsx +154 -126
  204. package/src/components/IconCapsule/IconCapsule.tsx +73 -54
  205. package/src/components/InputSearch/InputSearch.tsx +19 -5
  206. package/src/components/LazyList/LazyList.tsx +2 -2
  207. package/src/components/LinearMeter/LinearMeter.tsx +3 -2
  208. package/src/components/ListGroup/ListGroup.tsx +2 -2
  209. package/src/components/ListItem/ListItem.tsx +257 -187
  210. package/src/components/MediaCard/MediaCard.tsx +2 -1
  211. package/src/components/MerchantProfile/MerchantProfile.tsx +2 -1
  212. package/src/components/MoneyValue/MoneyValue.tsx +2 -1
  213. package/src/components/NavArrow/NavArrow.tsx +91 -58
  214. package/src/components/NoteInput/NoteInput.tsx +2 -1
  215. package/src/components/Nudge/Nudge.tsx +2 -2
  216. package/src/components/Numpad/Numpad.tsx +2 -1
  217. package/src/components/OTP/OTP.tsx +2 -2
  218. package/src/components/PaymentFeedback/PaymentFeedback.tsx +2 -1
  219. package/src/components/Popup/Popup.tsx +2 -1
  220. package/src/components/ProductLabel/ProductLabel.tsx +2 -1
  221. package/src/components/ProgressBadge/ProgressBadge.tsx +2 -2
  222. package/src/components/RadioButton/RadioButton.tsx +2 -1
  223. package/src/components/RechargeCard/RechargeCard.tsx +2 -1
  224. package/src/components/Screen/Screen.tsx +2 -2
  225. package/src/components/Section/Section.tsx +672 -176
  226. package/src/components/SegmentedControl/SegmentedControl.tsx +3 -2
  227. package/src/components/StatItem/StatItem.tsx +2 -1
  228. package/src/components/StatusHero/StatusHero.tsx +2 -1
  229. package/src/components/Stepper/Step.tsx +2 -1
  230. package/src/components/Stepper/StepLabel.tsx +2 -1
  231. package/src/components/Stepper/Stepper.tsx +2 -1
  232. package/src/components/SupportText/SupportText.tsx +2 -1
  233. package/src/components/SupportText/SupportTextIcon.tsx +2 -1
  234. package/src/components/SwappableAmount/SwappableAmount.tsx +2 -1
  235. package/src/components/Tabs/TabItem.tsx +2 -1
  236. package/src/components/Tabs/Tabs.tsx +2 -1
  237. package/src/components/Text/Text.tsx +2 -1
  238. package/src/components/TextInput/TextInput.tsx +3 -3
  239. package/src/components/ThreadHero/ThreadHero.tsx +2 -1
  240. package/src/components/Title/Title.tsx +2 -1
  241. package/src/components/Toast/Toast.tsx +2 -1
  242. package/src/components/Toggle/Toggle.tsx +2 -1
  243. package/src/components/Tooltip/Tooltip.tsx +2 -1
  244. package/src/components/TransactionBubble/TransactionBubble.tsx +2 -2
  245. package/src/components/TransactionDetails/TransactionDetails.tsx +3 -3
  246. package/src/components/TransactionStatus/TransactionStatus.tsx +3 -2
  247. package/src/components/UpiHandle/UpiHandle.tsx +193 -125
  248. package/src/components/VStack/VStack.tsx +2 -2
  249. package/src/design-tokens/figma-variables-resolver.ts +21 -3
  250. package/src/icons/registry.ts +1 -1
  251. package/src/utils/react-utils.ts +16 -0
  252. package/lib/typescript/App.d.ts +0 -2
  253. package/lib/typescript/index.d.ts +0 -2
  254. package/lib/typescript/metro.config.d.ts +0 -78
  255. package/lib/typescript/react-native.config.d.ts +0 -4
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { View } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import ProductLabel from '../ProductLabel/ProductLabel';
7
- import { cloneChildrenWithModes } from '../../utils/react-utils';
7
+ import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  /**
10
10
  * CardProviderInfo displays a product header (ProductLabel) followed by a
@@ -17,7 +17,7 @@ function CardProviderInfo({
17
17
  label = 'Gold',
18
18
  imageSource,
19
19
  children,
20
- modes = {},
20
+ modes = EMPTY_MODES,
21
21
  style
22
22
  }) {
23
23
  const background = getVariableByName('card/providerInfo/background', modes) ?? '#fef4e5';
@@ -3,13 +3,14 @@
3
3
  import React, { createContext, useContext, useRef, useState, useEffect, useCallback, useMemo } from 'react';
4
4
  import { View, ScrollView, Animated, Pressable } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import { EMPTY_MODES } from '../../utils/react-utils';
6
7
 
7
8
  // ---------------------------------------------------------------------------
8
9
  // Context
9
10
  // ---------------------------------------------------------------------------
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const CarouselContext = /*#__PURE__*/createContext({
12
- modes: {},
13
+ modes: EMPTY_MODES,
13
14
  activeIndex: 0,
14
15
  totalItems: 0,
15
16
  goTo: () => {},
@@ -27,7 +28,7 @@ const CarouselContext = /*#__PURE__*/createContext({
27
28
 
28
29
  export function Carousel({
29
30
  children,
30
- modes = {},
31
+ modes = EMPTY_MODES,
31
32
  autoPlay = false,
32
33
  autoPlayInterval = 4000,
33
34
  showPagination = true,
@@ -4,6 +4,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
4
4
  import { Pressable, Platform } from 'react-native';
5
5
  import Svg, { Path } from 'react-native-svg';
6
6
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
7
+ import { EMPTY_MODES } from '../../utils/react-utils';
7
8
 
8
9
  /**
9
10
  * Tracks whether the last user interaction was a keyboard event (Tab).
@@ -60,7 +61,7 @@ function Checkbox({
60
61
  defaultChecked = false,
61
62
  onValueChange,
62
63
  disabled = false,
63
- modes = {},
64
+ modes = EMPTY_MODES,
64
65
  style,
65
66
  accessibilityLabel
66
67
  }) {
@@ -3,7 +3,7 @@
3
3
  import React from 'react';
4
4
  import { View } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
- import { flattenChildren } from '../../utils/react-utils';
6
+ import { EMPTY_MODES, flattenChildren } from '../../utils/react-utils';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  /**
9
9
  * ChipGroup component that handles layout and spacing for ChipSelect components.
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  */
12
12
  function ChipGroup({
13
13
  children,
14
- modes = {},
14
+ modes = EMPTY_MODES,
15
15
  style,
16
16
  testID
17
17
  }) {
@@ -3,6 +3,7 @@
3
3
  import React from 'react';
4
4
  import { Text, TouchableOpacity } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import { EMPTY_MODES } from '../../utils/react-utils';
6
7
  import Icon from '../../icons/Icon';
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  /**
@@ -13,7 +14,7 @@ function ChipSelect({
13
14
  label = 'Date',
14
15
  active = false,
15
16
  icon = 'ic_calendar_week',
16
- modes = {},
17
+ modes = EMPTY_MODES,
17
18
  style,
18
19
  labelSlot,
19
20
  onPress
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { View, Text, Image } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
- import { cloneChildrenWithModes } from '../../utils/react-utils';
7
+ import { cloneChildrenWithModes, EMPTY_MODES } from '../../utils/react-utils';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  const defaultCardArt = require('./cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png');
10
10
  function DebitCard({
@@ -16,7 +16,7 @@ function DebitCard({
16
16
  cardArtSource = defaultCardArt,
17
17
  bankLogoSlot,
18
18
  providerLogoSlot,
19
- modes: propModes = {},
19
+ modes: propModes = EMPTY_MODES,
20
20
  style
21
21
  }) {
22
22
  const {
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { View, Text } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
+ import { EMPTY_MODES } from '../../utils/react-utils';
7
8
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
8
9
  /**
9
10
  * Disclaimer text block that mirrors the Figma "Disclaimer" component.
@@ -28,7 +29,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
28
29
  */
29
30
  function Disclaimer({
30
31
  disclaimer = 'All financial services are provided by Jio Payments Bank Pvt. Ltd.',
31
- modes: propModes = {},
32
+ modes: propModes = EMPTY_MODES,
32
33
  style,
33
34
  textStyle,
34
35
  accessibilityLabel,
@@ -3,6 +3,7 @@
3
3
  import React from 'react';
4
4
  import { View } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import { EMPTY_MODES } from '../../utils/react-utils';
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  /**
8
9
  * Divider component that renders a horizontal or vertical separator line.
@@ -31,7 +32,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
31
32
  */
32
33
  function Divider({
33
34
  direction = 'horizontal',
34
- modes = {},
35
+ modes = EMPTY_MODES,
35
36
  style,
36
37
  accessibilityLabel = undefined
37
38
  }) {
@@ -5,6 +5,7 @@ import { Platform, StyleSheet, Text, useWindowDimensions, View } from 'react-nat
5
5
  import { Gesture, GestureDetector, GestureHandlerRootView, ScrollView } from 'react-native-gesture-handler';
6
6
  import Animated, { runOnJS, useAnimatedProps, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
7
7
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
8
+ import { EMPTY_MODES } from '../../utils/react-utils';
8
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
10
  const AnimatedScrollView = Animated.createAnimatedComponent(ScrollView);
10
11
 
@@ -44,7 +45,7 @@ function rubberBand(value, min, max, friction = 0.55) {
44
45
  * Uses react-native-gesture-handler and react-native-reanimated.
45
46
  */
46
47
  function Drawer({
47
- modes = {},
48
+ modes = EMPTY_MODES,
48
49
  style,
49
50
  title,
50
51
  header,
@@ -125,7 +126,17 @@ function Drawer({
125
126
  const updateMode = useCallback(newMode => {
126
127
  setMode(newMode);
127
128
  }, []);
128
- const gesture = Gesture.Pan().simultaneousWithExternalGesture(scrollRef).activeOffsetY([-5, 5]).activeOffsetX([-5, 5]).onStart(() => {
129
+
130
+ // Gesture policy:
131
+ // • activeOffsetY: require a clear *vertical* drag (10px) before this
132
+ // pan claims the gesture. Matches typical iOS scroll activation feel.
133
+ // • failOffsetX: if the finger crosses ~16px horizontally *before* we
134
+ // activate, surrender the gesture entirely so any horizontal child
135
+ // (FlatList horizontal, swiper, slider, etc.) can scroll cleanly
136
+ // without the drawer also translating on Y.
137
+ // • simultaneousWithExternalGesture(scrollRef): cooperate with the
138
+ // drawer's own internal vertical ScrollView for nested scrolling.
139
+ const gesture = Gesture.Pan().simultaneousWithExternalGesture(scrollRef).activeOffsetY([-10, 10]).failOffsetX([-16, 16]).onStart(() => {
129
140
  context.value = {
130
141
  y: translateY.value
131
142
  };
@@ -134,6 +145,16 @@ function Drawer({
134
145
  prevAtTop.value = scrollY.value <= 1;
135
146
  scrollTopTranslationOffset.value = 0;
136
147
  }).onUpdate(event => {
148
+ // Defense-in-depth: even after vertical activation, if the *current*
149
+ // motion is dominantly horizontal (e.g., the user activated with a
150
+ // small Y nudge and then curved into a horizontal swipe on a child
151
+ // carousel), don't translate the drawer this frame. failOffsetX
152
+ // already prevents activation in pure-horizontal swipes; this guards
153
+ // the diagonal-then-horizontal case.
154
+ if (Math.abs(event.translationX) > Math.abs(event.translationY) * 1.5) {
155
+ return;
156
+ }
157
+
137
158
  // Logic for nested scrolling:
138
159
  // If we are at the expanded position (minTranslateY) AND content is
139
160
  // scrolled down (scrollY > 0), let the ScrollView handle the gesture.
@@ -245,71 +266,108 @@ function Drawer({
245
266
  const titleWeight = getVariableByName('drawer/title/fontWeight', modes) || '700';
246
267
  const titleLineHeight = getVariableByName('drawer/title/lineHeight', modes) || 17;
247
268
  const titlePaddingBottom = getVariableByName('drawer/titleWrap/padding/bottom', modes) || 8;
269
+
270
+ // Drop shadow — Figma layers two shadows (primary + secondary) sharing
271
+ // the same offsetY/blur but with their own offsetX and color.
272
+ const shadowPrimaryOffsetX = getVariableByName('drawer/shadow/primary/offsetX', modes) ?? 0;
273
+ const shadowPrimaryOffsetY = getVariableByName('drawer/shadow/primary/offsetY', modes) ?? 16;
274
+ const shadowPrimaryBlur = getVariableByName('drawer/shadow/primary/blur', modes) ?? 48;
275
+ const shadowPrimaryColor = getVariableByName('drawer/shadow/primary/color', modes) ?? 'rgba(12, 13, 16, 0.16)';
276
+ const shadowSecondaryOffsetX = getVariableByName('drawer/shadow/secondary/offsetX', modes) ?? 0;
277
+ const shadowSecondaryColor = getVariableByName('drawer/shadow/secondary/color', modes) ?? 'rgba(12, 13, 16, 0.12)';
278
+
279
+ // Cross-platform shadow style. Web supports stacking two shadows via
280
+ // boxShadow. iOS only supports a single native shadow per view, so we
281
+ // apply the more prominent (primary) one. Android uses elevation.
282
+ const shadowStyle = Platform.select({
283
+ web: {
284
+ boxShadow: `${shadowSecondaryOffsetX}px ${shadowPrimaryOffsetY}px ${shadowPrimaryBlur}px 0px ${shadowSecondaryColor}, ` + `${shadowPrimaryOffsetX}px ${shadowPrimaryOffsetY}px ${shadowPrimaryBlur}px 0px ${shadowPrimaryColor}`
285
+ },
286
+ ios: {
287
+ shadowColor: shadowPrimaryColor,
288
+ shadowOffset: {
289
+ width: shadowPrimaryOffsetX,
290
+ height: shadowPrimaryOffsetY
291
+ },
292
+ shadowOpacity: 1,
293
+ shadowRadius: shadowPrimaryBlur / 2
294
+ },
295
+ android: {
296
+ elevation: 16
297
+ },
298
+ default: {}
299
+ });
248
300
  const defaultAccessibilityLabel = accessibilityLabel || title || 'Drawer';
249
301
  return /*#__PURE__*/_jsx(GestureHandlerRootView, {
250
302
  style: [styles.host, style],
251
303
  pointerEvents: "box-none",
252
304
  children: /*#__PURE__*/_jsx(GestureDetector, {
253
305
  gesture: gesture,
254
- children: /*#__PURE__*/_jsxs(Animated.View, {
306
+ children: /*#__PURE__*/_jsx(Animated.View, {
255
307
  style: [styles.sheet, {
256
308
  // Constraint the height strictly to the expanded height
257
309
  // This ensures the ScrollView has a finite frame to scroll within
258
310
  height: expandedHeight,
259
311
  backgroundColor,
260
312
  borderTopLeftRadius: radius,
261
- borderTopRightRadius: radius,
262
- paddingLeft,
263
- paddingRight,
264
- paddingBottom,
265
- rowGap: drawerGap
266
- }, sheetStyle, animatedStyle],
313
+ borderTopRightRadius: radius
314
+ }, shadowStyle, sheetStyle, animatedStyle],
267
315
  accessible: true,
268
316
  ...(Platform.OS === 'web' ? {
269
317
  accessibilityRole: 'dialog'
270
318
  } : undefined),
271
319
  accessibilityLabel: undefined,
272
320
  accessibilityHint: accessibilityHint || 'Swipe up to expand, swipe down to collapse',
273
- children: [/*#__PURE__*/_jsx(View, {
274
- style: [styles.handleArea, !title && !header && {
275
- paddingBottom: 0
321
+ children: /*#__PURE__*/_jsxs(View, {
322
+ style: [styles.sheetInner, {
323
+ borderTopLeftRadius: radius,
324
+ borderTopRightRadius: radius,
325
+ paddingLeft,
326
+ paddingRight,
327
+ paddingBottom,
328
+ rowGap: drawerGap
276
329
  }],
277
- children: /*#__PURE__*/_jsx(View, {
330
+ children: [/*#__PURE__*/_jsx(View, {
331
+ style: [styles.handleArea, !title && !header && {
332
+ paddingBottom: 0
333
+ }],
334
+ children: /*#__PURE__*/_jsx(View, {
335
+ style: [{
336
+ backgroundColor: handleColor,
337
+ width: handleWidth,
338
+ height: handleHeight,
339
+ borderRadius: handleRadius
340
+ }]
341
+ })
342
+ }), header, title && /*#__PURE__*/_jsx(Text, {
278
343
  style: [{
279
- backgroundColor: handleColor,
280
- width: handleWidth,
281
- height: handleHeight,
282
- borderRadius: handleRadius
283
- }]
284
- })
285
- }), header, title && /*#__PURE__*/_jsx(Text, {
286
- style: [{
287
- color: titleColor,
288
- fontSize: titleSize,
289
- fontWeight: titleWeight,
290
- lineHeight: titleLineHeight,
291
- marginBottom: titlePaddingBottom
292
- }],
293
- children: title
294
- }), /*#__PURE__*/_jsx(AnimatedScrollView, {
295
- ref: scrollRef,
296
- style: [styles.content, contentStyle],
297
- contentContainerStyle: [{
298
- paddingBottom: paddingBottom + bottomInset,
299
- gap: drawerGap,
300
- flexDirection: 'column',
301
- alignItems: 'stretch'
302
- }, contentContainerStyle],
303
- showsVerticalScrollIndicator: showsVerticalScrollIndicator,
304
- animatedProps: animatedScrollProps,
305
- alwaysBounceVertical: false,
306
- overScrollMode: "always",
307
- onScroll: useAnimatedScrollHandler(event => {
308
- scrollY.value = event.contentOffset.y;
309
- }),
310
- scrollEventThrottle: 16,
311
- children: children
312
- })]
344
+ color: titleColor,
345
+ fontSize: titleSize,
346
+ fontWeight: titleWeight,
347
+ lineHeight: titleLineHeight,
348
+ marginBottom: titlePaddingBottom
349
+ }],
350
+ children: title
351
+ }), /*#__PURE__*/_jsx(AnimatedScrollView, {
352
+ ref: scrollRef,
353
+ style: [styles.content, contentStyle],
354
+ contentContainerStyle: [{
355
+ paddingBottom: paddingBottom + bottomInset,
356
+ gap: drawerGap,
357
+ flexDirection: 'column',
358
+ alignItems: 'stretch'
359
+ }, contentContainerStyle],
360
+ showsVerticalScrollIndicator: showsVerticalScrollIndicator,
361
+ animatedProps: animatedScrollProps,
362
+ alwaysBounceVertical: false,
363
+ overScrollMode: "always",
364
+ onScroll: useAnimatedScrollHandler(event => {
365
+ scrollY.value = event.contentOffset.y;
366
+ }),
367
+ scrollEventThrottle: 16,
368
+ children: children
369
+ })]
370
+ })
313
371
  })
314
372
  })
315
373
  });
@@ -327,7 +385,10 @@ const styles = StyleSheet.create({
327
385
  sheet: {
328
386
  width: '100%',
329
387
  position: 'absolute',
330
- top: 0,
388
+ top: 0
389
+ },
390
+ sheetInner: {
391
+ flex: 1,
331
392
  overflow: 'hidden'
332
393
  },
333
394
  handleArea: {
@@ -6,6 +6,7 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
6
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
7
  import IconCapsule from '../IconCapsule/IconCapsule';
8
8
  import Button from '../Button/Button';
9
+ import { EMPTY_MODES } from '../../utils/react-utils';
9
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  /**
11
12
  * EmptyState component that displays an icon, title, description and an action button.
@@ -18,7 +19,7 @@ function EmptyState({
18
19
  showDescription = true,
19
20
  iconSlot,
20
21
  buttonSlot,
21
- modes: propModes = {},
22
+ modes: propModes = EMPTY_MODES,
22
23
  style,
23
24
  testID
24
25
  }) {
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
4
4
  import { View } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import TextInput from '../TextInput/TextInput';
7
- import { cloneChildrenWithModes } from '../../utils/react-utils';
7
+ import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  /**
10
10
  * FilterBar component that mirrors the Figma "filterBar" component.
@@ -31,7 +31,7 @@ function FilterBar({
31
31
  onChangeText,
32
32
  children,
33
33
  renderInput,
34
- modes = {},
34
+ modes = EMPTY_MODES,
35
35
  style,
36
36
  accessibilityLabel,
37
37
  accessibilityHint,
@@ -4,6 +4,7 @@ import React, { createContext, useContext, useState, useMemo, useCallback } from
4
4
  import { View } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
+ import { EMPTY_MODES } from '../../utils/react-utils';
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  const FormContext = /*#__PURE__*/createContext(null);
9
10
  export function useFormContext() {
@@ -13,7 +14,7 @@ function Form({
13
14
  children,
14
15
  validationErrors: externalErrors,
15
16
  onSubmit,
16
- modes: propModes = {},
17
+ modes: propModes = EMPTY_MODES,
17
18
  style,
18
19
  accessibilityLabel,
19
20
  testID
@@ -3,6 +3,7 @@
3
3
  import React, { useState, useMemo, useCallback } from 'react';
4
4
  import { View, Text } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import { EMPTY_MODES } from '../../utils/react-utils';
6
7
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
8
  import TextInput from '../TextInput/TextInput';
8
9
  import SupportText from '../SupportText/SupportText';
@@ -14,7 +15,7 @@ function useFormField(props) {
14
15
  isInvalid = false,
15
16
  supportText,
16
17
  errorMessage,
17
- modes: propModes = {},
18
+ modes: propModes = EMPTY_MODES,
18
19
  onFocus,
19
20
  onBlur
20
21
  } = props;
@@ -140,7 +141,7 @@ function FormField({
140
141
  isInvalid = false,
141
142
  supportText,
142
143
  errorMessage,
143
- modes = {},
144
+ modes = EMPTY_MODES,
144
145
  style,
145
146
  onFocus,
146
147
  onBlur,
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { View } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
- import { cloneChildrenWithModes } from '../../utils/react-utils';
7
+ import { cloneChildrenWithModes, EMPTY_MODES } from '../../utils/react-utils';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  /**
10
10
  * HStack component for horizontal layout using design token spacing.
@@ -16,7 +16,7 @@ export const HStack = ({
16
16
  wrap,
17
17
  reverse = false,
18
18
  as,
19
- modes: propModes = {},
19
+ modes: propModes = EMPTY_MODES,
20
20
  style,
21
21
  ...rest
22
22
  }) => {
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { View, Text, Pressable, Image } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import RadioButton from '../RadioButton/RadioButton';
7
+ import { EMPTY_MODES } from '../../utils/react-utils';
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const GRID_COLUMNS = 3;
9
10
  const GRID_COLUMN_GAP = 12;
@@ -31,7 +32,7 @@ export default function HoldingsCard({
31
32
  selected = false,
32
33
  disabled = false,
33
34
  onPress,
34
- modes = {},
35
+ modes = EMPTY_MODES,
35
36
  style,
36
37
  testID
37
38
  }) {