jfs-components 0.1.0 → 0.1.8
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 +37 -0
- package/lib/commonjs/components/AmountInput/AmountInput.js +8 -5
- package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +1 -1
- package/lib/commonjs/components/Balance/Balance.js +17 -12
- package/lib/commonjs/components/BenefitCard/BenefitCard.js +231 -0
- package/lib/commonjs/components/Card/Card.js +2 -1
- package/lib/commonjs/components/CardFeedback/CardFeedback.js +2 -1
- package/lib/commonjs/components/CcCard/CcCard.js +470 -0
- package/lib/commonjs/components/Checkbox/Checkbox.js +6 -4
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +4 -3
- package/lib/commonjs/components/CompareTable/CompareTable.js +372 -0
- package/lib/commonjs/components/ComparisonBar/ComparisonBar.js +266 -0
- package/lib/commonjs/components/Drawer/Drawer.js +13 -4
- package/lib/commonjs/components/DropdownInput/DropdownInput.js +36 -4
- package/lib/commonjs/components/FormField/FormField.js +4 -3
- package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +62 -2
- package/lib/commonjs/components/Image/Image.js +11 -5
- package/lib/commonjs/components/InputSearch/InputSearch.js +6 -4
- package/lib/commonjs/components/LottiePlayer/loadNativeLottieView.js +8 -13
- package/lib/commonjs/components/NoteInput/NoteInput.js +6 -5
- package/lib/commonjs/components/Overlay/Overlay.js +92 -0
- package/lib/commonjs/components/PdpCcCard/PdpCcCard.js +273 -0
- package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +2 -1
- package/lib/commonjs/components/ProductMerchandisingCard/GlassFill.js +263 -0
- package/lib/commonjs/components/ProductMerchandisingCard/GlassFill.web.js +116 -0
- package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +353 -0
- package/lib/commonjs/components/ProjectionMarker/ProjectionMarker.js +161 -0
- package/lib/commonjs/components/Radio/Radio.js +5 -5
- package/lib/commonjs/components/Slider/Slider.js +473 -0
- package/lib/commonjs/components/TextInput/TextInput.js +15 -9
- package/lib/commonjs/components/TextSegment/TextSegment.js +118 -0
- package/lib/commonjs/components/docs/modeControls.js +116 -0
- package/lib/commonjs/components/index.js +70 -0
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/design-tokens/JFSThemeProvider.js +1 -1
- package/lib/commonjs/design-tokens/figma-modes.generated.js +420 -0
- package/lib/commonjs/design-tokens/index.js +11 -0
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/commonjs/utils/react-utils.js +22 -0
- package/lib/module/components/Accordion/Accordion.js +1 -2
- package/lib/module/components/AmountInput/AmountInput.js +6 -4
- package/lib/module/components/AreaLineChart/AreaLineChart.js +1 -1
- package/lib/module/components/Balance/Balance.js +18 -13
- package/lib/module/components/BenefitCard/BenefitCard.js +225 -0
- package/lib/module/components/Card/Card.js +1 -2
- package/lib/module/components/CardFeedback/CardFeedback.js +1 -2
- package/lib/module/components/CcCard/CcCard.js +464 -0
- package/lib/module/components/Checkbox/Checkbox.js +6 -6
- package/lib/module/components/CheckboxItem/CheckboxItem.js +5 -4
- package/lib/module/components/CompareTable/CompareTable.js +367 -0
- package/lib/module/components/ComparisonBar/ComparisonBar.js +260 -0
- package/lib/module/components/Drawer/Drawer.js +12 -4
- package/lib/module/components/DropdownInput/DropdownInput.js +37 -5
- package/lib/module/components/FormField/FormField.js +5 -4
- package/lib/module/components/FullscreenModal/FullscreenModal.js +64 -5
- package/lib/module/components/Image/Image.js +11 -5
- package/lib/module/components/InputSearch/InputSearch.js +6 -4
- package/lib/module/components/InstitutionBadge/InstitutionBadge.js +1 -2
- package/lib/module/components/LottiePlayer/loadNativeLottieView.js +8 -13
- package/lib/module/components/MoneyValue/MoneyValue.js +1 -2
- package/lib/module/components/NoteInput/NoteInput.js +7 -6
- package/lib/module/components/OTP/OTP.js +1 -2
- package/lib/module/components/Overlay/Overlay.js +87 -0
- package/lib/module/components/PdpCcCard/PdpCcCard.js +267 -0
- package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +1 -2
- package/lib/module/components/PoweredByLabel/PoweredByLabel.js +1 -2
- package/lib/module/components/ProductMerchandisingCard/GlassFill.js +257 -0
- package/lib/module/components/ProductMerchandisingCard/GlassFill.web.js +111 -0
- package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +347 -0
- package/lib/module/components/ProjectionMarker/ProjectionMarker.js +156 -0
- package/lib/module/components/Radio/Radio.js +5 -4
- package/lib/module/components/RechargeCard/RechargeCard.js +1 -2
- package/lib/module/components/Section/Section.js +1 -2
- package/lib/module/components/Slider/Slider.js +468 -0
- package/lib/module/components/TextInput/TextInput.js +16 -12
- package/lib/module/components/TextSegment/TextSegment.js +113 -0
- package/lib/module/components/UpiHandle/UpiHandle.js +1 -2
- package/lib/module/components/docs/modeControls.js +111 -0
- package/lib/module/components/index.js +10 -0
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/design-tokens/JFSThemeProvider.js +1 -1
- package/lib/module/design-tokens/figma-modes.generated.js +416 -0
- package/lib/module/design-tokens/index.js +2 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/module/utils/react-utils.js +21 -1
- package/lib/typescript/src/components/Accordion/Accordion.d.ts +2 -1
- package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +2 -1
- package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +2 -1
- package/lib/typescript/src/components/ActionFooter/ActionFooter.d.ts +2 -1
- package/lib/typescript/src/components/ActionTile/ActionTile.d.ts +2 -1
- package/lib/typescript/src/components/AllocationComparisonChart/AllocationComparisonChart.d.ts +2 -1
- package/lib/typescript/src/components/AmountInput/AmountInput.d.ts +5 -3
- package/lib/typescript/src/components/AppBar/AppBar.d.ts +2 -1
- package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +3 -2
- package/lib/typescript/src/components/Attached/Attached.d.ts +2 -1
- package/lib/typescript/src/components/Avatar/Avatar.d.ts +2 -1
- package/lib/typescript/src/components/AvatarGroup/AvatarGroup.d.ts +2 -1
- package/lib/typescript/src/components/Badge/Badge.d.ts +2 -1
- package/lib/typescript/src/components/Balance/Balance.d.ts +2 -1
- package/lib/typescript/src/components/BenefitCard/BenefitCard.d.ts +93 -0
- package/lib/typescript/src/components/BottomNav/BottomNav.d.ts +2 -1
- package/lib/typescript/src/components/BottomNavItem/BottomNavItem.d.ts +2 -1
- package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +2 -1
- package/lib/typescript/src/components/BubbleChart/BubbleChart.d.ts +2 -1
- package/lib/typescript/src/components/Button/Button.d.ts +2 -1
- package/lib/typescript/src/components/ButtonGroup/ButtonGroup.d.ts +2 -1
- package/lib/typescript/src/components/Card/Card.d.ts +3 -2
- package/lib/typescript/src/components/CardAdvisory/CardAdvisory.d.ts +2 -1
- package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +2 -1
- package/lib/typescript/src/components/CardCTA/CardCTA.d.ts +2 -1
- package/lib/typescript/src/components/CardFeedback/CardFeedback.d.ts +7 -6
- package/lib/typescript/src/components/CardFinancialCondition/CardFinancialCondition.d.ts +2 -1
- package/lib/typescript/src/components/CardInsight/CardInsight.d.ts +2 -1
- package/lib/typescript/src/components/CardProviderInfo/CardProviderInfo.d.ts +2 -1
- package/lib/typescript/src/components/Carousel/Carousel.d.ts +4 -3
- package/lib/typescript/src/components/CcCard/CcCard.d.ts +137 -0
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +5 -3
- package/lib/typescript/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -1
- package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +4 -3
- package/lib/typescript/src/components/ChipGroup/ChipGroup.d.ts +2 -1
- package/lib/typescript/src/components/ChipSelect/ChipSelect.d.ts +2 -1
- package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +2 -1
- package/lib/typescript/src/components/CircularProgressBarDoted/CircularProgressBarDoted.d.ts +2 -1
- package/lib/typescript/src/components/CircularRating/CircularRating.d.ts +2 -1
- package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +2 -1
- package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +88 -0
- package/lib/typescript/src/components/ComparisonBar/ComparisonBar.d.ts +118 -0
- package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +3 -2
- package/lib/typescript/src/components/CoverageRing/CoverageRing.d.ts +2 -1
- package/lib/typescript/src/components/DebitCard/DebitCard.d.ts +2 -1
- package/lib/typescript/src/components/Disclaimer/Disclaimer.d.ts +2 -1
- package/lib/typescript/src/components/Divider/Divider.d.ts +2 -1
- package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +4 -3
- package/lib/typescript/src/components/DonutChartSummary/DonutChartSummary.d.ts +3 -2
- package/lib/typescript/src/components/Drawer/Drawer.d.ts +15 -1
- package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +3 -2
- package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +22 -2
- package/lib/typescript/src/components/EmptyState/EmptyState.d.ts +2 -1
- package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +2 -1
- package/lib/typescript/src/components/FilterBar/FilterBar.d.ts +3 -2
- package/lib/typescript/src/components/Form/Form.d.ts +2 -1
- package/lib/typescript/src/components/FormField/FormField.d.ts +4 -3
- package/lib/typescript/src/components/FullscreenModal/FullscreenModal.d.ts +2 -1
- package/lib/typescript/src/components/Gauge/Gauge.d.ts +2 -1
- package/lib/typescript/src/components/HStack/HStack.d.ts +2 -1
- package/lib/typescript/src/components/HoldingsCard/HoldingsCard.d.ts +2 -1
- package/lib/typescript/src/components/Icon/Icon.d.ts +2 -1
- package/lib/typescript/src/components/IconButton/IconButton.d.ts +2 -1
- package/lib/typescript/src/components/IconCapsule/IconCapsule.d.ts +2 -1
- package/lib/typescript/src/components/Image/Image.d.ts +17 -1
- package/lib/typescript/src/components/InputSearch/InputSearch.d.ts +25 -3
- package/lib/typescript/src/components/InstitutionBadge/InstitutionBadge.d.ts +2 -1
- package/lib/typescript/src/components/LazyList/LazyList.d.ts +2 -1
- package/lib/typescript/src/components/LinearMeter/LinearMeter.d.ts +3 -2
- package/lib/typescript/src/components/LinearProgress/LinearProgress.d.ts +2 -1
- package/lib/typescript/src/components/ListGroup/ListGroup.d.ts +2 -1
- package/lib/typescript/src/components/ListItem/ListItem.d.ts +2 -1
- package/lib/typescript/src/components/LottieIntroBlock/LottieIntroBlock.d.ts +2 -1
- package/lib/typescript/src/components/LottiePlayer/LottiePlayer.d.ts +2 -1
- package/lib/typescript/src/components/LottiePlayer/LottiePlayer.web.d.ts +2 -1
- package/lib/typescript/src/components/MediaCard/MediaCard.d.ts +6 -5
- package/lib/typescript/src/components/MerchantProfile/MerchantProfile.d.ts +2 -1
- package/lib/typescript/src/components/MessageField/MessageField.d.ts +2 -1
- package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +2 -1
- package/lib/typescript/src/components/MoneyValue/MoneyValue.d.ts +2 -1
- package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +4 -3
- package/lib/typescript/src/components/NavArrow/NavArrow.d.ts +2 -1
- package/lib/typescript/src/components/NoteInput/NoteInput.d.ts +21 -3
- package/lib/typescript/src/components/Nudge/Nudge.d.ts +2 -1
- package/lib/typescript/src/components/Numpad/Numpad.d.ts +2 -1
- package/lib/typescript/src/components/OTP/OTP.d.ts +3 -2
- package/lib/typescript/src/components/Overlay/Overlay.d.ts +52 -0
- package/lib/typescript/src/components/PageHero/PageHero.d.ts +2 -1
- package/lib/typescript/src/components/PaymentFeedback/PaymentFeedback.d.ts +2 -1
- package/lib/typescript/src/components/PdpCcCard/PdpCcCard.d.ts +84 -0
- package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +2 -1
- package/lib/typescript/src/components/Popup/Popup.d.ts +2 -1
- package/lib/typescript/src/components/PortfolioHero/PortfolioHero.d.ts +2 -1
- package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +2 -1
- package/lib/typescript/src/components/ProductLabel/ProductLabel.d.ts +2 -1
- package/lib/typescript/src/components/ProductMerchandisingCard/GlassFill.d.ts +56 -0
- package/lib/typescript/src/components/ProductMerchandisingCard/GlassFill.web.d.ts +27 -0
- package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts +81 -0
- package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +2 -1
- package/lib/typescript/src/components/ProgressBadge/ProgressBadge.d.ts +2 -1
- package/lib/typescript/src/components/ProjectionMarker/ProjectionMarker.d.ts +82 -0
- package/lib/typescript/src/components/Radio/Radio.d.ts +5 -3
- package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +2 -2
- package/lib/typescript/src/components/RangeTrack/RangeTrack.d.ts +3 -2
- package/lib/typescript/src/components/RechargeCard/RechargeCard.d.ts +2 -1
- package/lib/typescript/src/components/SavingsGoalSummary/SavingsGoalSummary.d.ts +2 -1
- package/lib/typescript/src/components/Screen/Screen.d.ts +2 -1
- package/lib/typescript/src/components/Section/Section.d.ts +3 -2
- package/lib/typescript/src/components/SegmentedControl/SegmentedControl.d.ts +2 -1
- package/lib/typescript/src/components/SegmentedTrack/SegmentedTrack.d.ts +4 -3
- package/lib/typescript/src/components/Slider/Slider.d.ts +99 -0
- package/lib/typescript/src/components/Slot/Slot.d.ts +2 -1
- package/lib/typescript/src/components/Spinner/Spinner.d.ts +2 -1
- package/lib/typescript/src/components/StatGroup/StatGroup.d.ts +2 -1
- package/lib/typescript/src/components/StatItem/StatItem.d.ts +2 -1
- package/lib/typescript/src/components/StatusHero/StatusHero.d.ts +2 -1
- package/lib/typescript/src/components/Stepper/Step.d.ts +2 -1
- package/lib/typescript/src/components/Stepper/StepLabel.d.ts +2 -1
- package/lib/typescript/src/components/Stepper/Stepper.d.ts +2 -1
- package/lib/typescript/src/components/StrengthIndicator/StrengthIndicator.d.ts +2 -1
- package/lib/typescript/src/components/SuggestiveSearch/SuggestiveSearch.d.ts +2 -1
- package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +2 -1
- package/lib/typescript/src/components/SupportText/SupportText.d.ts +2 -1
- package/lib/typescript/src/components/SupportText/SupportTextIcon.d.ts +2 -1
- package/lib/typescript/src/components/SwappableAmount/SwappableAmount.d.ts +2 -1
- package/lib/typescript/src/components/Tabs/TabItem.d.ts +2 -1
- package/lib/typescript/src/components/Tabs/Tabs.d.ts +2 -1
- package/lib/typescript/src/components/TestimonialsCard/TestimonialsCard.d.ts +2 -1
- package/lib/typescript/src/components/Text/Text.d.ts +2 -1
- package/lib/typescript/src/components/TextInput/TextInput.d.ts +12 -31
- package/lib/typescript/src/components/TextSegment/TextSegment.d.ts +100 -0
- package/lib/typescript/src/components/ThreadHero/ThreadHero.d.ts +2 -1
- package/lib/typescript/src/components/Title/Title.d.ts +2 -1
- package/lib/typescript/src/components/Toast/Toast.d.ts +2 -1
- package/lib/typescript/src/components/Toast/ToastProvider.d.ts +2 -1
- package/lib/typescript/src/components/Toast/useToast.d.ts +3 -2
- package/lib/typescript/src/components/Toggle/Toggle.d.ts +2 -1
- package/lib/typescript/src/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/typescript/src/components/TransactionBubble/TransactionBubble.d.ts +2 -1
- package/lib/typescript/src/components/TransactionDetails/TransactionDetails.d.ts +3 -2
- package/lib/typescript/src/components/TransactionStatus/TransactionStatus.d.ts +2 -1
- package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +2 -1
- package/lib/typescript/src/components/VStack/VStack.d.ts +2 -1
- package/lib/typescript/src/components/docs/modeControls.d.ts +28 -0
- package/lib/typescript/src/components/index.d.ts +11 -1
- package/lib/typescript/src/design-tokens/JFSThemeProvider.d.ts +4 -3
- package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +284 -0
- package/lib/typescript/src/design-tokens/index.d.ts +1 -0
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/lib/typescript/src/skeleton/Skeleton.d.ts +2 -1
- package/lib/typescript/src/utils/react-utils.d.ts +12 -1
- package/package.json +4 -2
- package/src/components/Accordion/Accordion.tsx +2 -1
- package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +2 -1
- package/src/components/AccountCard/AccountCard.tsx +2 -1
- package/src/components/ActionFooter/ActionFooter.tsx +2 -1
- package/src/components/ActionTile/ActionTile.tsx +2 -1
- package/src/components/AllocationComparisonChart/AllocationComparisonChart.tsx +2 -1
- package/src/components/AmountInput/AmountInput.tsx +9 -6
- package/src/components/AppBar/AppBar.tsx +2 -1
- package/src/components/AreaLineChart/AreaLineChart.tsx +8 -7
- package/src/components/Attached/Attached.tsx +2 -1
- package/src/components/Avatar/Avatar.tsx +3 -2
- package/src/components/AvatarGroup/AvatarGroup.tsx +2 -1
- package/src/components/Badge/Badge.tsx +2 -1
- package/src/components/Balance/Balance.tsx +18 -12
- package/src/components/BenefitCard/BenefitCard.tsx +309 -0
- package/src/components/BottomNav/BottomNav.tsx +2 -1
- package/src/components/BottomNavItem/BottomNavItem.tsx +3 -2
- package/src/components/BrandChip/BrandChip.tsx +3 -2
- package/src/components/BubbleChart/BubbleChart.tsx +2 -1
- package/src/components/Button/Button.tsx +3 -2
- package/src/components/ButtonGroup/ButtonGroup.tsx +2 -1
- package/src/components/Card/Card.tsx +4 -3
- package/src/components/CardAdvisory/CardAdvisory.tsx +3 -2
- package/src/components/CardBankAccount/CardBankAccount.tsx +2 -1
- package/src/components/CardCTA/CardCTA.tsx +3 -2
- package/src/components/CardFeedback/CardFeedback.tsx +11 -10
- package/src/components/CardFinancialCondition/CardFinancialCondition.tsx +3 -2
- package/src/components/CardInsight/CardInsight.tsx +2 -1
- package/src/components/CardProviderInfo/CardProviderInfo.tsx +2 -1
- package/src/components/Carousel/Carousel.tsx +5 -4
- package/src/components/CcCard/CcCard.tsx +598 -0
- package/src/components/Checkbox/Checkbox.tsx +7 -5
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +2 -1
- package/src/components/CheckboxItem/CheckboxItem.tsx +7 -5
- package/src/components/ChipGroup/ChipGroup.tsx +2 -1
- package/src/components/ChipSelect/ChipSelect.tsx +2 -1
- package/src/components/CircularProgressBar/CircularProgressBar.tsx +2 -1
- package/src/components/CircularProgressBarDoted/CircularProgressBarDoted.tsx +2 -1
- package/src/components/CircularRating/CircularRating.tsx +3 -2
- package/src/components/ClusterBubble/ClusterBubble.tsx +2 -1
- package/src/components/CompareTable/CompareTable.tsx +477 -0
- package/src/components/ComparisonBar/ComparisonBar.tsx +356 -0
- package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +3 -2
- package/src/components/CoverageRing/CoverageRing.tsx +2 -1
- package/src/components/DebitCard/DebitCard.tsx +2 -1
- package/src/components/Disclaimer/Disclaimer.tsx +2 -1
- package/src/components/Divider/Divider.tsx +2 -1
- package/src/components/DonutChart/DonutChart.tsx +6 -5
- package/src/components/DonutChartSummary/DonutChartSummary.tsx +3 -2
- package/src/components/Drawer/Drawer.tsx +21 -1
- package/src/components/Dropdown/Dropdown.tsx +4 -3
- package/src/components/DropdownInput/DropdownInput.tsx +60 -7
- package/src/components/EmptyState/EmptyState.tsx +2 -1
- package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +2 -1
- package/src/components/FilterBar/FilterBar.tsx +3 -2
- package/src/components/Form/Form.tsx +2 -1
- package/src/components/FormField/FormField.tsx +8 -6
- package/src/components/FullscreenModal/FullscreenModal.tsx +68 -10
- package/src/components/Gauge/Gauge.tsx +2 -1
- package/src/components/HStack/HStack.tsx +2 -1
- package/src/components/HoldingsCard/HoldingsCard.tsx +2 -1
- package/src/components/Icon/Icon.tsx +3 -2
- package/src/components/IconButton/IconButton.tsx +3 -2
- package/src/components/IconCapsule/IconCapsule.tsx +3 -2
- package/src/components/Image/Image.tsx +29 -5
- package/src/components/InputSearch/InputSearch.tsx +11 -7
- package/src/components/InstitutionBadge/InstitutionBadge.tsx +3 -2
- package/src/components/LazyList/LazyList.tsx +2 -1
- package/src/components/LinearMeter/LinearMeter.tsx +3 -2
- package/src/components/LinearProgress/LinearProgress.tsx +2 -1
- package/src/components/ListGroup/ListGroup.tsx +2 -1
- package/src/components/ListItem/ListItem.tsx +3 -2
- package/src/components/LottieIntroBlock/LottieIntroBlock.tsx +2 -1
- package/src/components/LottiePlayer/LottiePlayer.tsx +3 -2
- package/src/components/LottiePlayer/LottiePlayer.web.tsx +3 -2
- package/src/components/LottiePlayer/loadNativeLottieView.tsx +9 -13
- package/src/components/MediaCard/MediaCard.tsx +7 -6
- package/src/components/MerchantProfile/MerchantProfile.tsx +2 -1
- package/src/components/MessageField/MessageField.tsx +3 -2
- package/src/components/MetricLegendItem/MetricLegendItem.tsx +2 -1
- package/src/components/MoneyValue/MoneyValue.tsx +2 -1
- package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +5 -4
- package/src/components/NavArrow/NavArrow.tsx +3 -2
- package/src/components/NoteInput/NoteInput.tsx +10 -7
- package/src/components/Nudge/Nudge.tsx +3 -2
- package/src/components/Numpad/Numpad.tsx +2 -1
- package/src/components/OTP/OTP.tsx +3 -2
- package/src/components/Overlay/Overlay.tsx +114 -0
- package/src/components/PageHero/PageHero.tsx +2 -1
- package/src/components/PaymentFeedback/PaymentFeedback.tsx +2 -1
- package/src/components/PdpCcCard/PdpCcCard.tsx +356 -0
- package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +2 -1
- package/src/components/Popup/Popup.tsx +2 -1
- package/src/components/PortfolioHero/PortfolioHero.tsx +2 -1
- package/src/components/PoweredByLabel/PoweredByLabel.tsx +2 -1
- package/src/components/ProductLabel/ProductLabel.tsx +2 -1
- package/src/components/ProductMerchandisingCard/GlassFill.tsx +276 -0
- package/src/components/ProductMerchandisingCard/GlassFill.web.tsx +127 -0
- package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +423 -0
- package/src/components/ProductOverview/ProductOverview.tsx +2 -1
- package/src/components/ProgressBadge/ProgressBadge.tsx +2 -1
- package/src/components/ProjectionMarker/ProjectionMarker.tsx +277 -0
- package/src/components/Radio/Radio.tsx +7 -5
- package/src/components/RangeTrack/RangeTrack.tsx +3 -2
- package/src/components/RechargeCard/RechargeCard.tsx +2 -1
- package/src/components/SavingsGoalSummary/SavingsGoalSummary.tsx +2 -1
- package/src/components/Screen/Screen.tsx +2 -1
- package/src/components/Section/Section.tsx +6 -5
- package/src/components/SegmentedControl/SegmentedControl.tsx +3 -2
- package/src/components/SegmentedTrack/SegmentedTrack.tsx +5 -4
- package/src/components/Slider/Slider.tsx +628 -0
- package/src/components/Slot/Slot.tsx +2 -1
- package/src/components/Spinner/Spinner.tsx +2 -1
- package/src/components/StatGroup/StatGroup.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/StrengthIndicator/StrengthIndicator.tsx +2 -1
- package/src/components/SuggestiveSearch/SuggestiveSearch.tsx +4 -3
- package/src/components/SummaryTile/SummaryTile.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/TestimonialsCard/TestimonialsCard.tsx +2 -1
- package/src/components/Text/Text.tsx +2 -1
- package/src/components/TextInput/TextInput.tsx +18 -13
- package/src/components/TextSegment/TextSegment.tsx +166 -0
- 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/Toast/ToastProvider.tsx +2 -1
- package/src/components/Toast/useToast.ts +3 -2
- package/src/components/Toggle/Toggle.tsx +2 -1
- package/src/components/Tooltip/Tooltip.tsx +3 -2
- package/src/components/TransactionBubble/TransactionBubble.tsx +2 -1
- package/src/components/TransactionDetails/TransactionDetails.tsx +3 -2
- package/src/components/TransactionStatus/TransactionStatus.tsx +3 -2
- package/src/components/UpiHandle/UpiHandle.tsx +3 -2
- package/src/components/VStack/VStack.tsx +2 -1
- package/src/components/docs/modeControls.tsx +122 -0
- package/src/components/index.ts +11 -1
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/design-tokens/JFSThemeProvider.tsx +4 -3
- package/src/design-tokens/figma-modes.generated.ts +425 -0
- package/src/design-tokens/index.ts +1 -0
- package/src/icons/registry.ts +1 -1
- package/src/skeleton/Skeleton.tsx +2 -1
- package/src/utils/react-utils.ts +26 -2
- package/lib/typescript/scripts/extract-component-tokens.d.ts +0 -9
- package/lib/typescript/scripts/generate-component-docs.d.ts +0 -9
- package/lib/typescript/scripts/generate-icon-registry.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [0.1.8] - 2026-06-12
|
|
8
|
+
|
|
9
|
+
- Added `BenefitCard` — header highlight + body benefit rows with icon/title/trailing value and optional CTA.
|
|
10
|
+
- Added `CcCard` — credit-card merchandising card with badge row, media, benefit list, footer CTA, and `compact` variant.
|
|
11
|
+
- Added `CompareTable` — accordion-style product comparison table with selection-card columns and feature rows.
|
|
12
|
+
- Added `ComparisonBar` — controlled add/remove image slots with a trailing Compare action.
|
|
13
|
+
- Added `PdpCcCard` — PDP credit-card hero with media, title, metrics row, and footer CTA.
|
|
14
|
+
- Added `ProductMerchandisingCard` — full-bleed media card with glass footer, avatar, badge, and CTA (`GlassFill` platform split for native blur / web `backdrop-filter`).
|
|
15
|
+
- Added `ProjectionMarker` — investment projection timeline with start/end values and a center duration/rate badge.
|
|
16
|
+
- Added `Slider` — token-driven range slider with SVG track, step snapping, and imperative ref API (`getValue` / `setValue` / `increment` / `decrement`).
|
|
17
|
+
- Added `TextSegment` — token-driven multi-colour inline text via `segments` or compositional `Text` children.
|
|
18
|
+
- `DropdownInput` — imperative ref API (`open` / `close` / `toggle` / `focus` / `blur` / `measureInWindow`).
|
|
19
|
+
- Form inputs — refs forwarded through `Checkbox`, `CheckboxItem`, `Radio`, `TextInput`, `InputSearch`, `NoteInput`, `AmountInput`, and `FormField`.
|
|
20
|
+
- Figma/token sync pass; refreshed `.token-metadata.json`, `figma-modes.generated.ts`, icons registry, and Coin Variables tokens.
|
|
21
|
+
- Added `npm run tokens` script (`scripts/figma-token-explorer.js`); `tsconfig.build.json` now excludes `scripts/`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## [0.1.2] - 2026-06-10
|
|
26
|
+
|
|
27
|
+
- Added `Overlay` — full-screen scrim with optional dismiss-on-press and `contentPlacement` (`center` / `top` / `bottom` / `stretch`).
|
|
28
|
+
- `Drawer` — optional `showOverlay` + `onOverlayPress` scrim behind the sheet.
|
|
29
|
+
- `Image` — new `resizeMethod` prop for sharper high-res bitmap rendering.
|
|
30
|
+
- `FullscreenModal` — defers hero media render until modal width is measured.
|
|
31
|
+
- `DropdownInput` — popup animation set to `none`.
|
|
32
|
+
- `LottiePlayer` — fixed native module resolution (static `require` so Metro resolves when the peer is installed).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## [0.1.1] - 2026-06-10
|
|
37
|
+
|
|
38
|
+
- Design tokens — the `modes` prop is now strongly typed end to end. A generated `Modes` type gives autocomplete and validation for both collection-name keys and mode-name values across every component, while staying fully backward compatible (opt-in `StrictModes` turns typos into compile errors). `FIGMA_MODES`, `CollectionName`, and `ModeOf` are exported from the package.
|
|
39
|
+
- Storybook — components now expose per-collection mode `select` controls (auto-generated) in place of the freeform `modes` object control. Collection detection is composition-aware, so wrapper components (e.g. `Balance`, `BubbleChart`, `BrandChip`) surface the modes of the children they theme.
|
|
40
|
+
- `FullscreenModal` — hero media now fills the modal edge to edge: the surface width is measured and an explicit ratio-derived box is applied to the background, fixing the right-side gap / mis-sized image on native.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
7
44
|
## [0.1.0] - 2026-06-08
|
|
8
45
|
|
|
9
46
|
- Added `TestimonialsCard` — compact avatar + title + body card for testimonial carousels.
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
var _react =
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(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");
|
|
@@ -13,17 +13,18 @@ var _NoteInput = _interopRequireDefault(require("../NoteInput/NoteInput"));
|
|
|
13
13
|
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
|
+
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); }
|
|
16
17
|
/**
|
|
17
18
|
* AmountInput component that combines MoneyValue and NoteInput from Figma design.
|
|
18
19
|
*
|
|
19
20
|
* @component
|
|
20
21
|
*/
|
|
21
|
-
function AmountInput({
|
|
22
|
+
const AmountInput = /*#__PURE__*/(0, _react.forwardRef)(function AmountInput({
|
|
22
23
|
moneyValueSlot,
|
|
23
24
|
noteInputSlot,
|
|
24
25
|
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
25
26
|
style
|
|
26
|
-
}) {
|
|
27
|
+
}, ref) {
|
|
27
28
|
const {
|
|
28
29
|
modes: globalModes
|
|
29
30
|
} = (0, _JFSThemeProvider.useTokens)();
|
|
@@ -77,7 +78,9 @@ function AmountInput({
|
|
|
77
78
|
return noteInputSlot;
|
|
78
79
|
};
|
|
79
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
81
|
+
ref: ref,
|
|
80
82
|
style: containerStyle,
|
|
81
83
|
children: [renderMoneyValueSlot(), renderNoteInputSlot()]
|
|
82
84
|
});
|
|
83
|
-
}
|
|
85
|
+
});
|
|
86
|
+
var _default = exports.default = AmountInput;
|
|
@@ -11,6 +11,13 @@ var _MoneyValue = _interopRequireDefault(require("../MoneyValue/MoneyValue"));
|
|
|
11
11
|
var _reactUtils = require("../../utils/react-utils");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
// The Balance design renders its money value at the 36 px / 900-weight scale.
|
|
15
|
+
// The `moneyValue/*` tokens alias into the `Context3` collection, where the
|
|
16
|
+
// `Balance & Cards` mode supplies those larger values. Applied *before* the
|
|
17
|
+
// caller's `modes` so any consumer can still override individual keys.
|
|
18
|
+
const DEFAULT_MONEY_VALUE_MODES = {
|
|
19
|
+
Context3: 'Balance & Cards'
|
|
20
|
+
};
|
|
14
21
|
/**
|
|
15
22
|
* Balance component that displays a title and a monetary value.
|
|
16
23
|
*
|
|
@@ -34,7 +41,7 @@ function Balance({
|
|
|
34
41
|
// Title styles
|
|
35
42
|
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('balance/title/foreground', modes) ?? '#0c0d10';
|
|
36
43
|
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontSize', modes) ?? 14;
|
|
37
|
-
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontFamily', modes) ?? '
|
|
44
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontFamily', modes) ?? 'JioType Var';
|
|
38
45
|
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('balance/title/lineHeight', modes) ?? 18;
|
|
39
46
|
const titleFontWeightValue = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontWeight', modes) ?? 500;
|
|
40
47
|
const titleFontWeight = typeof titleFontWeightValue === 'number' ? titleFontWeightValue.toString() : titleFontWeightValue;
|
|
@@ -51,15 +58,13 @@ function Balance({
|
|
|
51
58
|
fontWeight: titleFontWeight
|
|
52
59
|
};
|
|
53
60
|
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return child;
|
|
62
|
-
});
|
|
61
|
+
// The money value renders at the Balance & Cards scale. Merge the default
|
|
62
|
+
// context mode first so the caller's `modes` can still override it, and
|
|
63
|
+
// force that context onto any slotted children so custom money values match.
|
|
64
|
+
const moneyValueModes = {
|
|
65
|
+
...DEFAULT_MONEY_VALUE_MODES,
|
|
66
|
+
...modes
|
|
67
|
+
};
|
|
63
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
64
69
|
style: [containerStyle, style],
|
|
65
70
|
"data-node-id": "1986:6203",
|
|
@@ -67,10 +72,10 @@ function Balance({
|
|
|
67
72
|
style: titleStyle,
|
|
68
73
|
"data-node-id": "1986:2613",
|
|
69
74
|
children: title
|
|
70
|
-
}), children ?
|
|
75
|
+
}), children ? (0, _reactUtils.cloneChildrenWithModes)(children, modes, DEFAULT_MONEY_VALUE_MODES) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_MoneyValue.default, {
|
|
71
76
|
value: amount,
|
|
72
77
|
currency: currency,
|
|
73
|
-
modes:
|
|
78
|
+
modes: moneyValueModes
|
|
74
79
|
})]
|
|
75
80
|
});
|
|
76
81
|
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
11
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
12
|
+
var _Text = _interopRequireDefault(require("../Text/Text"));
|
|
13
|
+
var _ListItem = _interopRequireDefault(require("../ListItem/ListItem"));
|
|
14
|
+
var _Divider = _interopRequireDefault(require("../Divider/Divider"));
|
|
15
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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); }
|
|
19
|
+
/**
|
|
20
|
+
* A single benefit row rendered with the shared `ListItem` primitive: a
|
|
21
|
+
* leading icon, a title and an optional right-aligned trailing value.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* BenefitCard — Figma node 5352:1077 ("Benefit Card").
|
|
26
|
+
*
|
|
27
|
+
* A white, rounded card that summarises the rewards a user will earn. It is
|
|
28
|
+
* composed entirely from the shared design-system primitives so it stays in
|
|
29
|
+
* sync with the rest of the library:
|
|
30
|
+
*
|
|
31
|
+
* - **Header** — a section title + a single highlighted {@link ListItem}
|
|
32
|
+
* (leading `Icon`, title, right-aligned trailing value) followed by a
|
|
33
|
+
* `Divider`.
|
|
34
|
+
* - **Body** — a section title + a column of benefit {@link ListItem}s. The
|
|
35
|
+
* list is a real slot: pass `children` to fully control it, or `items` for
|
|
36
|
+
* the declarative path.
|
|
37
|
+
* - **CTA** — a small {@link Button} (Figma `Button / Size = S`).
|
|
38
|
+
*
|
|
39
|
+
* The list rows resolve through the `List Item Style: Minimal` mode (12px /
|
|
40
|
+
* regular title, 4px gap, no padding) and the leading icons use the
|
|
41
|
+
* `AppearanceBrand: Secondary` brand color, exactly matching the design. All
|
|
42
|
+
* three defaults can be overridden via `modes`.
|
|
43
|
+
*/
|
|
44
|
+
function BenefitCard({
|
|
45
|
+
headerTitle = 'You will earn',
|
|
46
|
+
headerItem,
|
|
47
|
+
showHeader = true,
|
|
48
|
+
bodyTitle = 'Upgrade to JioFinance+ and earn more',
|
|
49
|
+
items,
|
|
50
|
+
children,
|
|
51
|
+
buttonLabel = 'Upgrade',
|
|
52
|
+
onButtonPress,
|
|
53
|
+
button,
|
|
54
|
+
showButton = true,
|
|
55
|
+
onPress,
|
|
56
|
+
width = 344,
|
|
57
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
58
|
+
style,
|
|
59
|
+
accessibilityLabel
|
|
60
|
+
}) {
|
|
61
|
+
const tokens = (0, _react.useMemo)(() => resolveTokens(modes), [modes]);
|
|
62
|
+
|
|
63
|
+
// Sub-component modes. Consumer-supplied `modes` always win via spread order.
|
|
64
|
+
const listItemModes = (0, _react.useMemo)(() => ({
|
|
65
|
+
'List Item Style': 'Minimal',
|
|
66
|
+
...modes
|
|
67
|
+
}), [modes]);
|
|
68
|
+
const iconModes = (0, _react.useMemo)(() => ({
|
|
69
|
+
AppearanceBrand: 'Secondary',
|
|
70
|
+
...modes
|
|
71
|
+
}), [modes]);
|
|
72
|
+
const trailingTextModes = (0, _react.useMemo)(() => ({
|
|
73
|
+
'Text Sizes': 'Small',
|
|
74
|
+
Weight: 'Regular',
|
|
75
|
+
...modes
|
|
76
|
+
}), [modes]);
|
|
77
|
+
const ctaModes = (0, _react.useMemo)(() => ({
|
|
78
|
+
'Button / Size': 'S',
|
|
79
|
+
...modes
|
|
80
|
+
}), [modes]);
|
|
81
|
+
const renderItem = (item, key) => {
|
|
82
|
+
const leading = item.leading ?? (item.icon != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
83
|
+
iconName: item.icon,
|
|
84
|
+
color: item.iconColor,
|
|
85
|
+
modes: iconModes
|
|
86
|
+
}) : null);
|
|
87
|
+
const trailing = item.trailing ?? (item.trailingText != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
|
|
88
|
+
modes: trailingTextModes,
|
|
89
|
+
children: item.trailingText
|
|
90
|
+
}) : undefined);
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
92
|
+
layout: "Horizontal",
|
|
93
|
+
navArrow: false,
|
|
94
|
+
showSupportText: false,
|
|
95
|
+
title: item.title,
|
|
96
|
+
leading: leading,
|
|
97
|
+
trailing: trailing,
|
|
98
|
+
onPress: item.onPress,
|
|
99
|
+
modes: listItemModes
|
|
100
|
+
}, key);
|
|
101
|
+
};
|
|
102
|
+
const headerNode = showHeader && (headerTitle != null || headerItem != null) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
103
|
+
style: styles.section,
|
|
104
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
105
|
+
style: styles.cardHeader,
|
|
106
|
+
children: [headerTitle != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
107
|
+
style: tokens.title,
|
|
108
|
+
children: headerTitle
|
|
109
|
+
}) : null, headerItem != null ? renderItem(headerItem, 'header-item') : null]
|
|
110
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, {
|
|
111
|
+
modes: modes
|
|
112
|
+
})]
|
|
113
|
+
}) : null;
|
|
114
|
+
const bodyList = children ? (0, _reactUtils.cloneChildrenWithModes)(children, listItemModes) : (items ?? DEFAULT_ITEMS).map((item, index) => renderItem(item, index));
|
|
115
|
+
const ctaNode = button ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
116
|
+
label: buttonLabel,
|
|
117
|
+
modes: ctaModes,
|
|
118
|
+
onPress: onButtonPress
|
|
119
|
+
});
|
|
120
|
+
const containerStyle = (0, _react.useMemo)(() => ({
|
|
121
|
+
...tokens.container,
|
|
122
|
+
width
|
|
123
|
+
}), [tokens.container, width]);
|
|
124
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
125
|
+
children: [headerNode, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
126
|
+
style: tokens.body,
|
|
127
|
+
children: [bodyTitle != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
128
|
+
style: tokens.title,
|
|
129
|
+
children: bodyTitle
|
|
130
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
131
|
+
style: tokens.listWrap,
|
|
132
|
+
children: bodyList
|
|
133
|
+
})]
|
|
134
|
+
}), showButton ? ctaNode : null]
|
|
135
|
+
});
|
|
136
|
+
if (onPress) {
|
|
137
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
138
|
+
style: ({
|
|
139
|
+
pressed
|
|
140
|
+
}) => [containerStyle, pressed ? styles.pressed : null, style],
|
|
141
|
+
accessibilityRole: "button",
|
|
142
|
+
accessibilityLabel: accessibilityLabel ?? headerTitle ?? bodyTitle,
|
|
143
|
+
onPress: onPress,
|
|
144
|
+
children: content
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
148
|
+
style: [containerStyle, style],
|
|
149
|
+
accessibilityLabel: accessibilityLabel,
|
|
150
|
+
children: content
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// ---------------------------------------------------------------------------
|
|
155
|
+
// Tokens / static styles
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
|
|
158
|
+
// The "card header" inner gap (title -> highlighted item) is a fixed 4px in
|
|
159
|
+
// the Figma node and has no dedicated token.
|
|
160
|
+
const CARD_HEADER_GAP = 4;
|
|
161
|
+
function asNum(raw, fallback) {
|
|
162
|
+
const n = typeof raw === 'number' ? raw : parseFloat(raw);
|
|
163
|
+
return Number.isFinite(n) ? n : fallback;
|
|
164
|
+
}
|
|
165
|
+
function asStr(raw, fallback) {
|
|
166
|
+
return raw != null ? String(raw) : fallback;
|
|
167
|
+
}
|
|
168
|
+
function resolveTokens(modes) {
|
|
169
|
+
// NOTE: token names are passed as string literals DIRECTLY to
|
|
170
|
+
// getVariableByName so the `extract-component-tokens` script can statically
|
|
171
|
+
// collect them for the generated docs. Do not refactor these into a helper
|
|
172
|
+
// that receives the name as a variable.
|
|
173
|
+
const background = asStr((0, _figmaVariablesResolver.getVariableByName)('benefitCard/background', modes), '#ffffff');
|
|
174
|
+
const paddingHorizontal = asNum((0, _figmaVariablesResolver.getVariableByName)('benefitCard/padding/horizontal', modes), 12);
|
|
175
|
+
const paddingVertical = asNum((0, _figmaVariablesResolver.getVariableByName)('benefitCard/padding/vertical', modes), 12);
|
|
176
|
+
const radius = asNum((0, _figmaVariablesResolver.getVariableByName)('benefitCard/radius', modes), 12);
|
|
177
|
+
const gap = asNum((0, _figmaVariablesResolver.getVariableByName)('benefitCard/gap', modes), 8);
|
|
178
|
+
const titleColor = asStr((0, _figmaVariablesResolver.getVariableByName)('benefitCard/title/foreground', modes), '#000000');
|
|
179
|
+
const titleSize = asNum((0, _figmaVariablesResolver.getVariableByName)('benefitCard/title/fontsize', modes), 14);
|
|
180
|
+
const titleFamily = asStr((0, _figmaVariablesResolver.getVariableByName)('benefitCard/title/fontFamily', modes), 'JioType Var');
|
|
181
|
+
const titleWeight = asStr((0, _figmaVariablesResolver.getVariableByName)('benefitCard/title/fontWeight', modes), '500');
|
|
182
|
+
return {
|
|
183
|
+
container: {
|
|
184
|
+
backgroundColor: background,
|
|
185
|
+
paddingHorizontal,
|
|
186
|
+
paddingVertical,
|
|
187
|
+
borderRadius: radius,
|
|
188
|
+
gap,
|
|
189
|
+
flexDirection: 'column',
|
|
190
|
+
alignItems: 'flex-start'
|
|
191
|
+
},
|
|
192
|
+
body: {
|
|
193
|
+
alignSelf: 'stretch',
|
|
194
|
+
gap
|
|
195
|
+
},
|
|
196
|
+
listWrap: {
|
|
197
|
+
alignSelf: 'stretch',
|
|
198
|
+
gap
|
|
199
|
+
},
|
|
200
|
+
title: {
|
|
201
|
+
color: titleColor,
|
|
202
|
+
fontSize: titleSize,
|
|
203
|
+
fontFamily: titleFamily,
|
|
204
|
+
fontWeight: titleWeight,
|
|
205
|
+
lineHeight: 20,
|
|
206
|
+
letterSpacing: -0.5,
|
|
207
|
+
includeFontPadding: false
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
const DEFAULT_ITEMS = [{
|
|
212
|
+
icon: 'ic_card',
|
|
213
|
+
title: 'Up to ₹5000 cashback'
|
|
214
|
+
}, {
|
|
215
|
+
icon: 'ic_card',
|
|
216
|
+
title: '25% extra JioPoints'
|
|
217
|
+
}];
|
|
218
|
+
const styles = _reactNative.StyleSheet.create({
|
|
219
|
+
section: {
|
|
220
|
+
alignSelf: 'stretch',
|
|
221
|
+
gap: 8
|
|
222
|
+
},
|
|
223
|
+
cardHeader: {
|
|
224
|
+
alignSelf: 'stretch',
|
|
225
|
+
gap: CARD_HEADER_GAP
|
|
226
|
+
},
|
|
227
|
+
pressed: {
|
|
228
|
+
opacity: 0.92
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
var _default = exports.default = BenefitCard;
|
|
@@ -15,7 +15,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
15
15
|
* Context to share 'modes' with child components like Card.Title and Card.SupportText.
|
|
16
16
|
* This ensures that nested components can resolve their tokens correctly without
|
|
17
17
|
* needing explicit mode prop passing for every child.
|
|
18
|
-
*/
|
|
18
|
+
*/
|
|
19
|
+
const CardContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
19
20
|
/**
|
|
20
21
|
* Card component implementation from Figma node 765:6186.
|
|
21
22
|
*
|
|
@@ -19,7 +19,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
19
|
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); }
|
|
20
20
|
/**
|
|
21
21
|
* Context to share 'modes' with child components.
|
|
22
|
-
*/
|
|
22
|
+
*/
|
|
23
|
+
const CardFeedbackContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
23
24
|
/**
|
|
24
25
|
* CardFeedback component from Figma node 1280:4481.
|
|
25
26
|
*
|