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.
- package/CHANGELOG.md +59 -0
- package/lib/commonjs/components/Accordion/Accordion.js +1 -1
- package/lib/commonjs/components/ActionFooter/ActionFooter.js +1 -1
- package/lib/commonjs/components/ActionTile/ActionTile.js +2 -1
- package/lib/commonjs/components/AmountInput/AmountInput.js +2 -1
- package/lib/commonjs/components/AppBar/AppBar.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +184 -162
- package/lib/commonjs/components/AvatarGroup/AvatarGroup.js +1 -1
- package/lib/commonjs/components/Badge/Badge.js +2 -1
- package/lib/commonjs/components/Balance/Balance.js +2 -1
- package/lib/commonjs/components/BottomNav/BottomNav.js +2 -1
- package/lib/commonjs/components/BottomNavItem/BottomNavItem.js +106 -86
- package/lib/commonjs/components/Button/Button.js +190 -93
- package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +1 -1
- package/lib/commonjs/components/Card/Card.js +2 -1
- package/lib/commonjs/components/CardCTA/CardCTA.js +1 -1
- package/lib/commonjs/components/CardProviderInfo/CardProviderInfo.js +1 -1
- package/lib/commonjs/components/Carousel/Carousel.js +3 -2
- package/lib/commonjs/components/Checkbox/Checkbox.js +2 -1
- package/lib/commonjs/components/ChipGroup/ChipGroup.js +1 -1
- package/lib/commonjs/components/ChipSelect/ChipSelect.js +2 -1
- package/lib/commonjs/components/DebitCard/DebitCard.js +1 -1
- package/lib/commonjs/components/Disclaimer/Disclaimer.js +2 -1
- package/lib/commonjs/components/Divider/Divider.js +2 -1
- package/lib/commonjs/components/Drawer/Drawer.js +109 -48
- package/lib/commonjs/components/EmptyState/EmptyState.js +2 -1
- package/lib/commonjs/components/FilterBar/FilterBar.js +1 -1
- package/lib/commonjs/components/Form/Form.js +2 -1
- package/lib/commonjs/components/FormField/FormField.js +3 -2
- package/lib/commonjs/components/HStack/HStack.js +1 -1
- package/lib/commonjs/components/HoldingsCard/HoldingsCard.js +2 -1
- package/lib/commonjs/components/IconButton/IconButton.js +118 -128
- package/lib/commonjs/components/IconCapsule/IconCapsule.js +61 -57
- package/lib/commonjs/components/InputSearch/InputSearch.js +7 -3
- package/lib/commonjs/components/LazyList/LazyList.js +1 -1
- package/lib/commonjs/components/LinearMeter/LinearMeter.js +3 -2
- package/lib/commonjs/components/ListGroup/ListGroup.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +190 -142
- package/lib/commonjs/components/MediaCard/MediaCard.js +3 -3
- package/lib/commonjs/components/MerchantProfile/MerchantProfile.js +2 -1
- package/lib/commonjs/components/MoneyValue/MoneyValue.js +2 -1
- package/lib/commonjs/components/NavArrow/NavArrow.js +82 -59
- package/lib/commonjs/components/NoteInput/NoteInput.js +2 -1
- package/lib/commonjs/components/Nudge/Nudge.js +1 -1
- package/lib/commonjs/components/Numpad/Numpad.js +2 -1
- package/lib/commonjs/components/OTP/OTP.js +1 -1
- package/lib/commonjs/components/PaymentFeedback/PaymentFeedback.js +2 -1
- package/lib/commonjs/components/Popup/Popup.js +2 -1
- package/lib/commonjs/components/ProductLabel/ProductLabel.js +2 -1
- package/lib/commonjs/components/ProgressBadge/ProgressBadge.js +2 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js +2 -1
- package/lib/commonjs/components/RechargeCard/RechargeCard.js +2 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -1
- package/lib/commonjs/components/Section/Section.js +500 -166
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +3 -2
- package/lib/commonjs/components/StatItem/StatItem.js +2 -1
- package/lib/commonjs/components/StatusHero/StatusHero.js +2 -1
- package/lib/commonjs/components/Stepper/Step.js +2 -1
- package/lib/commonjs/components/Stepper/StepLabel.js +2 -1
- package/lib/commonjs/components/Stepper/Stepper.js +2 -1
- package/lib/commonjs/components/SupportText/SupportText.js +2 -1
- package/lib/commonjs/components/SupportText/SupportTextIcon.js +2 -1
- package/lib/commonjs/components/SwappableAmount/SwappableAmount.js +2 -1
- package/lib/commonjs/components/Tabs/TabItem.js +2 -1
- package/lib/commonjs/components/Tabs/Tabs.js +2 -1
- package/lib/commonjs/components/Text/Text.js +2 -1
- package/lib/commonjs/components/TextInput/TextInput.js +2 -2
- package/lib/commonjs/components/ThreadHero/ThreadHero.js +2 -1
- package/lib/commonjs/components/Title/Title.js +2 -1
- package/lib/commonjs/components/Toast/Toast.js +2 -1
- package/lib/commonjs/components/Toggle/Toggle.js +2 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +2 -1
- package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +1 -1
- package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +2 -2
- package/lib/commonjs/components/TransactionStatus/TransactionStatus.js +3 -2
- package/lib/commonjs/components/UpiHandle/UpiHandle.js +144 -110
- package/lib/commonjs/components/VStack/VStack.js +1 -1
- package/lib/commonjs/design-tokens/figma-variables-resolver.js +21 -3
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/commonjs/utils/react-utils.js +17 -0
- package/lib/module/components/Accordion/Accordion.js +2 -2
- package/lib/module/components/ActionFooter/ActionFooter.js +2 -2
- package/lib/module/components/ActionTile/ActionTile.js +2 -1
- package/lib/module/components/AmountInput/AmountInput.js +2 -1
- package/lib/module/components/AppBar/AppBar.js +2 -2
- package/lib/module/components/Avatar/Avatar.js +184 -162
- package/lib/module/components/AvatarGroup/AvatarGroup.js +2 -2
- package/lib/module/components/Badge/Badge.js +2 -1
- package/lib/module/components/Balance/Balance.js +2 -1
- package/lib/module/components/BottomNav/BottomNav.js +2 -1
- package/lib/module/components/BottomNavItem/BottomNavItem.js +108 -88
- package/lib/module/components/Button/Button.js +192 -95
- package/lib/module/components/ButtonGroup/ButtonGroup.js +2 -2
- package/lib/module/components/Card/Card.js +2 -1
- package/lib/module/components/CardCTA/CardCTA.js +2 -2
- package/lib/module/components/CardProviderInfo/CardProviderInfo.js +2 -2
- package/lib/module/components/Carousel/Carousel.js +3 -2
- package/lib/module/components/Checkbox/Checkbox.js +2 -1
- package/lib/module/components/ChipGroup/ChipGroup.js +2 -2
- package/lib/module/components/ChipSelect/ChipSelect.js +2 -1
- package/lib/module/components/DebitCard/DebitCard.js +2 -2
- package/lib/module/components/Disclaimer/Disclaimer.js +2 -1
- package/lib/module/components/Divider/Divider.js +2 -1
- package/lib/module/components/Drawer/Drawer.js +109 -48
- package/lib/module/components/EmptyState/EmptyState.js +2 -1
- package/lib/module/components/FilterBar/FilterBar.js +2 -2
- package/lib/module/components/Form/Form.js +2 -1
- package/lib/module/components/FormField/FormField.js +3 -2
- package/lib/module/components/HStack/HStack.js +2 -2
- package/lib/module/components/HoldingsCard/HoldingsCard.js +2 -1
- package/lib/module/components/IconButton/IconButton.js +120 -130
- package/lib/module/components/IconCapsule/IconCapsule.js +60 -57
- package/lib/module/components/InputSearch/InputSearch.js +7 -3
- package/lib/module/components/LazyList/LazyList.js +2 -2
- package/lib/module/components/LinearMeter/LinearMeter.js +3 -2
- package/lib/module/components/ListGroup/ListGroup.js +2 -2
- package/lib/module/components/ListItem/ListItem.js +194 -146
- package/lib/module/components/MediaCard/MediaCard.js +4 -2
- package/lib/module/components/MerchantProfile/MerchantProfile.js +2 -1
- package/lib/module/components/MoneyValue/MoneyValue.js +2 -1
- package/lib/module/components/NavArrow/NavArrow.js +82 -58
- package/lib/module/components/NoteInput/NoteInput.js +2 -1
- package/lib/module/components/Nudge/Nudge.js +2 -2
- package/lib/module/components/Numpad/Numpad.js +2 -1
- package/lib/module/components/OTP/OTP.js +2 -2
- package/lib/module/components/PaymentFeedback/PaymentFeedback.js +2 -1
- package/lib/module/components/Popup/Popup.js +2 -1
- package/lib/module/components/ProductLabel/ProductLabel.js +2 -1
- package/lib/module/components/ProgressBadge/ProgressBadge.js +2 -1
- package/lib/module/components/RadioButton/RadioButton.js +2 -1
- package/lib/module/components/RechargeCard/RechargeCard.js +2 -1
- package/lib/module/components/Screen/Screen.js +2 -2
- package/lib/module/components/Section/Section.js +503 -169
- package/lib/module/components/SegmentedControl/SegmentedControl.js +3 -2
- package/lib/module/components/StatItem/StatItem.js +2 -1
- package/lib/module/components/StatusHero/StatusHero.js +2 -1
- package/lib/module/components/Stepper/Step.js +2 -1
- package/lib/module/components/Stepper/StepLabel.js +2 -1
- package/lib/module/components/Stepper/Stepper.js +2 -1
- package/lib/module/components/SupportText/SupportText.js +2 -1
- package/lib/module/components/SupportText/SupportTextIcon.js +2 -1
- package/lib/module/components/SwappableAmount/SwappableAmount.js +2 -1
- package/lib/module/components/Tabs/TabItem.js +2 -1
- package/lib/module/components/Tabs/Tabs.js +2 -1
- package/lib/module/components/Text/Text.js +2 -1
- package/lib/module/components/TextInput/TextInput.js +3 -3
- package/lib/module/components/ThreadHero/ThreadHero.js +2 -1
- package/lib/module/components/Title/Title.js +2 -1
- package/lib/module/components/Toast/Toast.js +2 -1
- package/lib/module/components/Toggle/Toggle.js +2 -1
- package/lib/module/components/Tooltip/Tooltip.js +2 -1
- package/lib/module/components/TransactionBubble/TransactionBubble.js +2 -2
- package/lib/module/components/TransactionDetails/TransactionDetails.js +3 -3
- package/lib/module/components/TransactionStatus/TransactionStatus.js +3 -2
- package/lib/module/components/UpiHandle/UpiHandle.js +147 -113
- package/lib/module/components/VStack/VStack.js +2 -2
- package/lib/module/design-tokens/figma-variables-resolver.js +21 -3
- package/lib/module/icons/registry.js +1 -1
- package/lib/module/utils/react-utils.js +16 -0
- package/lib/typescript/src/components/Avatar/Avatar.d.ts +11 -17
- package/lib/typescript/src/components/BottomNavItem/BottomNavItem.d.ts +12 -8
- package/lib/typescript/src/components/Button/Button.d.ts +18 -1
- package/lib/typescript/src/components/IconButton/IconButton.d.ts +12 -29
- package/lib/typescript/src/components/IconCapsule/IconCapsule.d.ts +10 -18
- package/lib/typescript/src/components/InputSearch/InputSearch.d.ts +8 -3
- package/lib/typescript/src/components/ListItem/ListItem.d.ts +14 -1
- package/lib/typescript/src/components/NavArrow/NavArrow.d.ts +12 -11
- package/lib/typescript/src/components/Section/Section.d.ts +43 -48
- package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +13 -12
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/lib/typescript/src/utils/react-utils.d.ts +15 -0
- package/package.json +4 -6
- package/src/components/Accordion/Accordion.tsx +2 -2
- package/src/components/ActionFooter/ActionFooter.tsx +2 -2
- package/src/components/ActionTile/ActionTile.tsx +2 -1
- package/src/components/AmountInput/AmountInput.tsx +2 -1
- package/src/components/AppBar/AppBar.tsx +2 -2
- package/src/components/Avatar/Avatar.tsx +229 -158
- package/src/components/AvatarGroup/AvatarGroup.tsx +2 -2
- package/src/components/Badge/Badge.tsx +2 -1
- package/src/components/Balance/Balance.tsx +2 -1
- package/src/components/BottomNav/BottomNav.tsx +2 -1
- package/src/components/BottomNavItem/BottomNavItem.tsx +159 -88
- package/src/components/Button/Button.tsx +228 -101
- package/src/components/ButtonGroup/ButtonGroup.tsx +2 -2
- package/src/components/Card/Card.tsx +2 -1
- package/src/components/CardCTA/CardCTA.tsx +2 -2
- package/src/components/CardProviderInfo/CardProviderInfo.tsx +2 -2
- package/src/components/Carousel/Carousel.tsx +3 -2
- package/src/components/Checkbox/Checkbox.tsx +2 -1
- package/src/components/ChipGroup/ChipGroup.tsx +2 -2
- package/src/components/ChipSelect/ChipSelect.tsx +2 -1
- package/src/components/DebitCard/DebitCard.tsx +2 -2
- package/src/components/Disclaimer/Disclaimer.tsx +2 -1
- package/src/components/Divider/Divider.tsx +2 -1
- package/src/components/Drawer/Drawer.tsx +124 -58
- package/src/components/EmptyState/EmptyState.tsx +2 -1
- package/src/components/FilterBar/FilterBar.tsx +2 -2
- package/src/components/Form/Form.tsx +2 -1
- package/src/components/FormField/FormField.tsx +3 -2
- package/src/components/HStack/HStack.tsx +2 -2
- package/src/components/HoldingsCard/HoldingsCard.tsx +2 -1
- package/src/components/IconButton/IconButton.tsx +154 -126
- package/src/components/IconCapsule/IconCapsule.tsx +73 -54
- package/src/components/InputSearch/InputSearch.tsx +19 -5
- package/src/components/LazyList/LazyList.tsx +2 -2
- package/src/components/LinearMeter/LinearMeter.tsx +3 -2
- package/src/components/ListGroup/ListGroup.tsx +2 -2
- package/src/components/ListItem/ListItem.tsx +257 -187
- package/src/components/MediaCard/MediaCard.tsx +2 -1
- package/src/components/MerchantProfile/MerchantProfile.tsx +2 -1
- package/src/components/MoneyValue/MoneyValue.tsx +2 -1
- package/src/components/NavArrow/NavArrow.tsx +91 -58
- package/src/components/NoteInput/NoteInput.tsx +2 -1
- package/src/components/Nudge/Nudge.tsx +2 -2
- package/src/components/Numpad/Numpad.tsx +2 -1
- package/src/components/OTP/OTP.tsx +2 -2
- package/src/components/PaymentFeedback/PaymentFeedback.tsx +2 -1
- package/src/components/Popup/Popup.tsx +2 -1
- package/src/components/ProductLabel/ProductLabel.tsx +2 -1
- package/src/components/ProgressBadge/ProgressBadge.tsx +2 -2
- package/src/components/RadioButton/RadioButton.tsx +2 -1
- package/src/components/RechargeCard/RechargeCard.tsx +2 -1
- package/src/components/Screen/Screen.tsx +2 -2
- package/src/components/Section/Section.tsx +672 -176
- package/src/components/SegmentedControl/SegmentedControl.tsx +3 -2
- package/src/components/StatItem/StatItem.tsx +2 -1
- package/src/components/StatusHero/StatusHero.tsx +2 -1
- package/src/components/Stepper/Step.tsx +2 -1
- package/src/components/Stepper/StepLabel.tsx +2 -1
- package/src/components/Stepper/Stepper.tsx +2 -1
- package/src/components/SupportText/SupportText.tsx +2 -1
- package/src/components/SupportText/SupportTextIcon.tsx +2 -1
- package/src/components/SwappableAmount/SwappableAmount.tsx +2 -1
- package/src/components/Tabs/TabItem.tsx +2 -1
- package/src/components/Tabs/Tabs.tsx +2 -1
- package/src/components/Text/Text.tsx +2 -1
- package/src/components/TextInput/TextInput.tsx +3 -3
- package/src/components/ThreadHero/ThreadHero.tsx +2 -1
- package/src/components/Title/Title.tsx +2 -1
- package/src/components/Toast/Toast.tsx +2 -1
- package/src/components/Toggle/Toggle.tsx +2 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/TransactionBubble/TransactionBubble.tsx +2 -2
- package/src/components/TransactionDetails/TransactionDetails.tsx +3 -3
- package/src/components/TransactionStatus/TransactionStatus.tsx +3 -2
- package/src/components/UpiHandle/UpiHandle.tsx +193 -125
- package/src/components/VStack/VStack.tsx +2 -2
- package/src/design-tokens/figma-variables-resolver.ts +21 -3
- package/src/icons/registry.ts +1 -1
- package/src/utils/react-utils.ts +16 -0
- package/lib/typescript/App.d.ts +0 -2
- package/lib/typescript/index.d.ts +0 -2
- package/lib/typescript/metro.config.d.ts +0 -78
- package/lib/typescript/react-native.config.d.ts +0 -4
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type TextStyle,
|
|
9
9
|
} from 'react-native'
|
|
10
10
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
11
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
11
12
|
|
|
12
13
|
export type SegmentedControlItem = {
|
|
13
14
|
key: React.Key
|
|
@@ -33,7 +34,7 @@ function SegmentedControlSegment({
|
|
|
33
34
|
label,
|
|
34
35
|
active,
|
|
35
36
|
onPress,
|
|
36
|
-
modes =
|
|
37
|
+
modes = EMPTY_MODES,
|
|
37
38
|
}: {
|
|
38
39
|
label: string
|
|
39
40
|
active: boolean
|
|
@@ -117,7 +118,7 @@ function SegmentedControl({
|
|
|
117
118
|
selectedKey: controlledSelectedKey,
|
|
118
119
|
defaultSelectedKey,
|
|
119
120
|
onSelectionChange,
|
|
120
|
-
modes =
|
|
121
|
+
modes = EMPTY_MODES,
|
|
121
122
|
style,
|
|
122
123
|
}: SegmentedControlProps) {
|
|
123
124
|
const isControlled = controlledSelectedKey !== undefined
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { View, Text, type StyleProp, type ViewStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
4
5
|
|
|
5
6
|
export type StatItemProps = {
|
|
6
7
|
/** The small descriptive label above the value. */
|
|
@@ -23,7 +24,7 @@ export type StatItemProps = {
|
|
|
23
24
|
function StatItem({
|
|
24
25
|
label = 'Purity verified by NABL',
|
|
25
26
|
value = '99.99%',
|
|
26
|
-
modes =
|
|
27
|
+
modes = EMPTY_MODES,
|
|
27
28
|
style,
|
|
28
29
|
}: StatItemProps) {
|
|
29
30
|
const gap = getVariableByName('statItem/gap', modes) ?? 2
|
|
@@ -4,6 +4,7 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
|
4
4
|
import { useTokens } from '../../design-tokens/JFSThemeProvider'
|
|
5
5
|
import IconCapsule from '../IconCapsule/IconCapsule'
|
|
6
6
|
import MoneyValue from '../MoneyValue/MoneyValue'
|
|
7
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
7
8
|
|
|
8
9
|
export type StatusHeroProps = {
|
|
9
10
|
/**
|
|
@@ -57,7 +58,7 @@ export default function StatusHero({
|
|
|
57
58
|
iconName = 'ic_confirm',
|
|
58
59
|
value = '50',
|
|
59
60
|
currency = 'INR',
|
|
60
|
-
modes: propModes =
|
|
61
|
+
modes: propModes = EMPTY_MODES,
|
|
61
62
|
style,
|
|
62
63
|
}: StatusHeroProps) {
|
|
63
64
|
const { modes: globalModes } = useTokens()
|
|
@@ -3,6 +3,7 @@ import { View, Text, type ViewStyle, type TextStyle } from 'react-native'
|
|
|
3
3
|
import Svg, { Path } from 'react-native-svg'
|
|
4
4
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
5
5
|
import { StepLabel } from './StepLabel'
|
|
6
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
6
7
|
|
|
7
8
|
export type StepStatus = 'number' | 'complete' | 'error' | 'warning'
|
|
8
9
|
|
|
@@ -25,7 +26,7 @@ export type StepProps = {
|
|
|
25
26
|
|
|
26
27
|
export function Step({
|
|
27
28
|
children,
|
|
28
|
-
modes =
|
|
29
|
+
modes = EMPTY_MODES,
|
|
29
30
|
style,
|
|
30
31
|
index = 0,
|
|
31
32
|
connectorStyle,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { View, Text, type ViewStyle, type TextStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
4
5
|
|
|
5
6
|
export type StepLabelProps = {
|
|
6
7
|
title?: string
|
|
@@ -12,7 +13,7 @@ export type StepLabelProps = {
|
|
|
12
13
|
export function StepLabel({
|
|
13
14
|
title = 'Stepper Item',
|
|
14
15
|
supportingText,
|
|
15
|
-
modes =
|
|
16
|
+
modes = EMPTY_MODES,
|
|
16
17
|
style,
|
|
17
18
|
}: StepLabelProps) {
|
|
18
19
|
// Title styles
|
|
@@ -3,6 +3,7 @@ import { View, type ViewStyle } from 'react-native'
|
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
4
|
import { Step } from './Step'
|
|
5
5
|
import { StepLabel } from './StepLabel'
|
|
6
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
6
7
|
|
|
7
8
|
export { Step, StepLabel }
|
|
8
9
|
|
|
@@ -14,7 +15,7 @@ type StepperProps = {
|
|
|
14
15
|
|
|
15
16
|
export default function Stepper({
|
|
16
17
|
children,
|
|
17
|
-
modes =
|
|
18
|
+
modes = EMPTY_MODES,
|
|
18
19
|
style,
|
|
19
20
|
}: StepperProps) {
|
|
20
21
|
// Stepper container styles
|
|
@@ -3,6 +3,7 @@ import { View, Text, type StyleProp, type ViewStyle, type TextStyle } from 'reac
|
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
4
4
|
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
5
5
|
import SupportTextIcon, { type SupportTextStatus } from './SupportTextIcon';
|
|
6
|
+
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
6
7
|
|
|
7
8
|
export type SupportTextProps = {
|
|
8
9
|
/**
|
|
@@ -39,7 +40,7 @@ function SupportText({
|
|
|
39
40
|
status = 'Neutral',
|
|
40
41
|
iconSlot,
|
|
41
42
|
textSlot,
|
|
42
|
-
modes: propModes =
|
|
43
|
+
modes: propModes = EMPTY_MODES,
|
|
43
44
|
style,
|
|
44
45
|
}: SupportTextProps) {
|
|
45
46
|
const { modes: globalModes } = useTokens();
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { View, type ViewStyle } from 'react-native';
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
4
4
|
import Icon from '../../icons/Icon';
|
|
5
|
+
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
5
6
|
|
|
6
7
|
export type SupportTextStatus = 'Neutral' | 'Warning' | 'Error' | 'Success' | 'Loading';
|
|
7
8
|
|
|
@@ -21,7 +22,7 @@ const STATUS_ICON_MAP: Record<SupportTextStatus, string> = {
|
|
|
21
22
|
|
|
22
23
|
function SupportTextIcon({
|
|
23
24
|
status = 'Neutral',
|
|
24
|
-
modes =
|
|
25
|
+
modes = EMPTY_MODES,
|
|
25
26
|
style,
|
|
26
27
|
}: SupportTextIconProps) {
|
|
27
28
|
const iconName = STATUS_ICON_MAP[status] || 'ic_info';
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { View, Text, type ViewStyle, type TextStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
4
|
import Button from '../Button/Button'
|
|
5
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
5
6
|
|
|
6
7
|
export type SwappableAmountProps = {
|
|
7
8
|
/** Large display value (e.g. "49g"). */
|
|
@@ -29,7 +30,7 @@ function SwappableAmount({
|
|
|
29
30
|
amountLabel = '₹5100',
|
|
30
31
|
onSchedulePress,
|
|
31
32
|
onAmountPress,
|
|
32
|
-
modes =
|
|
33
|
+
modes = EMPTY_MODES,
|
|
33
34
|
style,
|
|
34
35
|
}: SwappableAmountProps) {
|
|
35
36
|
const gap = getVariableByName('swappableAmount/gap', modes) ?? 24
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type TextStyle,
|
|
9
9
|
} from 'react-native'
|
|
10
10
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
11
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
11
12
|
|
|
12
13
|
export interface TabItemProps {
|
|
13
14
|
/** Label text to display */
|
|
@@ -39,7 +40,7 @@ function TabItem({
|
|
|
39
40
|
label = 'Tab item',
|
|
40
41
|
active = false,
|
|
41
42
|
onPress,
|
|
42
|
-
modes =
|
|
43
|
+
modes = EMPTY_MODES,
|
|
43
44
|
style,
|
|
44
45
|
labelStyle,
|
|
45
46
|
accessibilityLabel,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from 'react-native'
|
|
8
8
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
9
9
|
import TabItem from './TabItem'
|
|
10
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
10
11
|
|
|
11
12
|
export interface TabsProps {
|
|
12
13
|
/**
|
|
@@ -48,7 +49,7 @@ export interface TabsProps {
|
|
|
48
49
|
*/
|
|
49
50
|
function Tabs({
|
|
50
51
|
children,
|
|
51
|
-
modes =
|
|
52
|
+
modes = EMPTY_MODES,
|
|
52
53
|
scrollable = false,
|
|
53
54
|
style,
|
|
54
55
|
}: TabsProps) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Text as RNText, type TextStyle, type StyleProp } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
4
5
|
|
|
5
6
|
export type TextProps = {
|
|
6
7
|
/** The text content to display. */
|
|
@@ -23,7 +24,7 @@ const TEXT_ALIGN_MAP: Record<NonNullable<TextProps['textAlign']>, TextStyle['tex
|
|
|
23
24
|
function Text({
|
|
24
25
|
text = 'Korem ipsum ',
|
|
25
26
|
textAlign = 'Left',
|
|
26
|
-
modes =
|
|
27
|
+
modes = EMPTY_MODES,
|
|
27
28
|
style,
|
|
28
29
|
numberOfLines,
|
|
29
30
|
}: TextProps) {
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
|
|
|
2
2
|
import { Pressable, View, TextInput as RNTextInput, type StyleProp, type ViewStyle, type TextInputProps as RNTextInputProps, type TextStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
4
|
import Icon from '../../icons/Icon'
|
|
5
|
-
import { cloneChildrenWithModes } from '../../utils/react-utils'
|
|
5
|
+
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TextInput component that mirrors the Figma "textInput" component.
|
|
@@ -116,7 +116,7 @@ function TextInput({
|
|
|
116
116
|
leadingIconName = 'ic_search',
|
|
117
117
|
leading,
|
|
118
118
|
trailing,
|
|
119
|
-
modes =
|
|
119
|
+
modes = EMPTY_MODES,
|
|
120
120
|
style,
|
|
121
121
|
inputStyle,
|
|
122
122
|
onFocus,
|
|
@@ -298,7 +298,7 @@ function TextInputSearch({
|
|
|
298
298
|
value = '',
|
|
299
299
|
onChangeText,
|
|
300
300
|
leading,
|
|
301
|
-
modes =
|
|
301
|
+
modes = EMPTY_MODES,
|
|
302
302
|
style,
|
|
303
303
|
inputStyle,
|
|
304
304
|
accessibilityLabel,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { isValidElement, cloneElement, type ReactNode } from 'react'
|
|
2
2
|
import { View, Text, type ViewStyle, type TextStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
4
5
|
|
|
5
6
|
export type ThreadHeroProps = {
|
|
6
7
|
/** Title text, e.g. "Subhash Rajan" */
|
|
@@ -25,7 +26,7 @@ export default function ThreadHero({
|
|
|
25
26
|
subtitle = 'Banking name: SHIVASHANKAR RAJAN',
|
|
26
27
|
caption,
|
|
27
28
|
renderAvatar,
|
|
28
|
-
modes =
|
|
29
|
+
modes = EMPTY_MODES,
|
|
29
30
|
style,
|
|
30
31
|
}: ThreadHeroProps) {
|
|
31
32
|
// Container Gaps
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { View, Text, type StyleProp, type ViewStyle, type TextStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
4
|
import { useTokens } from '../../design-tokens/JFSThemeProvider'
|
|
5
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
5
6
|
|
|
6
7
|
export type TitleProps = {
|
|
7
8
|
title?: string;
|
|
@@ -28,7 +29,7 @@ function Title({
|
|
|
28
29
|
title = 'Title',
|
|
29
30
|
subtitle,
|
|
30
31
|
textAlign = 'Left',
|
|
31
|
-
modes: propModes =
|
|
32
|
+
modes: propModes = EMPTY_MODES,
|
|
32
33
|
style,
|
|
33
34
|
textStyle,
|
|
34
35
|
subtitleStyle,
|
|
@@ -3,6 +3,7 @@ import { StyleSheet, Text, type StyleProp, type ViewStyle } from 'react-native'
|
|
|
3
3
|
import Animated, { FadeIn, FadeOut, SlideInDown, SlideInUp } from 'react-native-reanimated'
|
|
4
4
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
5
5
|
import { closeToast, type ToastPlacement } from './useToast'
|
|
6
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
6
7
|
|
|
7
8
|
export interface ToastProps {
|
|
8
9
|
id: string
|
|
@@ -21,7 +22,7 @@ function Toast({
|
|
|
21
22
|
title,
|
|
22
23
|
timeout = 4000,
|
|
23
24
|
onClose,
|
|
24
|
-
modes =
|
|
25
|
+
modes = EMPTY_MODES,
|
|
25
26
|
placement = 'bottom',
|
|
26
27
|
style,
|
|
27
28
|
}: ToastProps) {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type ViewStyle,
|
|
8
8
|
} from 'react-native'
|
|
9
9
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
10
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
10
11
|
|
|
11
12
|
export interface ToggleProps {
|
|
12
13
|
/** Whether the toggle is on (controlled) */
|
|
@@ -39,7 +40,7 @@ function Toggle({
|
|
|
39
40
|
defaultValue = false,
|
|
40
41
|
onValueChange,
|
|
41
42
|
disabled = false,
|
|
42
|
-
modes =
|
|
43
|
+
modes = EMPTY_MODES,
|
|
43
44
|
style,
|
|
44
45
|
accessibilityLabel,
|
|
45
46
|
}: ToggleProps) {
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import Svg, { Path } from 'react-native-svg'
|
|
22
22
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
23
23
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
24
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
24
25
|
|
|
25
26
|
// --- Types ---
|
|
26
27
|
|
|
@@ -92,7 +93,7 @@ export type TooltipProps = {
|
|
|
92
93
|
|
|
93
94
|
export function Tooltip({
|
|
94
95
|
children,
|
|
95
|
-
modes =
|
|
96
|
+
modes = EMPTY_MODES,
|
|
96
97
|
open,
|
|
97
98
|
onOpenChange,
|
|
98
99
|
defaultOpen = false,
|
|
@@ -4,7 +4,7 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
|
4
4
|
import MoneyValue from '../MoneyValue/MoneyValue'
|
|
5
5
|
import TransactionStatus from '../TransactionStatus/TransactionStatus'
|
|
6
6
|
import NavArrow from '../NavArrow/NavArrow'
|
|
7
|
-
import { cloneChildrenWithModes } from '../../utils/react-utils'
|
|
7
|
+
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils'
|
|
8
8
|
import { usePressableWebSupport, type WebAccessibilityProps } from '../../utils/web-platform-utils'
|
|
9
9
|
|
|
10
10
|
export type TransactionBubbleProps = {
|
|
@@ -49,7 +49,7 @@ function TransactionBubble({
|
|
|
49
49
|
date = '20 Mar 2025',
|
|
50
50
|
statusSlot,
|
|
51
51
|
children,
|
|
52
|
-
modes =
|
|
52
|
+
modes = EMPTY_MODES,
|
|
53
53
|
onPress,
|
|
54
54
|
style,
|
|
55
55
|
accessibilityLabel,
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { View, Text, type StyleProp, type ViewStyle, type TextStyle } from 'react-native'
|
|
3
3
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
4
4
|
|
|
5
|
-
import { cloneChildrenWithModes } from '../../utils/react-utils'
|
|
5
|
+
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils'
|
|
6
6
|
|
|
7
7
|
// ===== Item Subcomponent =====
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ export type TransactionDetailsItemProps = {
|
|
|
40
40
|
function Item({
|
|
41
41
|
label = 'Label',
|
|
42
42
|
value = 'Value',
|
|
43
|
-
modes =
|
|
43
|
+
modes = EMPTY_MODES,
|
|
44
44
|
style,
|
|
45
45
|
labelStyle,
|
|
46
46
|
valueStyle,
|
|
@@ -158,7 +158,7 @@ export type TransactionDetailsProps = {
|
|
|
158
158
|
*/
|
|
159
159
|
function TransactionDetails({
|
|
160
160
|
children,
|
|
161
|
-
modes =
|
|
161
|
+
modes = EMPTY_MODES,
|
|
162
162
|
style,
|
|
163
163
|
accessibilityLabel,
|
|
164
164
|
...rest
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { View, Text, type ViewStyle, type TextStyle } from 'react-native'
|
|
3
3
|
import { Svg, Path } from 'react-native-svg'
|
|
4
4
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
5
|
+
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
5
6
|
|
|
6
7
|
// --- Internal Icon Component ---
|
|
7
8
|
type StatusIconProps = {
|
|
@@ -12,7 +13,7 @@ type StatusIconProps = {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
const StatusIcon = ({
|
|
15
|
-
modes =
|
|
16
|
+
modes = EMPTY_MODES,
|
|
16
17
|
width = 15,
|
|
17
18
|
height = 15,
|
|
18
19
|
color,
|
|
@@ -54,7 +55,7 @@ export type TransactionStatusProps = {
|
|
|
54
55
|
export default function TransactionStatus({
|
|
55
56
|
status = 'Expired',
|
|
56
57
|
date = '20 Mar 2025',
|
|
57
|
-
modes =
|
|
58
|
+
modes = EMPTY_MODES,
|
|
58
59
|
style,
|
|
59
60
|
}: TransactionStatusProps) {
|
|
60
61
|
const gap = Number(getVariableByName('transactionBubble/statusWrap/gap', modes)) || 4
|