jfs-components 0.0.61 → 0.0.63
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 +36 -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 +2 -1
- 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 +2 -3
- 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 +268 -156
- 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/JFSThemeProvider.js +2 -38
- 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 +26 -3
- 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 +2 -1
- 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 +3 -4
- 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 +271 -159
- 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/JFSThemeProvider.js +2 -35
- 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 +25 -3
- 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 +2 -48
- package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +13 -12
- package/lib/typescript/src/design-tokens/JFSThemeProvider.d.ts +0 -15
- 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 +2 -1
- 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 +4 -5
- 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 +323 -167
- 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/JFSThemeProvider.tsx +1 -37
- package/src/design-tokens/figma-variables-resolver.ts +21 -3
- package/src/icons/registry.ts +1 -1
- package/src/utils/react-utils.ts +29 -3
- 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
|
@@ -14,13 +14,103 @@ var _reactUtils = require("../../utils/react-utils");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Module-scope constants — never re-allocated per render.
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
const IS_IOS = _reactNative.Platform.OS === 'ios';
|
|
22
|
+
const PRESS_DELAY = IS_IOS ? 130 : 0;
|
|
23
|
+
|
|
24
|
+
// Forced modes for the endSlot — `Context: 'ListItem'` can never be
|
|
25
|
+
// overridden by external modes. Frozen so identity is stable across renders.
|
|
26
|
+
const END_SLOT_FORCED_MODES = Object.freeze({
|
|
27
|
+
Context: 'ListItem'
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Pressed visual is applied on the host view through Pressable's style
|
|
31
|
+
// callback, so a scroll-cancelled touch never schedules a React render.
|
|
32
|
+
const pressedOverlayStyle = {
|
|
33
|
+
opacity: 0.85
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Token resolution — collapsed into one useMemo per (modes) tuple.
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
function resolveListItemTokens(modes) {
|
|
41
|
+
const resolvedModes = {
|
|
42
|
+
...modes,
|
|
43
|
+
Context: 'ListItem'
|
|
44
|
+
};
|
|
45
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('listItem/gap', resolvedModes) ?? 8;
|
|
46
|
+
const paddingTop = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/top', resolvedModes) ?? 0;
|
|
47
|
+
const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/bottom', resolvedModes) ?? 0;
|
|
48
|
+
const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/left', resolvedModes) ?? 0;
|
|
49
|
+
const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/right', resolvedModes) ?? 0;
|
|
50
|
+
const textWrapGap = (0, _figmaVariablesResolver.getVariableByName)('listItem/text wrap', resolvedModes) ?? 0;
|
|
51
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/color', resolvedModes) || '#0f0d0a';
|
|
52
|
+
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontSize', resolvedModes) || 14;
|
|
53
|
+
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/lineHeight', resolvedModes) || 16;
|
|
54
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontFamily', resolvedModes) || 'System';
|
|
55
|
+
const titleFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontWeight', resolvedModes) || 700;
|
|
56
|
+
const titleFontWeight = typeof titleFontWeightRaw === 'number' ? titleFontWeightRaw.toString() : titleFontWeightRaw;
|
|
57
|
+
const supportColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/color', resolvedModes) || '#1f1a14';
|
|
58
|
+
const supportFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontSize', resolvedModes) || 12;
|
|
59
|
+
const supportLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/lineHeight', resolvedModes) || 14;
|
|
60
|
+
const supportFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontFamily', resolvedModes) || 'System';
|
|
61
|
+
const supportFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontWeight', resolvedModes) || 500;
|
|
62
|
+
const supportFontWeight = typeof supportFontWeightRaw === 'number' ? supportFontWeightRaw.toString() : supportFontWeightRaw;
|
|
63
|
+
return {
|
|
64
|
+
baseContainerStyle: {
|
|
65
|
+
paddingTop: paddingTop,
|
|
66
|
+
paddingBottom: paddingBottom,
|
|
67
|
+
paddingLeft: paddingLeft,
|
|
68
|
+
paddingRight: paddingRight
|
|
69
|
+
},
|
|
70
|
+
horizontalLayoutStyle: {
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
gap
|
|
74
|
+
},
|
|
75
|
+
verticalLayoutStyle: {
|
|
76
|
+
flexDirection: 'column',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
gap
|
|
79
|
+
},
|
|
80
|
+
innerContentBaseStyle: {
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
flex: 1,
|
|
84
|
+
gap
|
|
85
|
+
},
|
|
86
|
+
verticalContentBaseStyle: {
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
gap
|
|
89
|
+
},
|
|
90
|
+
titleTextStyle: {
|
|
91
|
+
color: titleColor,
|
|
92
|
+
fontSize: titleFontSize,
|
|
93
|
+
lineHeight: titleLineHeight,
|
|
94
|
+
fontFamily: titleFontFamily,
|
|
95
|
+
fontWeight: titleFontWeight
|
|
96
|
+
},
|
|
97
|
+
supportTextStyle: {
|
|
98
|
+
color: supportColor,
|
|
99
|
+
fontSize: supportFontSize,
|
|
100
|
+
lineHeight: supportLineHeight,
|
|
101
|
+
fontFamily: supportFontFamily,
|
|
102
|
+
fontWeight: supportFontWeight
|
|
103
|
+
},
|
|
104
|
+
trailingWrapperStyle: {
|
|
105
|
+
marginLeft: gap / 2
|
|
106
|
+
},
|
|
107
|
+
textWrapGap,
|
|
108
|
+
resolvedModes
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const verticalSupportTextOverride = {
|
|
112
|
+
textAlign: 'center'
|
|
113
|
+
};
|
|
24
114
|
|
|
25
115
|
/**
|
|
26
116
|
* ListItem component that mirrors the Figma "List Item" component.
|
|
@@ -53,8 +143,20 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
53
143
|
* @param {string} [props.accessibilityLabel] - Accessibility label for screen readers. If not provided, uses title and supportText
|
|
54
144
|
* @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
|
|
55
145
|
* @param {Object} [props.accessibilityState] - Additional accessibility state information
|
|
146
|
+
*
|
|
147
|
+
* Performance notes:
|
|
148
|
+
* - All token reads are folded into a single `useMemo([modes])`.
|
|
149
|
+
* - The pressed visual is applied via Pressable's `style={({pressed}) => ...}`
|
|
150
|
+
* callback so RN updates the host view directly — no React render is
|
|
151
|
+
* scheduled by a touch. On iOS the touch is additionally delayed via
|
|
152
|
+
* `unstable_pressDelay={130}` so a scroll-cancelled tap never even
|
|
153
|
+
* transiently applies the pressed style. This is the fix for the
|
|
154
|
+
* "People / Setup card flicker during scroll" report.
|
|
155
|
+
* - User-supplied event handlers are read through a ref so the wrapper
|
|
156
|
+
* handlers stay referentially stable across renders.
|
|
157
|
+
* - The component is wrapped in `React.memo`.
|
|
56
158
|
*/
|
|
57
|
-
function
|
|
159
|
+
function ListItemImpl({
|
|
58
160
|
layout = 'Vertical',
|
|
59
161
|
title = 'Title',
|
|
60
162
|
supportText = 'Support Text',
|
|
@@ -63,7 +165,7 @@ function ListItem({
|
|
|
63
165
|
supportSlot,
|
|
64
166
|
endSlot,
|
|
65
167
|
navArrow = true,
|
|
66
|
-
modes =
|
|
168
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
67
169
|
onPress,
|
|
68
170
|
style,
|
|
69
171
|
contentStyle,
|
|
@@ -73,89 +175,21 @@ function ListItem({
|
|
|
73
175
|
webAccessibilityProps,
|
|
74
176
|
...rest
|
|
75
177
|
}) {
|
|
76
|
-
const
|
|
77
|
-
...modes,
|
|
78
|
-
"Context": "ListItem"
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// Resolve container spacing tokens
|
|
82
|
-
const gap = (0, _figmaVariablesResolver.getVariableByName)('listItem/gap', resolvedModes) ?? 8;
|
|
83
|
-
const paddingTop = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/top', resolvedModes) ?? 0;
|
|
84
|
-
const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/bottom', resolvedModes) ?? 0;
|
|
85
|
-
const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/left', resolvedModes) ?? 0;
|
|
86
|
-
const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/right', resolvedModes) ?? 0;
|
|
87
|
-
const textWrapGap = (0, _figmaVariablesResolver.getVariableByName)('listItem/text wrap', resolvedModes) ?? 0;
|
|
178
|
+
const tokens = (0, _react.useMemo)(() => resolveListItemTokens(modes), [modes]);
|
|
88
179
|
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const titleFontWeight = typeof titleFontWeightRaw === 'number' ? titleFontWeightRaw.toString() : titleFontWeightRaw;
|
|
96
|
-
|
|
97
|
-
// Support text typography (used in both layouts)
|
|
98
|
-
const supportColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/color', resolvedModes) || '#1f1a14';
|
|
99
|
-
const supportFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontSize', resolvedModes) || 12;
|
|
100
|
-
const supportLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/lineHeight', resolvedModes) || 14;
|
|
101
|
-
const supportFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontFamily', resolvedModes) || 'System';
|
|
102
|
-
const supportFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontWeight', resolvedModes) || 500;
|
|
103
|
-
const supportFontWeight = typeof supportFontWeightRaw === 'number' ? supportFontWeightRaw.toString() : supportFontWeightRaw;
|
|
104
|
-
const baseContainerStyle = {
|
|
105
|
-
paddingTop,
|
|
106
|
-
paddingBottom,
|
|
107
|
-
paddingLeft,
|
|
108
|
-
paddingRight
|
|
109
|
-
};
|
|
110
|
-
const sharedLayoutStyle = layout === 'Horizontal' ? {
|
|
111
|
-
flexDirection: 'row',
|
|
112
|
-
alignItems: 'center',
|
|
113
|
-
gap
|
|
114
|
-
} : {
|
|
115
|
-
flexDirection: 'column',
|
|
116
|
-
alignItems: 'center',
|
|
117
|
-
gap
|
|
118
|
-
};
|
|
119
|
-
const innerContentBaseStyle = {
|
|
120
|
-
flexDirection: 'row',
|
|
121
|
-
alignItems: 'center',
|
|
122
|
-
flex: 1,
|
|
123
|
-
gap
|
|
124
|
-
};
|
|
125
|
-
const verticalContentBaseStyle = {
|
|
126
|
-
alignItems: 'center',
|
|
127
|
-
gap
|
|
128
|
-
};
|
|
129
|
-
const titleTextStyle = {
|
|
130
|
-
color: titleColor,
|
|
131
|
-
fontSize: titleFontSize,
|
|
132
|
-
lineHeight: titleLineHeight,
|
|
133
|
-
fontFamily: titleFontFamily,
|
|
134
|
-
fontWeight: titleFontWeight
|
|
135
|
-
};
|
|
136
|
-
const supportTextStyle = {
|
|
137
|
-
color: supportColor,
|
|
138
|
-
fontSize: supportFontSize,
|
|
139
|
-
lineHeight: supportLineHeight,
|
|
140
|
-
fontFamily: supportFontFamily,
|
|
141
|
-
fontWeight: supportFontWeight
|
|
142
|
-
};
|
|
143
|
-
const trailingWrapperStyle = (0, _react.useMemo)(() => ({
|
|
144
|
-
marginLeft: gap / 2
|
|
145
|
-
}), [gap]);
|
|
180
|
+
// Mirror user-supplied handlers in a ref so our wrappers can stay
|
|
181
|
+
// referentially stable. Without this, every parent re-render hands
|
|
182
|
+
// Pressable a fresh function identity for each event prop.
|
|
183
|
+
const userHandlersRef = (0, _react.useRef)({});
|
|
184
|
+
userHandlersRef.current.onPressIn = rest?.onPressIn;
|
|
185
|
+
userHandlersRef.current.onPressOut = rest?.onPressOut;
|
|
146
186
|
|
|
147
187
|
// Generate default accessibility label from title and supportText if not provided
|
|
148
188
|
const defaultAccessibilityLabel = accessibilityLabel || (layout === 'Horizontal' ? `${title}${showSupportText && supportText ? `, ${supportText}` : ''}` : supportText);
|
|
149
189
|
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
onPress,
|
|
154
|
-
disabled: false,
|
|
155
|
-
accessibilityLabel: defaultAccessibilityLabel,
|
|
156
|
-
webAccessibilityProps
|
|
157
|
-
});
|
|
158
|
-
const webPropsVertical = (0, _webPlatformUtils.usePressableWebSupport)({
|
|
190
|
+
// Single web-platform support payload — the previous version called
|
|
191
|
+
// `usePressableWebSupport` twice with identical args, which was dead work.
|
|
192
|
+
const webProps = (0, _webPlatformUtils.usePressableWebSupport)({
|
|
159
193
|
restProps: rest,
|
|
160
194
|
onPress,
|
|
161
195
|
disabled: false,
|
|
@@ -163,60 +197,79 @@ function ListItem({
|
|
|
163
197
|
webAccessibilityProps
|
|
164
198
|
});
|
|
165
199
|
|
|
166
|
-
// Process leading slot to pass modes to children
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
// Process supportSlot to pass modes to children
|
|
176
|
-
const processedSupportSlot = (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(supportSlot), resolvedModes);
|
|
177
|
-
// Extract single element if array has one element, otherwise use array
|
|
178
|
-
return processedSupportSlot.length === 1 ? processedSupportSlot[0] : processedSupportSlot;
|
|
200
|
+
// Process leading slot to pass modes to children. Memoized on
|
|
201
|
+
// (leading, resolvedModes) so a parent re-render doesn't re-walk the tree.
|
|
202
|
+
const leadingElement = (0, _react.useMemo)(() => {
|
|
203
|
+
const processed = leading ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(leading), tokens.resolvedModes) : [];
|
|
204
|
+
if (processed.length === 0) {
|
|
205
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
|
|
206
|
+
modes: tokens.resolvedModes,
|
|
207
|
+
accessibilityLabel: undefined
|
|
208
|
+
});
|
|
179
209
|
}
|
|
210
|
+
return processed.length === 1 ? processed[0] : processed;
|
|
211
|
+
}, [leading, tokens.resolvedModes]);
|
|
212
|
+
const processedSupportSlot = (0, _react.useMemo)(() => {
|
|
213
|
+
if (!supportSlot) return null;
|
|
214
|
+
const processed = (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(supportSlot), tokens.resolvedModes);
|
|
215
|
+
return processed.length === 1 ? processed[0] : processed;
|
|
216
|
+
}, [supportSlot, tokens.resolvedModes]);
|
|
217
|
+
const processedEndSlot = (0, _react.useMemo)(() => {
|
|
218
|
+
if (!endSlot) return null;
|
|
219
|
+
const processed = (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(endSlot), tokens.resolvedModes, END_SLOT_FORCED_MODES);
|
|
220
|
+
return processed.length === 1 ? processed[0] : processed;
|
|
221
|
+
}, [endSlot, tokens.resolvedModes]);
|
|
222
|
+
const renderSupportContent = () => {
|
|
223
|
+
if (processedSupportSlot) return processedSupportSlot;
|
|
180
224
|
|
|
181
|
-
// Default support text
|
|
182
|
-
// - vertical layout main text
|
|
183
|
-
// - horizontal layout secondary line)
|
|
225
|
+
// Default support text:
|
|
226
|
+
// - vertical layout: main text (line-broken on spaces)
|
|
227
|
+
// - horizontal layout: secondary line (clamped to 2 lines)
|
|
184
228
|
const displayText = layout === 'Vertical' ? supportText.replace(/ /g, '\n') : supportText;
|
|
185
229
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
186
|
-
style:
|
|
187
|
-
textAlign: 'center'
|
|
188
|
-
} : undefined],
|
|
230
|
+
style: layout === 'Vertical' ? [tokens.supportTextStyle, verticalSupportTextOverride] : tokens.supportTextStyle,
|
|
189
231
|
numberOfLines: layout === 'Horizontal' ? 2 : undefined,
|
|
190
232
|
children: displayText
|
|
191
233
|
});
|
|
192
234
|
};
|
|
235
|
+
|
|
236
|
+
// Stable handlers — user-supplied callbacks are forwarded via ref.
|
|
237
|
+
const handlePressIn = (0, _react.useCallback)(e => {
|
|
238
|
+
userHandlersRef.current.onPressIn?.(e);
|
|
239
|
+
}, []);
|
|
240
|
+
const handlePressOut = (0, _react.useCallback)(e => {
|
|
241
|
+
userHandlersRef.current.onPressOut?.(e);
|
|
242
|
+
}, []);
|
|
243
|
+
const horizontalContainerStyleArray = (0, _react.useMemo)(() => [tokens.baseContainerStyle, tokens.horizontalLayoutStyle, style], [tokens.baseContainerStyle, tokens.horizontalLayoutStyle, style]);
|
|
244
|
+
const verticalContainerStyleArray = (0, _react.useMemo)(() => [tokens.baseContainerStyle, tokens.verticalLayoutStyle, style], [tokens.baseContainerStyle, tokens.verticalLayoutStyle, style]);
|
|
245
|
+
const horizontalPressableStyle = (0, _react.useCallback)(({
|
|
246
|
+
pressed
|
|
247
|
+
}) => [tokens.baseContainerStyle, tokens.horizontalLayoutStyle, pressed ? pressedOverlayStyle : null, style], [tokens.baseContainerStyle, tokens.horizontalLayoutStyle, style]);
|
|
248
|
+
const verticalPressableStyle = (0, _react.useCallback)(({
|
|
249
|
+
pressed
|
|
250
|
+
}) => [tokens.baseContainerStyle, tokens.verticalLayoutStyle, pressed ? pressedOverlayStyle : null, style], [tokens.baseContainerStyle, tokens.verticalLayoutStyle, style]);
|
|
251
|
+
const innerContentStyleArray = (0, _react.useMemo)(() => [tokens.innerContentBaseStyle, contentStyle], [tokens.innerContentBaseStyle, contentStyle]);
|
|
252
|
+
const verticalContentStyleArray = (0, _react.useMemo)(() => [tokens.verticalContentBaseStyle, contentStyle], [tokens.verticalContentBaseStyle, contentStyle]);
|
|
193
253
|
if (layout === 'Horizontal') {
|
|
194
|
-
// Process endSlot to pass modes to children
|
|
195
|
-
// Force Context: 'ListItem' - this value can never be overridden by external modes
|
|
196
|
-
const processedEndSlot = endSlot ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(endSlot), resolvedModes, {
|
|
197
|
-
"Context": 'ListItem'
|
|
198
|
-
}) : [];
|
|
199
|
-
// Extract single element if array has one element, otherwise use array
|
|
200
|
-
const trailingContent = processedEndSlot.length > 0 ? processedEndSlot.length === 1 ? processedEndSlot[0] : processedEndSlot : null;
|
|
201
254
|
const innerContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
202
|
-
style:
|
|
255
|
+
style: innerContentStyleArray,
|
|
203
256
|
children: [leadingElement, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
204
257
|
style: {
|
|
205
258
|
flex: 1,
|
|
206
259
|
minWidth: 1,
|
|
207
|
-
gap: textWrapGap
|
|
260
|
+
gap: tokens.textWrapGap
|
|
208
261
|
},
|
|
209
262
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
210
|
-
style: titleTextStyle,
|
|
263
|
+
style: tokens.titleTextStyle,
|
|
211
264
|
numberOfLines: 1,
|
|
212
265
|
children: title
|
|
213
266
|
}), showSupportText && renderSupportContent()]
|
|
214
|
-
}),
|
|
215
|
-
style: trailingWrapperStyle,
|
|
216
|
-
children:
|
|
267
|
+
}), processedEndSlot ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
268
|
+
style: tokens.trailingWrapperStyle,
|
|
269
|
+
children: processedEndSlot
|
|
217
270
|
}) : null, navArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavArrow.default, {
|
|
218
271
|
direction: "Forward",
|
|
219
|
-
modes: resolvedModes
|
|
272
|
+
modes: tokens.resolvedModes
|
|
220
273
|
})]
|
|
221
274
|
});
|
|
222
275
|
if (onPress) {
|
|
@@ -224,16 +277,13 @@ function ListItem({
|
|
|
224
277
|
accessibilityRole: "button",
|
|
225
278
|
accessibilityLabel: undefined,
|
|
226
279
|
accessibilityHint: accessibilityHint,
|
|
227
|
-
accessibilityState:
|
|
228
|
-
...accessibilityState
|
|
229
|
-
},
|
|
280
|
+
accessibilityState: accessibilityState,
|
|
230
281
|
onPress: onPress,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
...webPropsHorizontal,
|
|
282
|
+
onPressIn: handlePressIn,
|
|
283
|
+
onPressOut: handlePressOut,
|
|
284
|
+
unstable_pressDelay: PRESS_DELAY,
|
|
285
|
+
style: horizontalPressableStyle,
|
|
286
|
+
...webProps,
|
|
237
287
|
children: innerContent
|
|
238
288
|
});
|
|
239
289
|
}
|
|
@@ -241,15 +291,15 @@ function ListItem({
|
|
|
241
291
|
accessibilityRole: undefined,
|
|
242
292
|
accessibilityLabel: undefined,
|
|
243
293
|
accessibilityHint: accessibilityHint,
|
|
244
|
-
style:
|
|
294
|
+
style: horizontalContainerStyleArray,
|
|
245
295
|
...rest,
|
|
246
296
|
children: innerContent
|
|
247
297
|
});
|
|
248
298
|
}
|
|
249
299
|
|
|
250
|
-
// Vertical layout
|
|
300
|
+
// Vertical layout — icon on top, support text/slot below
|
|
251
301
|
const verticalContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
252
|
-
style:
|
|
302
|
+
style: verticalContentStyleArray,
|
|
253
303
|
children: [leadingElement, renderSupportContent()]
|
|
254
304
|
});
|
|
255
305
|
if (onPress) {
|
|
@@ -257,16 +307,13 @@ function ListItem({
|
|
|
257
307
|
accessibilityRole: "button",
|
|
258
308
|
accessibilityLabel: undefined,
|
|
259
309
|
accessibilityHint: accessibilityHint,
|
|
260
|
-
accessibilityState:
|
|
261
|
-
...accessibilityState
|
|
262
|
-
},
|
|
310
|
+
accessibilityState: accessibilityState,
|
|
263
311
|
onPress: onPress,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
...webPropsVertical,
|
|
312
|
+
onPressIn: handlePressIn,
|
|
313
|
+
onPressOut: handlePressOut,
|
|
314
|
+
unstable_pressDelay: PRESS_DELAY,
|
|
315
|
+
style: verticalPressableStyle,
|
|
316
|
+
...webProps,
|
|
270
317
|
children: verticalContent
|
|
271
318
|
});
|
|
272
319
|
}
|
|
@@ -274,9 +321,10 @@ function ListItem({
|
|
|
274
321
|
accessibilityRole: undefined,
|
|
275
322
|
accessibilityLabel: undefined,
|
|
276
323
|
accessibilityHint: accessibilityHint,
|
|
277
|
-
style:
|
|
324
|
+
style: verticalContainerStyleArray,
|
|
278
325
|
...rest,
|
|
279
326
|
children: verticalContent
|
|
280
327
|
});
|
|
281
328
|
}
|
|
329
|
+
const ListItem = /*#__PURE__*/_react.default.memo(ListItemImpl);
|
|
282
330
|
var _default = exports.default = ListItem;
|
|
@@ -13,12 +13,12 @@ exports.default = void 0;
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactNative = require("react-native");
|
|
15
15
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
16
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
19
|
/**
|
|
19
20
|
* Context to share 'modes' with child components.
|
|
20
|
-
*/
|
|
21
|
-
const MediaCardContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
21
|
+
*/const MediaCardContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
22
22
|
/**
|
|
23
23
|
* MediaCard component implementation from Figma node 1241:4140.
|
|
24
24
|
*
|
|
@@ -27,7 +27,7 @@ const MediaCardContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
|
27
27
|
function MediaCard({
|
|
28
28
|
media,
|
|
29
29
|
children,
|
|
30
|
-
modes =
|
|
30
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
31
31
|
style
|
|
32
32
|
}) {
|
|
33
33
|
// Container Tokens
|
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
10
11
|
var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -49,7 +50,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
49
50
|
function MerchantProfile({
|
|
50
51
|
title = 'Uber India Systems Private Limited',
|
|
51
52
|
subtitle = 'UPI ID: uberindia@ybl',
|
|
52
|
-
modes =
|
|
53
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
53
54
|
style,
|
|
54
55
|
avatarProps,
|
|
55
56
|
accessibilityLabel
|
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
13
|
// Map of common ISO 4217 currency codes to display symbols
|
|
@@ -60,7 +61,7 @@ function MoneyValue({
|
|
|
60
61
|
negative,
|
|
61
62
|
focused = false,
|
|
62
63
|
hidden = false,
|
|
63
|
-
modes =
|
|
64
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
64
65
|
style,
|
|
65
66
|
valueStyle,
|
|
66
67
|
currencyStyle,
|