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
|
@@ -10,6 +10,7 @@ exports.default = void 0;
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactNative = require("react-native");
|
|
12
12
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
13
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
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
16
|
// ---------------------------------------------------------------------------
|
|
@@ -17,7 +18,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
17
18
|
// ---------------------------------------------------------------------------
|
|
18
19
|
|
|
19
20
|
const CarouselContext = /*#__PURE__*/(0, _react.createContext)({
|
|
20
|
-
modes:
|
|
21
|
+
modes: _reactUtils.EMPTY_MODES,
|
|
21
22
|
activeIndex: 0,
|
|
22
23
|
totalItems: 0,
|
|
23
24
|
goTo: () => {},
|
|
@@ -35,7 +36,7 @@ const CarouselContext = /*#__PURE__*/(0, _react.createContext)({
|
|
|
35
36
|
|
|
36
37
|
function Carousel({
|
|
37
38
|
children,
|
|
38
|
-
modes =
|
|
39
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
39
40
|
autoPlay = false,
|
|
40
41
|
autoPlayInterval = 4000,
|
|
41
42
|
showPagination = true,
|
|
@@ -8,6 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
10
10
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
11
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
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); }
|
|
13
14
|
/**
|
|
@@ -63,7 +64,7 @@ function Checkbox({
|
|
|
63
64
|
defaultChecked = false,
|
|
64
65
|
onValueChange,
|
|
65
66
|
disabled = false,
|
|
66
|
-
modes =
|
|
67
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
67
68
|
style,
|
|
68
69
|
accessibilityLabel
|
|
69
70
|
}) {
|
|
@@ -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 _Icon = _interopRequireDefault(require("../../icons/Icon"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -18,7 +19,7 @@ function ChipSelect({
|
|
|
18
19
|
label = 'Date',
|
|
19
20
|
active = false,
|
|
20
21
|
icon = 'ic_calendar_week',
|
|
21
|
-
modes =
|
|
22
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
22
23
|
style,
|
|
23
24
|
labelSlot,
|
|
24
25
|
onPress
|
|
@@ -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 _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
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
|
/**
|
|
@@ -33,7 +34,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
33
34
|
*/
|
|
34
35
|
function Disclaimer({
|
|
35
36
|
disclaimer = 'All financial services are provided by Jio Payments Bank Pvt. Ltd.',
|
|
36
|
-
modes: propModes =
|
|
37
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
37
38
|
style,
|
|
38
39
|
textStyle,
|
|
39
40
|
accessibilityLabel,
|
|
@@ -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 _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
/**
|
|
@@ -36,7 +37,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
36
37
|
*/
|
|
37
38
|
function Divider({
|
|
38
39
|
direction = 'horizontal',
|
|
39
|
-
modes =
|
|
40
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
40
41
|
style,
|
|
41
42
|
accessibilityLabel = undefined
|
|
42
43
|
}) {
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
10
10
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
11
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
12
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
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); }
|
|
14
15
|
const AnimatedScrollView = _reactNativeReanimated.default.createAnimatedComponent(_reactNativeGestureHandler.ScrollView);
|
|
@@ -49,7 +50,7 @@ function rubberBand(value, min, max, friction = 0.55) {
|
|
|
49
50
|
* Uses react-native-gesture-handler and react-native-reanimated.
|
|
50
51
|
*/
|
|
51
52
|
function Drawer({
|
|
52
|
-
modes =
|
|
53
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
53
54
|
style,
|
|
54
55
|
title,
|
|
55
56
|
header,
|
|
@@ -130,7 +131,17 @@ function Drawer({
|
|
|
130
131
|
const updateMode = (0, _react.useCallback)(newMode => {
|
|
131
132
|
setMode(newMode);
|
|
132
133
|
}, []);
|
|
133
|
-
|
|
134
|
+
|
|
135
|
+
// Gesture policy:
|
|
136
|
+
// • activeOffsetY: require a clear *vertical* drag (10px) before this
|
|
137
|
+
// pan claims the gesture. Matches typical iOS scroll activation feel.
|
|
138
|
+
// • failOffsetX: if the finger crosses ~16px horizontally *before* we
|
|
139
|
+
// activate, surrender the gesture entirely so any horizontal child
|
|
140
|
+
// (FlatList horizontal, swiper, slider, etc.) can scroll cleanly
|
|
141
|
+
// without the drawer also translating on Y.
|
|
142
|
+
// • simultaneousWithExternalGesture(scrollRef): cooperate with the
|
|
143
|
+
// drawer's own internal vertical ScrollView for nested scrolling.
|
|
144
|
+
const gesture = _reactNativeGestureHandler.Gesture.Pan().simultaneousWithExternalGesture(scrollRef).activeOffsetY([-10, 10]).failOffsetX([-16, 16]).onStart(() => {
|
|
134
145
|
context.value = {
|
|
135
146
|
y: translateY.value
|
|
136
147
|
};
|
|
@@ -139,6 +150,16 @@ function Drawer({
|
|
|
139
150
|
prevAtTop.value = scrollY.value <= 1;
|
|
140
151
|
scrollTopTranslationOffset.value = 0;
|
|
141
152
|
}).onUpdate(event => {
|
|
153
|
+
// Defense-in-depth: even after vertical activation, if the *current*
|
|
154
|
+
// motion is dominantly horizontal (e.g., the user activated with a
|
|
155
|
+
// small Y nudge and then curved into a horizontal swipe on a child
|
|
156
|
+
// carousel), don't translate the drawer this frame. failOffsetX
|
|
157
|
+
// already prevents activation in pure-horizontal swipes; this guards
|
|
158
|
+
// the diagonal-then-horizontal case.
|
|
159
|
+
if (Math.abs(event.translationX) > Math.abs(event.translationY) * 1.5) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
|
|
142
163
|
// Logic for nested scrolling:
|
|
143
164
|
// If we are at the expanded position (minTranslateY) AND content is
|
|
144
165
|
// scrolled down (scrollY > 0), let the ScrollView handle the gesture.
|
|
@@ -250,71 +271,108 @@ function Drawer({
|
|
|
250
271
|
const titleWeight = (0, _figmaVariablesResolver.getVariableByName)('drawer/title/fontWeight', modes) || '700';
|
|
251
272
|
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('drawer/title/lineHeight', modes) || 17;
|
|
252
273
|
const titlePaddingBottom = (0, _figmaVariablesResolver.getVariableByName)('drawer/titleWrap/padding/bottom', modes) || 8;
|
|
274
|
+
|
|
275
|
+
// Drop shadow — Figma layers two shadows (primary + secondary) sharing
|
|
276
|
+
// the same offsetY/blur but with their own offsetX and color.
|
|
277
|
+
const shadowPrimaryOffsetX = (0, _figmaVariablesResolver.getVariableByName)('drawer/shadow/primary/offsetX', modes) ?? 0;
|
|
278
|
+
const shadowPrimaryOffsetY = (0, _figmaVariablesResolver.getVariableByName)('drawer/shadow/primary/offsetY', modes) ?? 16;
|
|
279
|
+
const shadowPrimaryBlur = (0, _figmaVariablesResolver.getVariableByName)('drawer/shadow/primary/blur', modes) ?? 48;
|
|
280
|
+
const shadowPrimaryColor = (0, _figmaVariablesResolver.getVariableByName)('drawer/shadow/primary/color', modes) ?? 'rgba(12, 13, 16, 0.16)';
|
|
281
|
+
const shadowSecondaryOffsetX = (0, _figmaVariablesResolver.getVariableByName)('drawer/shadow/secondary/offsetX', modes) ?? 0;
|
|
282
|
+
const shadowSecondaryColor = (0, _figmaVariablesResolver.getVariableByName)('drawer/shadow/secondary/color', modes) ?? 'rgba(12, 13, 16, 0.12)';
|
|
283
|
+
|
|
284
|
+
// Cross-platform shadow style. Web supports stacking two shadows via
|
|
285
|
+
// boxShadow. iOS only supports a single native shadow per view, so we
|
|
286
|
+
// apply the more prominent (primary) one. Android uses elevation.
|
|
287
|
+
const shadowStyle = _reactNative.Platform.select({
|
|
288
|
+
web: {
|
|
289
|
+
boxShadow: `${shadowSecondaryOffsetX}px ${shadowPrimaryOffsetY}px ${shadowPrimaryBlur}px 0px ${shadowSecondaryColor}, ` + `${shadowPrimaryOffsetX}px ${shadowPrimaryOffsetY}px ${shadowPrimaryBlur}px 0px ${shadowPrimaryColor}`
|
|
290
|
+
},
|
|
291
|
+
ios: {
|
|
292
|
+
shadowColor: shadowPrimaryColor,
|
|
293
|
+
shadowOffset: {
|
|
294
|
+
width: shadowPrimaryOffsetX,
|
|
295
|
+
height: shadowPrimaryOffsetY
|
|
296
|
+
},
|
|
297
|
+
shadowOpacity: 1,
|
|
298
|
+
shadowRadius: shadowPrimaryBlur / 2
|
|
299
|
+
},
|
|
300
|
+
android: {
|
|
301
|
+
elevation: 16
|
|
302
|
+
},
|
|
303
|
+
default: {}
|
|
304
|
+
});
|
|
253
305
|
const defaultAccessibilityLabel = accessibilityLabel || title || 'Drawer';
|
|
254
306
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
|
|
255
307
|
style: [styles.host, style],
|
|
256
308
|
pointerEvents: "box-none",
|
|
257
309
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
258
310
|
gesture: gesture,
|
|
259
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
311
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
260
312
|
style: [styles.sheet, {
|
|
261
313
|
// Constraint the height strictly to the expanded height
|
|
262
314
|
// This ensures the ScrollView has a finite frame to scroll within
|
|
263
315
|
height: expandedHeight,
|
|
264
316
|
backgroundColor,
|
|
265
317
|
borderTopLeftRadius: radius,
|
|
266
|
-
borderTopRightRadius: radius
|
|
267
|
-
|
|
268
|
-
paddingRight,
|
|
269
|
-
paddingBottom,
|
|
270
|
-
rowGap: drawerGap
|
|
271
|
-
}, sheetStyle, animatedStyle],
|
|
318
|
+
borderTopRightRadius: radius
|
|
319
|
+
}, shadowStyle, sheetStyle, animatedStyle],
|
|
272
320
|
accessible: true,
|
|
273
321
|
...(_reactNative.Platform.OS === 'web' ? {
|
|
274
322
|
accessibilityRole: 'dialog'
|
|
275
323
|
} : undefined),
|
|
276
324
|
accessibilityLabel: undefined,
|
|
277
325
|
accessibilityHint: accessibilityHint || 'Swipe up to expand, swipe down to collapse',
|
|
278
|
-
children:
|
|
279
|
-
style: [styles.
|
|
280
|
-
|
|
326
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
327
|
+
style: [styles.sheetInner, {
|
|
328
|
+
borderTopLeftRadius: radius,
|
|
329
|
+
borderTopRightRadius: radius,
|
|
330
|
+
paddingLeft,
|
|
331
|
+
paddingRight,
|
|
332
|
+
paddingBottom,
|
|
333
|
+
rowGap: drawerGap
|
|
281
334
|
}],
|
|
282
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
335
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
336
|
+
style: [styles.handleArea, !title && !header && {
|
|
337
|
+
paddingBottom: 0
|
|
338
|
+
}],
|
|
339
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
340
|
+
style: [{
|
|
341
|
+
backgroundColor: handleColor,
|
|
342
|
+
width: handleWidth,
|
|
343
|
+
height: handleHeight,
|
|
344
|
+
borderRadius: handleRadius
|
|
345
|
+
}]
|
|
346
|
+
})
|
|
347
|
+
}), header, title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
283
348
|
style: [{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
overScrollMode: "always",
|
|
312
|
-
onScroll: (0, _reactNativeReanimated.useAnimatedScrollHandler)(event => {
|
|
313
|
-
scrollY.value = event.contentOffset.y;
|
|
314
|
-
}),
|
|
315
|
-
scrollEventThrottle: 16,
|
|
316
|
-
children: children
|
|
317
|
-
})]
|
|
349
|
+
color: titleColor,
|
|
350
|
+
fontSize: titleSize,
|
|
351
|
+
fontWeight: titleWeight,
|
|
352
|
+
lineHeight: titleLineHeight,
|
|
353
|
+
marginBottom: titlePaddingBottom
|
|
354
|
+
}],
|
|
355
|
+
children: title
|
|
356
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedScrollView, {
|
|
357
|
+
ref: scrollRef,
|
|
358
|
+
style: [styles.content, contentStyle],
|
|
359
|
+
contentContainerStyle: [{
|
|
360
|
+
paddingBottom: paddingBottom + bottomInset,
|
|
361
|
+
gap: drawerGap,
|
|
362
|
+
flexDirection: 'column',
|
|
363
|
+
alignItems: 'stretch'
|
|
364
|
+
}, contentContainerStyle],
|
|
365
|
+
showsVerticalScrollIndicator: showsVerticalScrollIndicator,
|
|
366
|
+
animatedProps: animatedScrollProps,
|
|
367
|
+
alwaysBounceVertical: false,
|
|
368
|
+
overScrollMode: "always",
|
|
369
|
+
onScroll: (0, _reactNativeReanimated.useAnimatedScrollHandler)(event => {
|
|
370
|
+
scrollY.value = event.contentOffset.y;
|
|
371
|
+
}),
|
|
372
|
+
scrollEventThrottle: 16,
|
|
373
|
+
children: children
|
|
374
|
+
})]
|
|
375
|
+
})
|
|
318
376
|
})
|
|
319
377
|
})
|
|
320
378
|
});
|
|
@@ -332,7 +390,10 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
332
390
|
sheet: {
|
|
333
391
|
width: '100%',
|
|
334
392
|
position: 'absolute',
|
|
335
|
-
top: 0
|
|
393
|
+
top: 0
|
|
394
|
+
},
|
|
395
|
+
sheetInner: {
|
|
396
|
+
flex: 1,
|
|
336
397
|
overflow: 'hidden'
|
|
337
398
|
},
|
|
338
399
|
handleArea: {
|
|
@@ -10,6 +10,7 @@ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resol
|
|
|
10
10
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
11
|
var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
|
|
12
12
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
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
|
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); }
|
|
@@ -24,7 +25,7 @@ function EmptyState({
|
|
|
24
25
|
showDescription = true,
|
|
25
26
|
iconSlot,
|
|
26
27
|
buttonSlot,
|
|
27
|
-
modes: propModes =
|
|
28
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
28
29
|
style,
|
|
29
30
|
testID
|
|
30
31
|
}) {
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
10
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
11
11
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
12
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
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); }
|
|
14
15
|
const FormContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
@@ -19,7 +20,7 @@ function Form({
|
|
|
19
20
|
children,
|
|
20
21
|
validationErrors: externalErrors,
|
|
21
22
|
onSubmit,
|
|
22
|
-
modes: propModes =
|
|
23
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
23
24
|
style,
|
|
24
25
|
accessibilityLabel,
|
|
25
26
|
testID
|
|
@@ -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 _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
12
|
var _TextInput = _interopRequireDefault(require("../TextInput/TextInput"));
|
|
12
13
|
var _SupportText = _interopRequireDefault(require("../SupportText/SupportText"));
|
|
@@ -20,7 +21,7 @@ function useFormField(props) {
|
|
|
20
21
|
isInvalid = false,
|
|
21
22
|
supportText,
|
|
22
23
|
errorMessage,
|
|
23
|
-
modes: propModes =
|
|
24
|
+
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
24
25
|
onFocus,
|
|
25
26
|
onBlur
|
|
26
27
|
} = props;
|
|
@@ -146,7 +147,7 @@ function FormField({
|
|
|
146
147
|
isInvalid = false,
|
|
147
148
|
supportText,
|
|
148
149
|
errorMessage,
|
|
149
|
-
modes =
|
|
150
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
150
151
|
style,
|
|
151
152
|
onFocus,
|
|
152
153
|
onBlur,
|
|
@@ -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 _RadioButton = _interopRequireDefault(require("../RadioButton/RadioButton"));
|
|
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
|
const GRID_COLUMNS = 3;
|
|
@@ -36,7 +37,7 @@ function HoldingsCard({
|
|
|
36
37
|
selected = false,
|
|
37
38
|
disabled = false,
|
|
38
39
|
onPress,
|
|
39
|
-
modes =
|
|
40
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
40
41
|
style,
|
|
41
42
|
testID
|
|
42
43
|
}) {
|