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
|
@@ -0,0 +1,470 @@
|
|
|
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 _Badge = _interopRequireDefault(require("../Badge/Badge"));
|
|
12
|
+
var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
13
|
+
var _Image = _interopRequireDefault(require("../Image/Image"));
|
|
14
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
15
|
+
var _Title = _interopRequireDefault(require("../Title/Title"));
|
|
16
|
+
var _ListItem = _interopRequireDefault(require("../ListItem/ListItem"));
|
|
17
|
+
var _TextSegment = _interopRequireDefault(require("../TextSegment/TextSegment"));
|
|
18
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
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); }
|
|
22
|
+
/**
|
|
23
|
+
* A single coloured chip rendered in the card header. Each badge resolves its
|
|
24
|
+
* own design tokens through `modes`, so different appearances (brand, tonal,
|
|
25
|
+
* etc.) can sit side-by-side in the same group.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A single benefit row in the card's list, rendered through the shared
|
|
30
|
+
* {@link ListItem} primitive (leading icon + title).
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* CcCard — Figma node 5434:1992 ("Cc Card").
|
|
35
|
+
*
|
|
36
|
+
* A white, rounded credit-card product card composed entirely from the shared
|
|
37
|
+
* design-system primitives so it stays in sync with the rest of the library:
|
|
38
|
+
*
|
|
39
|
+
* - **Header** — two {@link Badge} groups (a leading group + a right-aligned
|
|
40
|
+
* trailing group), e.g. `Pre-qualified` / `Lifetime free`.
|
|
41
|
+
* - **Media** — a product `Image` + a {@link Title} (title + subtitle resolved
|
|
42
|
+
* through the `context7: Card` mode → 14px/12px).
|
|
43
|
+
* - **List** — a column of benefit {@link ListItem}s (`List Item Style:
|
|
44
|
+
* Minimal`) with leading icons.
|
|
45
|
+
* - **Nudge** — an inline upsell row: an {@link Avatar} + a {@link TextSegment}.
|
|
46
|
+
* - **Footer** — a headline + description + subtitle text block alongside a
|
|
47
|
+
* small {@link Button} (`Button / Size: S`, `AppearanceBrand: Secondary`).
|
|
48
|
+
*
|
|
49
|
+
* The {@link CcCardProps.compact} variant collapses the card to just the
|
|
50
|
+
* leading avatar slot + the footer text block (no CTA button). All defaults can
|
|
51
|
+
* be overridden via `modes`.
|
|
52
|
+
*/
|
|
53
|
+
function CcCard({
|
|
54
|
+
compact = false,
|
|
55
|
+
showHeader = true,
|
|
56
|
+
badges = DEFAULT_BADGES,
|
|
57
|
+
trailingBadges,
|
|
58
|
+
header,
|
|
59
|
+
imageSource,
|
|
60
|
+
imageWidth = 88,
|
|
61
|
+
imageHeight = 54,
|
|
62
|
+
title = 'Title',
|
|
63
|
+
subtitle = 'Subtitle',
|
|
64
|
+
media,
|
|
65
|
+
items = DEFAULT_ITEMS,
|
|
66
|
+
showNudge = true,
|
|
67
|
+
nudgeSegments = DEFAULT_NUDGE_SEGMENTS,
|
|
68
|
+
nudgeAvatarSource,
|
|
69
|
+
nudge,
|
|
70
|
+
headline = 'Headline',
|
|
71
|
+
description = 'Description',
|
|
72
|
+
footerSubtitle = 'Subtitle',
|
|
73
|
+
footer,
|
|
74
|
+
buttonLabel = 'Button',
|
|
75
|
+
onButtonPress,
|
|
76
|
+
button,
|
|
77
|
+
showButton = true,
|
|
78
|
+
onPress,
|
|
79
|
+
width = 343,
|
|
80
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
81
|
+
style,
|
|
82
|
+
accessibilityLabel
|
|
83
|
+
}) {
|
|
84
|
+
const tokens = (0, _react.useMemo)(() => resolveTokens(modes), [modes]);
|
|
85
|
+
|
|
86
|
+
// The product title uses the card-sized type ramp (14px bold + 12px
|
|
87
|
+
// subtitle) via the `context7: Card` mode. Consumer modes still win.
|
|
88
|
+
const titleModes = (0, _react.useMemo)(() => ({
|
|
89
|
+
context7: 'Card',
|
|
90
|
+
...modes
|
|
91
|
+
}), [modes]);
|
|
92
|
+
// List rows use the minimal style (12px / regular, no padding).
|
|
93
|
+
const listItemModes = (0, _react.useMemo)(() => ({
|
|
94
|
+
'List Item Style': 'Minimal',
|
|
95
|
+
...modes
|
|
96
|
+
}), [modes]);
|
|
97
|
+
// The nudge avatar is the smallest size token.
|
|
98
|
+
const nudgeAvatarModes = (0, _react.useMemo)(() => ({
|
|
99
|
+
'Avatar Size': 'XS',
|
|
100
|
+
...modes
|
|
101
|
+
}), [modes]);
|
|
102
|
+
// The CTA is the small, brand-secondary (lilac→purple) button.
|
|
103
|
+
const ctaModes = (0, _react.useMemo)(() => ({
|
|
104
|
+
AppearanceBrand: 'Secondary',
|
|
105
|
+
'Button / Size': 'S',
|
|
106
|
+
...modes
|
|
107
|
+
}), [modes]);
|
|
108
|
+
|
|
109
|
+
// ---- Header -----------------------------------------------------------
|
|
110
|
+
const headerNode = header ? (0, _reactUtils.cloneChildrenWithModes)(header, modes) : showHeader && (badges?.length || trailingBadges?.length) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
111
|
+
style: styles.header,
|
|
112
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeGroup, {
|
|
113
|
+
badges: badges,
|
|
114
|
+
modes: modes
|
|
115
|
+
}), trailingBadges?.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeGroup, {
|
|
116
|
+
badges: trailingBadges,
|
|
117
|
+
modes: modes
|
|
118
|
+
}) : null]
|
|
119
|
+
}) : null;
|
|
120
|
+
|
|
121
|
+
// ---- Media slot (shared by both compact + non-compact) ----------------
|
|
122
|
+
// Whatever lives in the slot is rendered identically in both variants; only
|
|
123
|
+
// the surrounding sections differ. The default is an Image driven by
|
|
124
|
+
// `imageSource`, but a consumer can pass an Avatar (or any node) via `media`.
|
|
125
|
+
const mediaSlotContent = media ? (0, _reactUtils.cloneChildrenWithModes)(media, modes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
|
|
126
|
+
imageSource: imageSource,
|
|
127
|
+
width: imageWidth,
|
|
128
|
+
height: imageHeight,
|
|
129
|
+
borderRadius: tokens.imageRadius,
|
|
130
|
+
resizeMode: "cover",
|
|
131
|
+
accessibilityElementsHidden: true,
|
|
132
|
+
importantForAccessibility: "no"
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// Non-compact lays the slot out in a row next to the product Title.
|
|
136
|
+
const mediaRow = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
137
|
+
style: styles.mediaSlot,
|
|
138
|
+
children: [mediaSlotContent, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
139
|
+
style: styles.titleWrap,
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Title.default, {
|
|
141
|
+
title: title,
|
|
142
|
+
subtitle: subtitle,
|
|
143
|
+
textAlign: "Left",
|
|
144
|
+
modes: titleModes,
|
|
145
|
+
style: styles.titleInner
|
|
146
|
+
})
|
|
147
|
+
})]
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// ---- List -------------------------------------------------------------
|
|
151
|
+
const listNode = items.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
152
|
+
style: tokens.listGroup,
|
|
153
|
+
children: items.map((item, index) => {
|
|
154
|
+
const leading = item.leading ?? (item.icon !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
155
|
+
iconName: item.icon ?? 'ic_card',
|
|
156
|
+
color: item.iconColor,
|
|
157
|
+
modes: listItemModes
|
|
158
|
+
}) : null);
|
|
159
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
160
|
+
layout: "Horizontal",
|
|
161
|
+
navArrow: false,
|
|
162
|
+
showSupportText: false,
|
|
163
|
+
title: item.title,
|
|
164
|
+
leading: leading,
|
|
165
|
+
onPress: item.onPress,
|
|
166
|
+
modes: listItemModes
|
|
167
|
+
}, index);
|
|
168
|
+
})
|
|
169
|
+
}) : null;
|
|
170
|
+
|
|
171
|
+
// ---- Nudge ------------------------------------------------------------
|
|
172
|
+
const nudgeNode = nudge ? (0, _reactUtils.cloneChildrenWithModes)(nudge, modes) : showNudge ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
173
|
+
style: tokens.nudge,
|
|
174
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
175
|
+
imageSource: nudgeAvatarSource,
|
|
176
|
+
modes: nudgeAvatarModes
|
|
177
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
178
|
+
style: styles.nudgeContent,
|
|
179
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextSegment.default, {
|
|
180
|
+
segments: nudgeSegments,
|
|
181
|
+
modes: modes
|
|
182
|
+
})
|
|
183
|
+
})]
|
|
184
|
+
}) : null;
|
|
185
|
+
|
|
186
|
+
// ---- Footer -----------------------------------------------------------
|
|
187
|
+
const ctaNode = button ? (0, _reactUtils.cloneChildrenWithModes)(button, ctaModes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
188
|
+
label: buttonLabel,
|
|
189
|
+
modes: ctaModes,
|
|
190
|
+
onPress: onButtonPress
|
|
191
|
+
});
|
|
192
|
+
const footerTextBlock = footer ? (0, _reactUtils.cloneChildrenWithModes)(footer, modes) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
193
|
+
style: tokens.footerTextWrap,
|
|
194
|
+
children: [headline != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
195
|
+
style: tokens.headline,
|
|
196
|
+
children: headline
|
|
197
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
198
|
+
style: compact ? tokens.titleWrapCompact : tokens.titleWrapDefault,
|
|
199
|
+
children: [description != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
200
|
+
style: tokens.footerTitle,
|
|
201
|
+
children: description
|
|
202
|
+
}) : null, footerSubtitle != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
203
|
+
style: tokens.footerSubtitle,
|
|
204
|
+
children: footerSubtitle
|
|
205
|
+
}) : null]
|
|
206
|
+
})]
|
|
207
|
+
});
|
|
208
|
+
const footerNode = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
209
|
+
style: compact ? tokens.footerRowCompact : tokens.footerRowDefault,
|
|
210
|
+
children: [footerTextBlock, !compact && showButton ? ctaNode : null]
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// ---- Compose ----------------------------------------------------------
|
|
214
|
+
const content = compact ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
215
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
216
|
+
style: styles.compactSlot,
|
|
217
|
+
children: mediaSlotContent
|
|
218
|
+
}), footerNode]
|
|
219
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
220
|
+
children: [headerNode, mediaRow, listNode, nudgeNode, footerNode]
|
|
221
|
+
});
|
|
222
|
+
const containerStyle = (0, _react.useMemo)(() => ({
|
|
223
|
+
...tokens.container,
|
|
224
|
+
width
|
|
225
|
+
}), [tokens.container, width]);
|
|
226
|
+
if (onPress) {
|
|
227
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
228
|
+
style: ({
|
|
229
|
+
pressed
|
|
230
|
+
}) => [containerStyle, pressed ? styles.pressed : null, style],
|
|
231
|
+
accessibilityRole: "button",
|
|
232
|
+
accessibilityLabel: accessibilityLabel ?? title,
|
|
233
|
+
onPress: onPress,
|
|
234
|
+
children: content
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
238
|
+
style: [containerStyle, style],
|
|
239
|
+
accessibilityLabel: accessibilityLabel,
|
|
240
|
+
children: content
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
// BadgeGroup — internal wrapping row of badges
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
|
|
248
|
+
function BadgeGroup({
|
|
249
|
+
badges,
|
|
250
|
+
modes
|
|
251
|
+
}) {
|
|
252
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
253
|
+
style: styles.badgeGroup,
|
|
254
|
+
children: badges.map((badge, index) => {
|
|
255
|
+
const badgeModes = badge.modes ? {
|
|
256
|
+
...modes,
|
|
257
|
+
...badge.modes
|
|
258
|
+
} : modes;
|
|
259
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
260
|
+
label: badge.label,
|
|
261
|
+
modes: badgeModes,
|
|
262
|
+
style: badge.color ? {
|
|
263
|
+
backgroundColor: badge.color
|
|
264
|
+
} : undefined,
|
|
265
|
+
labelStyle: badge.labelColor ? {
|
|
266
|
+
color: badge.labelColor
|
|
267
|
+
} : undefined
|
|
268
|
+
}, index);
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// ---------------------------------------------------------------------------
|
|
274
|
+
// Tokens / static styles
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
|
|
277
|
+
function asNum(raw, fallback) {
|
|
278
|
+
const n = typeof raw === 'number' ? raw : parseFloat(raw);
|
|
279
|
+
return Number.isFinite(n) ? n : fallback;
|
|
280
|
+
}
|
|
281
|
+
function asStr(raw, fallback) {
|
|
282
|
+
return raw != null ? String(raw) : fallback;
|
|
283
|
+
}
|
|
284
|
+
function resolveTokens(modes) {
|
|
285
|
+
// NOTE: token names are passed as string literals DIRECTLY to
|
|
286
|
+
// getVariableByName so the `extract-component-tokens` script can statically
|
|
287
|
+
// collect them for the generated docs. Do not refactor these into a helper
|
|
288
|
+
// that receives the name as a variable.
|
|
289
|
+
const background = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/bg', modes), '#ffffff');
|
|
290
|
+
const borderColor = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/border/color', modes), '#e3e4e4');
|
|
291
|
+
const borderWidth = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/border/size', modes), 1);
|
|
292
|
+
const radius = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/radius', modes), 12);
|
|
293
|
+
const paddingHorizontal = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/padding/horizontal', modes), 12);
|
|
294
|
+
const paddingVertical = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/padding/vertical', modes), 12);
|
|
295
|
+
const gap = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/padding/gap', modes), 8);
|
|
296
|
+
const imageRadius = asNum((0, _figmaVariablesResolver.getVariableByName)('image/radius', modes), 0);
|
|
297
|
+
const listGroupGap = asNum((0, _figmaVariablesResolver.getVariableByName)('listGroup/gap', modes), 4);
|
|
298
|
+
const nudgeGap = asNum((0, _figmaVariablesResolver.getVariableByName)('nudge/gap', modes), 6);
|
|
299
|
+
const footerGap = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/footer/gap', modes), 8);
|
|
300
|
+
const textWrapGap = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/footer/textWrap/gap', modes), 4);
|
|
301
|
+
const titleWrapGap = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/footer/titleWrap/gap', modes), 8);
|
|
302
|
+
const headlineColor = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/headline/color', modes), '#707275');
|
|
303
|
+
const headlineSize = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/headline/fontSize', modes), 10);
|
|
304
|
+
const headlineFamily = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/headline/fontFamily', modes), 'JioType Var');
|
|
305
|
+
const headlineLineHeight = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/headline/lineHeight', modes), 13);
|
|
306
|
+
const headlineWeight = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/headline/fontWeight', modes), '500');
|
|
307
|
+
const titleColor = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/title/color', modes), '#081007');
|
|
308
|
+
const titleSize = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/title/fontSize', modes), 14);
|
|
309
|
+
const titleFamily = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/title/fontFamily', modes), 'JioType Var');
|
|
310
|
+
const titleLineHeight = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/title/lineHeight', modes), 15);
|
|
311
|
+
const titleWeight = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/title/fontWeight', modes), '700');
|
|
312
|
+
const subtitleColor = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/subtitle/color', modes), '#707275');
|
|
313
|
+
const subtitleSize = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/subtitle/fontSize', modes), 10);
|
|
314
|
+
const subtitleFamily = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/subtitle/fontFamily', modes), 'JioType Var');
|
|
315
|
+
const subtitleLineHeight = asNum((0, _figmaVariablesResolver.getVariableByName)('ccCard/subtitle/lineHeight', modes), 13);
|
|
316
|
+
const subtitleWeight = asStr((0, _figmaVariablesResolver.getVariableByName)('ccCard/subtitle/fontWeight', modes), '500');
|
|
317
|
+
return {
|
|
318
|
+
container: {
|
|
319
|
+
backgroundColor: background,
|
|
320
|
+
borderColor,
|
|
321
|
+
borderWidth,
|
|
322
|
+
borderRadius: radius,
|
|
323
|
+
paddingHorizontal,
|
|
324
|
+
paddingVertical,
|
|
325
|
+
gap,
|
|
326
|
+
flexDirection: 'column',
|
|
327
|
+
alignItems: 'flex-start',
|
|
328
|
+
overflow: 'hidden'
|
|
329
|
+
},
|
|
330
|
+
imageRadius,
|
|
331
|
+
listGroup: {
|
|
332
|
+
alignSelf: 'stretch',
|
|
333
|
+
gap: listGroupGap
|
|
334
|
+
},
|
|
335
|
+
nudge: {
|
|
336
|
+
alignSelf: 'stretch',
|
|
337
|
+
flexDirection: 'row',
|
|
338
|
+
alignItems: 'center',
|
|
339
|
+
gap: nudgeGap
|
|
340
|
+
},
|
|
341
|
+
footerRowDefault: {
|
|
342
|
+
alignSelf: 'stretch',
|
|
343
|
+
flexDirection: 'row',
|
|
344
|
+
alignItems: 'flex-end',
|
|
345
|
+
gap: footerGap
|
|
346
|
+
},
|
|
347
|
+
footerRowCompact: {
|
|
348
|
+
alignSelf: 'stretch',
|
|
349
|
+
flexDirection: 'row',
|
|
350
|
+
alignItems: 'center'
|
|
351
|
+
},
|
|
352
|
+
footerTextWrap: {
|
|
353
|
+
flex: 1,
|
|
354
|
+
minWidth: 1,
|
|
355
|
+
alignItems: 'flex-start',
|
|
356
|
+
gap: textWrapGap
|
|
357
|
+
},
|
|
358
|
+
titleWrapDefault: {
|
|
359
|
+
flexDirection: 'row',
|
|
360
|
+
alignItems: 'flex-end',
|
|
361
|
+
gap: textWrapGap
|
|
362
|
+
},
|
|
363
|
+
titleWrapCompact: {
|
|
364
|
+
flexDirection: 'row',
|
|
365
|
+
alignItems: 'flex-end',
|
|
366
|
+
gap: titleWrapGap
|
|
367
|
+
},
|
|
368
|
+
headline: {
|
|
369
|
+
color: headlineColor,
|
|
370
|
+
fontSize: headlineSize,
|
|
371
|
+
fontFamily: headlineFamily,
|
|
372
|
+
fontWeight: headlineWeight,
|
|
373
|
+
lineHeight: Math.max(headlineLineHeight, Math.ceil(headlineSize * 1.2)),
|
|
374
|
+
includeFontPadding: false
|
|
375
|
+
},
|
|
376
|
+
footerTitle: {
|
|
377
|
+
color: titleColor,
|
|
378
|
+
fontSize: titleSize,
|
|
379
|
+
fontFamily: titleFamily,
|
|
380
|
+
fontWeight: titleWeight,
|
|
381
|
+
lineHeight: Math.max(titleLineHeight, Math.ceil(titleSize * 1.2)),
|
|
382
|
+
includeFontPadding: false
|
|
383
|
+
},
|
|
384
|
+
footerSubtitle: {
|
|
385
|
+
color: subtitleColor,
|
|
386
|
+
fontSize: subtitleSize,
|
|
387
|
+
fontFamily: subtitleFamily,
|
|
388
|
+
fontWeight: subtitleWeight,
|
|
389
|
+
lineHeight: Math.max(subtitleLineHeight, Math.ceil(subtitleSize * 1.2)),
|
|
390
|
+
includeFontPadding: false
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
const DEFAULT_BADGES = [{
|
|
395
|
+
label: 'Pre-qualified',
|
|
396
|
+
modes: {
|
|
397
|
+
AppearanceBrand: 'Tertiary'
|
|
398
|
+
},
|
|
399
|
+
labelColor: '#ffffff'
|
|
400
|
+
}, {
|
|
401
|
+
label: 'Lifetime free',
|
|
402
|
+
modes: {
|
|
403
|
+
AppearanceBrand: 'Tertiary'
|
|
404
|
+
},
|
|
405
|
+
labelColor: '#ffffff'
|
|
406
|
+
}];
|
|
407
|
+
const DEFAULT_ITEMS = [{
|
|
408
|
+
icon: 'ic_card',
|
|
409
|
+
title: '4 domestic + 2 intl. lounge access yearly'
|
|
410
|
+
}, {
|
|
411
|
+
icon: 'ic_card',
|
|
412
|
+
title: '5% cashback on dining & travel'
|
|
413
|
+
}, {
|
|
414
|
+
icon: 'ic_card',
|
|
415
|
+
title: 'No annual fee for the first year'
|
|
416
|
+
}];
|
|
417
|
+
const DEFAULT_NUDGE_SEGMENTS = [{
|
|
418
|
+
text: 'Upsell message '
|
|
419
|
+
}, {
|
|
420
|
+
text: 'JioFinance+',
|
|
421
|
+
modes: {
|
|
422
|
+
'Text Appearance': 'Primary'
|
|
423
|
+
}
|
|
424
|
+
}];
|
|
425
|
+
const styles = _reactNative.StyleSheet.create({
|
|
426
|
+
header: {
|
|
427
|
+
alignSelf: 'stretch',
|
|
428
|
+
flexDirection: 'row',
|
|
429
|
+
alignItems: 'flex-start',
|
|
430
|
+
justifyContent: 'space-between',
|
|
431
|
+
gap: 8
|
|
432
|
+
},
|
|
433
|
+
badgeGroup: {
|
|
434
|
+
flexDirection: 'row',
|
|
435
|
+
flexWrap: 'wrap',
|
|
436
|
+
alignItems: 'center',
|
|
437
|
+
gap: 4,
|
|
438
|
+
flexShrink: 1
|
|
439
|
+
},
|
|
440
|
+
mediaSlot: {
|
|
441
|
+
alignSelf: 'stretch',
|
|
442
|
+
flexDirection: 'row',
|
|
443
|
+
alignItems: 'center',
|
|
444
|
+
gap: 8
|
|
445
|
+
},
|
|
446
|
+
titleWrap: {
|
|
447
|
+
flex: 1,
|
|
448
|
+
minWidth: 1
|
|
449
|
+
},
|
|
450
|
+
// The shared Title falls back to 16/8 padding when its tokens resolve to 0
|
|
451
|
+
// (0 is falsy). Zero it out so the only horizontal gap to the media slot is
|
|
452
|
+
// the mediaSlot's hard-coded 8px.
|
|
453
|
+
titleInner: {
|
|
454
|
+
paddingHorizontal: 0,
|
|
455
|
+
paddingVertical: 0
|
|
456
|
+
},
|
|
457
|
+
// Compact media wrapper hugs its child so the slot sizes to the avatar /
|
|
458
|
+
// image's intrinsic dimensions instead of stretching to the card width.
|
|
459
|
+
compactSlot: {
|
|
460
|
+
alignSelf: 'flex-start'
|
|
461
|
+
},
|
|
462
|
+
nudgeContent: {
|
|
463
|
+
flex: 1,
|
|
464
|
+
minWidth: 1
|
|
465
|
+
},
|
|
466
|
+
pressed: {
|
|
467
|
+
opacity: 0.92
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
var _default = exports.default = CcCard;
|
|
@@ -15,7 +15,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
15
15
|
* Tracks whether the last user interaction was a keyboard event (Tab).
|
|
16
16
|
* Capture-phase document listeners fire before any element-level handlers,
|
|
17
17
|
* so the flag is always up-to-date when onFocus runs.
|
|
18
|
-
*/
|
|
18
|
+
*/
|
|
19
|
+
function useFocusVisible() {
|
|
19
20
|
const [isFocusVisible, setIsFocusVisible] = (0, _react.useState)(false);
|
|
20
21
|
const hadKeyboardEventRef = (0, _react.useRef)(false);
|
|
21
22
|
(0, _react.useEffect)(() => {
|
|
@@ -82,7 +83,7 @@ function invisibleTouchHitSlop(checkboxSize) {
|
|
|
82
83
|
* @component
|
|
83
84
|
* @param {CheckboxProps} props
|
|
84
85
|
*/
|
|
85
|
-
function Checkbox({
|
|
86
|
+
const Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function Checkbox({
|
|
86
87
|
checked: controlledChecked,
|
|
87
88
|
defaultChecked = false,
|
|
88
89
|
onValueChange,
|
|
@@ -90,7 +91,7 @@ function Checkbox({
|
|
|
90
91
|
modes = _reactUtils.EMPTY_MODES,
|
|
91
92
|
style,
|
|
92
93
|
accessibilityLabel
|
|
93
|
-
}) {
|
|
94
|
+
}, ref) {
|
|
94
95
|
const isControlled = controlledChecked !== undefined;
|
|
95
96
|
const [internalChecked, setInternalChecked] = (0, _react.useState)(defaultChecked);
|
|
96
97
|
const isChecked = isControlled ? controlledChecked : internalChecked;
|
|
@@ -198,6 +199,7 @@ function Checkbox({
|
|
|
198
199
|
const markColor = disabled && isChecked ? disabledActiveMark : selectedMarkColor;
|
|
199
200
|
const hitSlop = invisibleTouchHitSlop(size);
|
|
200
201
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
202
|
+
ref: ref,
|
|
201
203
|
style: [touchTargetStyle, style],
|
|
202
204
|
hitSlop: hitSlop,
|
|
203
205
|
onPress: handlePress,
|
|
@@ -225,7 +227,7 @@ function Checkbox({
|
|
|
225
227
|
})
|
|
226
228
|
})
|
|
227
229
|
});
|
|
228
|
-
}
|
|
230
|
+
});
|
|
229
231
|
function boxShadow(value) {
|
|
230
232
|
if (_reactNative.Platform.OS === 'web') {
|
|
231
233
|
return {
|
|
@@ -39,7 +39,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
39
39
|
* />
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
function CheckboxItem({
|
|
42
|
+
const CheckboxItem = /*#__PURE__*/(0, _react.forwardRef)(function CheckboxItem({
|
|
43
43
|
checked: controlledChecked,
|
|
44
44
|
defaultChecked = false,
|
|
45
45
|
onValueChange,
|
|
@@ -52,7 +52,7 @@ function CheckboxItem({
|
|
|
52
52
|
style,
|
|
53
53
|
labelStyle,
|
|
54
54
|
accessibilityLabel
|
|
55
|
-
}) {
|
|
55
|
+
}, ref) {
|
|
56
56
|
const isTrailing = control === 'trailing';
|
|
57
57
|
const isControlled = controlledChecked !== undefined;
|
|
58
58
|
const [internalChecked, setInternalChecked] = (0, _react.useState)(defaultChecked);
|
|
@@ -121,6 +121,7 @@ function CheckboxItem({
|
|
|
121
121
|
children: (0, _reactUtils.cloneChildrenWithModes)(endSlot, modes)
|
|
122
122
|
}) : null;
|
|
123
123
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
124
|
+
ref: ref,
|
|
124
125
|
style: [containerStyle, style],
|
|
125
126
|
onPress: handleToggle,
|
|
126
127
|
disabled: disabled,
|
|
@@ -136,5 +137,5 @@ function CheckboxItem({
|
|
|
136
137
|
children: [checkboxNode, labelNode, endSlotNode]
|
|
137
138
|
})
|
|
138
139
|
});
|
|
139
|
-
}
|
|
140
|
+
});
|
|
140
141
|
var _default = exports.default = CheckboxItem;
|