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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
|
|
7
|
+
## [0.0.64] - 2026-04-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`Section.Bento` — expandable grid:** New built-in expand/collapse UX. Pass `collapsedCount` (default `4`) plus the full set of cells in `navSlot`, and `Section.Bento` auto-injects a toggle cell, owns the `expanded` boolean (uncontrolled), and animates extra cells in/out with a staggered fade cascade. Supports controlled mode via `expanded` + `onExpandedChange`, customizable labels (`toggleMoreLabel`, `toggleLessLabel`) and icons (`toggleMoreIcon`, `toggleLessIcon`), and a `renderToggle` escape hatch for non-`ListItem` toggles. The toggle is only injected when `navSlot.length > collapsedCount`, so existing usage at or below the threshold renders unchanged.
|
|
12
|
+
- **Drawer drop-shadow tokens:** New design tokens `drawer/shadow/primary/{offsetX,offsetY,blur,color}` and `drawer/shadow/secondary/{offsetX,color}` resolve a layered Figma drop shadow. Web stacks both shadows via `boxShadow`; iOS applies the primary shadow natively; Android uses elevation.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **`SlotGrid` sizing — first-row-anchored:** `SlotGrid` (used by `Section.Bento`) now measures only the first row's cells once on mount and applies that max width to every cell in every row. Previously every cell was measured every render, which caused width jumps when the cell count changed (expand/collapse) and could cancel `Animated.View` `entering` cascades by re-rendering them in the same React batch as the mount. Result: stable cell width across toggles, no layout shift, animations play uninterrupted. Edge-flush behavior (first cell flush-left, last cell flush-right) is preserved via `justify-content: space-between`.
|
|
17
|
+
- **`Section.Bento` height transition:** The section grows and shrinks via an explicit measured-height spring (`overflow: 'hidden'` clip + `withSpring`) instead of `LinearTransition`. Cells inside are never resized during the animation — only the container's clip rectangle interpolates.
|
|
18
|
+
- **Drawer gesture policy:** Pan now requires a 10px vertical drag to activate (`activeOffsetY([-10, 10])`) and surrenders the gesture entirely after ~16px of horizontal movement (`failOffsetX([-16, 16])`). A defense-in-depth check in `onUpdate` skips Y translation on frames where horizontal motion dominates. This lets horizontal children (carousels, sliders, horizontal `FlatList`s) inside the drawer scroll cleanly without the sheet also translating.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Drawer iOS shadow clipping:** The sheet now renders content inside an inner clip layer so `overflow: 'hidden'` no longer trims the outer view's drop shadow on iOS.
|
|
23
|
+
|
|
24
|
+
### Accessibility
|
|
25
|
+
|
|
26
|
+
- All new `Section.Bento` animations honor the OS reduce-motion setting via Reanimated's `ReduceMotion.System`.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## [0.0.63] - 2026-04-20
|
|
31
|
+
|
|
32
|
+
### Performance
|
|
33
|
+
|
|
34
|
+
- **Pressable / scroll flicker (native):** `Button`, `Section` (header), `ListItem`, `Avatar`, `IconCapsule`, `NavArrow`, `UpiHandle`, `IconButton`, and `BottomNavItem` no longer mirror transient press state in React. Pressed visuals use `Pressable`’s `style` callback (host-view updates). On iOS, `unstable_pressDelay={130}` reduces accidental “pressed” flashes when a parent `ScrollView` cancels the gesture.
|
|
35
|
+
- **Token resolution:** `getVariableByName` caches serialized mode keys per `modes` object via a `WeakMap` in `serializeModes`, avoiding repeated sort/join work when the same `modes` reference is used for many lookups in one render.
|
|
36
|
+
- **Stable default modes:** Shared frozen `EMPTY_MODES` from `src/utils/react-utils.ts` replaces inline `modes = {}` defaults across components so default props do not allocate a new object every render (better `React.memo` hits and resolver cache locality).
|
|
37
|
+
- **Memoization:** Heavy token reads are batched in `useMemo` where refactored; several interactive components are wrapped in `React.memo`.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- Intermittent visual flicker on interactive rows (e.g. People / Setup style cards) during vertical scroll on native devices.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- **Breaking (none intended):** Public prop types and default behavior are preserved. Some components now ignore unused `accessibilityLabel` props on inner nodes (documented via `_accessibilityLabel` where applicable); screen-reader behavior should match prior intentional `accessibilityLabel={undefined}` usage.
|
|
46
|
+
|
|
47
|
+
### Removed
|
|
48
|
+
|
|
49
|
+
- Dead code: duplicate `usePressableWebSupport` usage in `ListItem`; unused computed labels in a few components; redundant pressed-style paths in `IconButton`.
|
|
50
|
+
|
|
51
|
+
### Repository / tooling
|
|
52
|
+
|
|
53
|
+
- Storybook and example app layout updates; addon and config changes as reflected in the repo.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## [0.0.62] and earlier
|
|
58
|
+
|
|
59
|
+
See git history for releases prior to this changelog.
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
10
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
11
|
var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
|
|
12
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
/**
|
|
@@ -20,7 +21,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
20
21
|
function ActionTile({
|
|
21
22
|
label = 'Cards',
|
|
22
23
|
icon,
|
|
23
|
-
modes: propModes =
|
|
24
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
24
25
|
style,
|
|
25
26
|
onPress
|
|
26
27
|
}) {
|
|
@@ -10,6 +10,7 @@ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resol
|
|
|
10
10
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
11
|
var _MoneyValue = _interopRequireDefault(require("../MoneyValue/MoneyValue"));
|
|
12
12
|
var _NoteInput = _interopRequireDefault(require("../NoteInput/NoteInput"));
|
|
13
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
/**
|
|
@@ -20,7 +21,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
20
21
|
function AmountInput({
|
|
21
22
|
moneyValueSlot,
|
|
22
23
|
noteInputSlot,
|
|
23
|
-
modes: propModes =
|
|
24
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
24
25
|
style
|
|
25
26
|
}) {
|
|
26
27
|
const {
|
|
@@ -4,22 +4,104 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
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
|
-
function
|
|
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
|
const avatarImage = require('./31595e70c4181263f9971590224b12934b280c9b.png');
|
|
13
14
|
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Module-scope constants — never re-allocated per render.
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
const IS_WEB = _reactNative.Platform.OS === 'web';
|
|
20
|
+
const IS_IOS = _reactNative.Platform.OS === 'ios';
|
|
21
|
+
const PRESS_DELAY = IS_IOS ? 130 : 0;
|
|
22
|
+
|
|
23
|
+
// Pressed visual is applied through Pressable's style callback so the host
|
|
24
|
+
// view updates without scheduling a React render.
|
|
25
|
+
const pressedOverlayStyle = {
|
|
26
|
+
transform: [{
|
|
27
|
+
scale: 0.98
|
|
28
|
+
}]
|
|
29
|
+
};
|
|
30
|
+
const focusOverlayStyle = {
|
|
31
|
+
borderColor: '#222',
|
|
32
|
+
borderWidth: 1
|
|
33
|
+
};
|
|
34
|
+
const imageContainerStyle = {
|
|
35
|
+
width: '100%',
|
|
36
|
+
height: '100%',
|
|
37
|
+
overflow: 'hidden'
|
|
38
|
+
};
|
|
39
|
+
const imageBaseStyle = {
|
|
40
|
+
width: '100%',
|
|
41
|
+
height: '100%'
|
|
42
|
+
};
|
|
43
|
+
const monogramContainerStyle = {
|
|
44
|
+
width: '100%',
|
|
45
|
+
height: '100%',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
paddingVertical: 7,
|
|
49
|
+
paddingHorizontal: 5
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// Token resolution — collapsed into one useMemo per (modes, style) tuple.
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
function resolveAvatarTokens(modes, isMonogram) {
|
|
57
|
+
const size = (0, _figmaVariablesResolver.getVariableByName)('avatar/size', modes) || 29;
|
|
58
|
+
const radiusRaw = (0, _figmaVariablesResolver.getVariableByName)('avatar/radius', modes) || 9999;
|
|
59
|
+
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('avatar/background', modes) || '#dbcfff';
|
|
60
|
+
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('avatar/border/color', modes) || 'rgba(255,255,255,0)';
|
|
61
|
+
const borderSize = (0, _figmaVariablesResolver.getVariableByName)('avatar/border/size', modes) || 1;
|
|
62
|
+
const labelColor = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/color', modes) || '#5c00b5';
|
|
63
|
+
const labelFontSize = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/fontSize', modes) || 12;
|
|
64
|
+
const labelLineHeight = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/lineHeight', modes) || 14;
|
|
65
|
+
const labelFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/fontWeight', modes) || 500;
|
|
66
|
+
const labelFontWeight = typeof labelFontWeightRaw === 'number' ? labelFontWeightRaw.toString() : labelFontWeightRaw;
|
|
67
|
+
const labelFontFamily = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/fontFamily', modes) || 'Inter';
|
|
68
|
+
|
|
69
|
+
// 9999 is the design-token sentinel for "perfect circle"
|
|
70
|
+
const borderRadius = radiusRaw === 9999 ? size / 2 : radiusRaw;
|
|
71
|
+
return {
|
|
72
|
+
containerStyle: {
|
|
73
|
+
width: size,
|
|
74
|
+
height: size,
|
|
75
|
+
borderRadius,
|
|
76
|
+
borderWidth: borderSize,
|
|
77
|
+
borderColor: borderColor,
|
|
78
|
+
overflow: 'hidden',
|
|
79
|
+
...(isMonogram ? {
|
|
80
|
+
backgroundColor: backgroundColor
|
|
81
|
+
} : {})
|
|
82
|
+
},
|
|
83
|
+
imageContainerStyle: {
|
|
84
|
+
...imageContainerStyle,
|
|
85
|
+
borderRadius
|
|
86
|
+
},
|
|
87
|
+
imageStyle: {
|
|
88
|
+
...imageBaseStyle,
|
|
89
|
+
borderRadius
|
|
90
|
+
},
|
|
91
|
+
monogramTextStyle: {
|
|
92
|
+
fontSize: labelFontSize,
|
|
93
|
+
lineHeight: labelLineHeight,
|
|
94
|
+
fontWeight: labelFontWeight,
|
|
95
|
+
fontFamily: labelFontFamily,
|
|
96
|
+
color: labelColor,
|
|
97
|
+
textAlign: 'center'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
14
102
|
/**
|
|
15
103
|
* Avatar component that displays either an image or a monogram.
|
|
16
|
-
*
|
|
17
|
-
* This component supports two styles:
|
|
18
|
-
* - Image: Displays a user's profile picture
|
|
19
|
-
* - Monogram: Displays user initials in a circular background
|
|
20
|
-
*
|
|
21
|
-
* All styling values are resolved from Figma design tokens using the provided modes.
|
|
22
|
-
*
|
|
104
|
+
*
|
|
23
105
|
* @component
|
|
24
106
|
* @param {Object} props - Component props
|
|
25
107
|
* @param {string} [props.monogram="MS"] - The initials to display when style is "Monogram"
|
|
@@ -27,182 +109,122 @@ const avatarImage = require('./31595e70c4181263f9971590224b12934b280c9b.png');
|
|
|
27
109
|
* @param {Object} [props.modes={}] - Mode configuration for design tokens (e.g., {"Avatar Size": "M"})
|
|
28
110
|
* @param {string} [props.imageSource] - Optional image source for Image style (defaults to built-in image)
|
|
29
111
|
* @param {string} [props.accessibilityLabel] - Accessibility label for screen readers. If not provided, uses monogram or "User avatar"
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* ```
|
|
112
|
+
*
|
|
113
|
+
* Performance notes:
|
|
114
|
+
* - All token reads are folded into a single `useMemo([modes, isMonogram])`.
|
|
115
|
+
* - Press visual goes through Pressable's `({ pressed })` style callback so
|
|
116
|
+
* a scroll-cancelled touch never schedules a React render. iOS gets
|
|
117
|
+
* `unstable_pressDelay={130}` for additional safety inside scrollables.
|
|
118
|
+
* - Focus state stays in React (it's a sustained visual) but the setter is
|
|
119
|
+
* gated to web only, where focus events actually fire.
|
|
39
120
|
*/
|
|
40
121
|
|
|
41
122
|
function Avatar({
|
|
42
|
-
monogram =
|
|
43
|
-
style =
|
|
44
|
-
modes =
|
|
123
|
+
monogram = 'MS',
|
|
124
|
+
style = 'Image',
|
|
125
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
45
126
|
imageSource,
|
|
46
|
-
accessibilityLabel
|
|
127
|
+
// accessibilityLabel is accepted on the type for API back-compat but the
|
|
128
|
+
// component intentionally renders `accessibilityLabel={undefined}` on the
|
|
129
|
+
// wrapper (the inner Text/Image carry the label instead).
|
|
130
|
+
accessibilityLabel: _accessibilityLabel,
|
|
47
131
|
...rest
|
|
48
132
|
}) {
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
const radius = (0, _figmaVariablesResolver.getVariableByName)('avatar/radius', modes) || 9999;
|
|
52
|
-
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('avatar/background', modes) || '#dbcfff';
|
|
53
|
-
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('avatar/border/color', modes) || 'rgba(255,255,255,0)';
|
|
54
|
-
const borderSize = (0, _figmaVariablesResolver.getVariableByName)('avatar/border/size', modes) || 1;
|
|
55
|
-
const labelColor = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/color', modes) || '#5c00b5';
|
|
56
|
-
const labelFontSize = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/fontSize', modes) || 12;
|
|
57
|
-
const labelLineHeight = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/lineHeight', modes) || 14;
|
|
58
|
-
const labelFontWeight = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/fontWeight', modes) || 500;
|
|
59
|
-
const labelFontFamily = (0, _figmaVariablesResolver.getVariableByName)('avatar/label/fontFamily', modes) || 'Inter';
|
|
133
|
+
const isMonogram = style === 'Monogram';
|
|
134
|
+
const tokens = (0, _react.useMemo)(() => resolveAvatarTokens(modes, isMonogram), [modes, isMonogram]);
|
|
60
135
|
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const containerStyle = {
|
|
66
|
-
width: size,
|
|
67
|
-
height: size,
|
|
68
|
-
borderRadius: borderRadius,
|
|
69
|
-
borderWidth: borderSize,
|
|
70
|
-
borderColor: borderColor,
|
|
71
|
-
overflow: 'hidden',
|
|
72
|
-
...(style === 'Monogram' ? {
|
|
73
|
-
backgroundColor: backgroundColor
|
|
74
|
-
} : {})
|
|
75
|
-
};
|
|
136
|
+
// Focus is a sustained visible state — keep mirroring on web; gate the
|
|
137
|
+
// setter so it never fires on native (where focus events don't fire on
|
|
138
|
+
// these elements anyway).
|
|
139
|
+
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
76
140
|
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
141
|
+
// Mirror user handlers in a ref so our wrappers can stay referentially
|
|
142
|
+
// stable across renders.
|
|
143
|
+
const userHandlersRef = (0, _react.useRef)({});
|
|
144
|
+
userHandlersRef.current.onPressIn = rest?.onPressIn;
|
|
145
|
+
userHandlersRef.current.onPressOut = rest?.onPressOut;
|
|
146
|
+
userHandlersRef.current.onFocus = rest?.onFocus;
|
|
147
|
+
userHandlersRef.current.onBlur = rest?.onBlur;
|
|
148
|
+
const handlePressIn = (0, _react.useCallback)(e => {
|
|
149
|
+
userHandlersRef.current.onPressIn?.(e);
|
|
150
|
+
}, []);
|
|
151
|
+
const handlePressOut = (0, _react.useCallback)(e => {
|
|
152
|
+
userHandlersRef.current.onPressOut?.(e);
|
|
153
|
+
}, []);
|
|
154
|
+
const handleFocus = (0, _react.useCallback)(e => {
|
|
155
|
+
if (IS_WEB) setIsFocused(true);
|
|
156
|
+
userHandlersRef.current.onFocus?.(e);
|
|
157
|
+
}, []);
|
|
158
|
+
const handleBlur = (0, _react.useCallback)(e => {
|
|
159
|
+
if (IS_WEB) setIsFocused(false);
|
|
160
|
+
userHandlersRef.current.onBlur?.(e);
|
|
161
|
+
}, []);
|
|
162
|
+
const pressableStyle = (0, _react.useCallback)(({
|
|
163
|
+
pressed
|
|
164
|
+
}) => [tokens.containerStyle, pressed ? pressedOverlayStyle : null, isFocused ? focusOverlayStyle : null], [tokens.containerStyle, isFocused]);
|
|
165
|
+
const staticContainerStyle = (0, _react.useMemo)(() => [tokens.containerStyle, isFocused ? focusOverlayStyle : null], [tokens.containerStyle, isFocused]);
|
|
91
166
|
|
|
92
|
-
//
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
textAlign: 'center'
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// Generate default accessibility label
|
|
113
|
-
const defaultAccessibilityLabel = accessibilityLabel || (style === "Monogram" ? `Avatar with initials ${monogram}` : "User avatar");
|
|
114
|
-
// Interaction placeholders for press/focus
|
|
115
|
-
const [isPressed, setIsPressed] = _react.default.useState(false);
|
|
116
|
-
const [isFocused, setIsFocused] = _react.default.useState(false);
|
|
117
|
-
const pressedStyle = isPressed ? {
|
|
118
|
-
transform: [{
|
|
119
|
-
scale: 0.98
|
|
120
|
-
}]
|
|
121
|
-
} : null;
|
|
122
|
-
const focusStyle = isFocused ? {
|
|
123
|
-
borderColor: '#222',
|
|
124
|
-
borderWidth: 1
|
|
125
|
-
} : null;
|
|
126
|
-
if (style === "Monogram") {
|
|
127
|
-
const Wrapper = rest?.onPress ? _reactNative.Pressable : _reactNative.View;
|
|
128
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
|
|
129
|
-
style: [containerStyle, pressedStyle, focusStyle],
|
|
167
|
+
// The inner content varies; everything else (wrapper, handlers, style) is shared.
|
|
168
|
+
const innerContent = isMonogram ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
169
|
+
style: monogramContainerStyle,
|
|
170
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
171
|
+
style: tokens.monogramTextStyle,
|
|
172
|
+
accessibilityElementsHidden: true,
|
|
173
|
+
importantForAccessibility: "no",
|
|
174
|
+
children: monogram
|
|
175
|
+
})
|
|
176
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageContent, {
|
|
177
|
+
tokens: tokens,
|
|
178
|
+
imageSource: imageSource
|
|
179
|
+
});
|
|
180
|
+
const isPressable = !!rest?.onPress;
|
|
181
|
+
if (isPressable) {
|
|
182
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
183
|
+
style: pressableStyle,
|
|
130
184
|
accessibilityRole: "image",
|
|
131
185
|
accessibilityLabel: undefined,
|
|
132
|
-
onPressIn:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
setIsPressed(false);
|
|
138
|
-
rest?.onPressOut?.(e);
|
|
139
|
-
},
|
|
140
|
-
onFocus: e => {
|
|
141
|
-
setIsFocused(true);
|
|
142
|
-
rest?.onFocus?.(e);
|
|
143
|
-
},
|
|
144
|
-
onBlur: e => {
|
|
145
|
-
setIsFocused(false);
|
|
146
|
-
rest?.onBlur?.(e);
|
|
147
|
-
},
|
|
186
|
+
onPressIn: handlePressIn,
|
|
187
|
+
onPressOut: handlePressOut,
|
|
188
|
+
onFocus: handleFocus,
|
|
189
|
+
onBlur: handleBlur,
|
|
190
|
+
unstable_pressDelay: PRESS_DELAY,
|
|
148
191
|
...rest,
|
|
149
|
-
children:
|
|
150
|
-
style: monogramContainerStyle,
|
|
151
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
152
|
-
style: monogramTextStyle,
|
|
153
|
-
accessibilityElementsHidden: true,
|
|
154
|
-
importantForAccessibility: "no",
|
|
155
|
-
children: monogram
|
|
156
|
-
})
|
|
157
|
-
})
|
|
192
|
+
children: innerContent
|
|
158
193
|
});
|
|
159
194
|
}
|
|
195
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
196
|
+
style: staticContainerStyle,
|
|
197
|
+
accessibilityRole: "image",
|
|
198
|
+
accessibilityLabel: undefined,
|
|
199
|
+
...rest,
|
|
200
|
+
children: innerContent
|
|
201
|
+
});
|
|
202
|
+
}
|
|
160
203
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
204
|
+
// Memoize the image normalization so a string URL that doesn't change
|
|
205
|
+
// doesn't keep producing a new `{ uri }` object every render.
|
|
206
|
+
function ImageContent({
|
|
207
|
+
tokens,
|
|
208
|
+
imageSource
|
|
209
|
+
}) {
|
|
210
|
+
const normalizedImageSource = (0, _react.useMemo)(() => {
|
|
164
211
|
if (!imageSource) return avatarImage;
|
|
165
212
|
if (typeof imageSource === 'string') {
|
|
166
|
-
// If it's a string, treat it as a URL
|
|
167
213
|
return {
|
|
168
214
|
uri: imageSource
|
|
169
215
|
};
|
|
170
216
|
}
|
|
171
|
-
// Otherwise, use it as-is (could be require() result or { uri: ... } object)
|
|
172
217
|
return imageSource;
|
|
173
218
|
}, [imageSource]);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
onPressOut: e => {
|
|
184
|
-
setIsPressed(false);
|
|
185
|
-
rest?.onPressOut?.(e);
|
|
186
|
-
},
|
|
187
|
-
onFocus: e => {
|
|
188
|
-
setIsFocused(true);
|
|
189
|
-
rest?.onFocus?.(e);
|
|
190
|
-
},
|
|
191
|
-
onBlur: e => {
|
|
192
|
-
setIsFocused(false);
|
|
193
|
-
rest?.onBlur?.(e);
|
|
194
|
-
},
|
|
195
|
-
...rest,
|
|
196
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
197
|
-
style: imageContainerStyle,
|
|
198
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
199
|
-
source: normalizedImageSource,
|
|
200
|
-
resizeMode: "cover",
|
|
201
|
-
style: imageStyle,
|
|
202
|
-
accessibilityElementsHidden: true,
|
|
203
|
-
importantForAccessibility: "no"
|
|
204
|
-
})
|
|
219
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
220
|
+
style: tokens.imageContainerStyle,
|
|
221
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
222
|
+
source: normalizedImageSource,
|
|
223
|
+
resizeMode: "cover",
|
|
224
|
+
style: tokens.imageStyle,
|
|
225
|
+
accessibilityElementsHidden: true,
|
|
226
|
+
importantForAccessibility: "no"
|
|
205
227
|
})
|
|
206
228
|
});
|
|
207
229
|
}
|
|
208
|
-
var _default = exports.default = Avatar;
|
|
230
|
+
var _default = exports.default = /*#__PURE__*/_react.default.memo(Avatar);
|
|
@@ -14,7 +14,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
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); }
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
function AvatarGroup({
|
|
17
|
-
modes =
|
|
17
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
18
18
|
children,
|
|
19
19
|
style,
|
|
20
20
|
...rest
|
|
@@ -7,11 +7,12 @@ 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 _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
function Badge({
|
|
13
14
|
label = 'Label',
|
|
14
|
-
modes =
|
|
15
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
15
16
|
onPress,
|
|
16
17
|
accessibilityLabel,
|
|
17
18
|
style,
|
|
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
10
|
var _MoneyValue = _interopRequireDefault(require("../MoneyValue/MoneyValue"));
|
|
11
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
/**
|
|
@@ -23,7 +24,7 @@ function Balance({
|
|
|
23
24
|
title = "Total owed to people",
|
|
24
25
|
amount = "500",
|
|
25
26
|
currency = "₹",
|
|
26
|
-
modes =
|
|
27
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
27
28
|
style,
|
|
28
29
|
children
|
|
29
30
|
}) {
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
10
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
11
|
var _BottomNavItem = _interopRequireDefault(require("../BottomNavItem/BottomNavItem"));
|
|
12
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
/**
|
|
@@ -26,7 +27,7 @@ function BottomNav({
|
|
|
26
27
|
value,
|
|
27
28
|
onChange,
|
|
28
29
|
children,
|
|
29
|
-
modes: propModes =
|
|
30
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
30
31
|
style,
|
|
31
32
|
accessibilityLabel = undefined,
|
|
32
33
|
accessibilityHint,
|