jfs-components 0.0.5 → 0.0.7
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/lib/commonjs/components/Accordion/Accordion.mdx +1 -1
- package/lib/commonjs/components/ActionFooter/ActionFooter.js +2 -14
- package/lib/commonjs/components/ActionFooter/ActionFooter.js.map +1 -1
- package/lib/commonjs/components/ActionFooter/ActionFooter.mdx +1 -1
- package/lib/commonjs/components/ActionTile/ActionTile.js +10 -1
- package/lib/commonjs/components/ActionTile/ActionTile.js.map +1 -1
- package/lib/commonjs/components/ActionTile/ActionTile.mdx +5 -1
- package/lib/commonjs/components/AppBar/AppBar.js +109 -231
- package/lib/commonjs/components/AppBar/AppBar.js.map +1 -1
- package/lib/commonjs/components/AppBar/AppBar.mdx +51 -39
- package/lib/commonjs/components/Avatar/Avatar.mdx +9 -1
- package/lib/commonjs/components/AvatarGroup/AvatarGroup.mdx +9 -1
- package/lib/commonjs/components/Badge/Badge.mdx +1 -1
- package/lib/commonjs/components/Balance/Balance.js +77 -0
- package/lib/commonjs/components/Balance/Balance.js.map +1 -0
- package/lib/commonjs/components/Balance/Balance.mdx +62 -0
- package/lib/commonjs/components/BottomNav/BottomNav.js +9 -1
- package/lib/commonjs/components/BottomNav/BottomNav.js.map +1 -1
- package/lib/commonjs/components/BottomNav/BottomNav.mdx +5 -1
- package/lib/commonjs/components/BottomNavItem/BottomNavItem.js +9 -1
- package/lib/commonjs/components/BottomNavItem/BottomNavItem.js.map +1 -1
- package/lib/commonjs/components/BottomNavItem/BottomNavItem.mdx +5 -1
- package/lib/commonjs/components/Button/Button.mdx +5 -1
- package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +64 -0
- package/lib/commonjs/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/lib/commonjs/components/ButtonGroup/ButtonGroup.mdx +56 -0
- package/lib/commonjs/components/Card/Card.mdx +1 -1
- package/lib/commonjs/components/CardFeedback/CardFeedback.mdx +5 -1
- package/lib/commonjs/components/ChipGroup/ChipGroup.js +54 -0
- package/lib/commonjs/components/ChipGroup/ChipGroup.js.map +1 -0
- package/lib/commonjs/components/ChipGroup/ChipGroup.mdx +40 -0
- package/lib/commonjs/components/ChipSelect/ChipSelect.js +103 -0
- package/lib/commonjs/components/ChipSelect/ChipSelect.js.map +1 -0
- package/lib/commonjs/components/ChipSelect/ChipSelect.mdx +80 -0
- package/lib/commonjs/components/CtaCard/CtaCard.js +15 -20
- package/lib/commonjs/components/CtaCard/CtaCard.js.map +1 -1
- package/lib/commonjs/components/CtaCard/CtaCard.mdx +1 -1
- package/lib/commonjs/components/Disclaimer/Disclaimer.js +9 -1
- package/lib/commonjs/components/Disclaimer/Disclaimer.js.map +1 -1
- package/lib/commonjs/components/Disclaimer/Disclaimer.mdx +5 -1
- package/lib/commonjs/components/Divider/Divider.mdx +5 -1
- package/lib/commonjs/components/Drawer/Drawer.mdx +9 -1
- package/lib/commonjs/components/EmptyState/EmptyState.js +138 -0
- package/lib/commonjs/components/EmptyState/EmptyState.js.map +1 -0
- package/lib/commonjs/components/EmptyState/EmptyState.mdx +73 -0
- package/lib/commonjs/components/FilterBar/FilterBar.mdx +1 -1
- package/lib/commonjs/components/HStack/HStack.js +67 -0
- package/lib/commonjs/components/HStack/HStack.js.map +1 -0
- package/lib/commonjs/components/HStack/HStack.mdx +44 -0
- package/lib/commonjs/components/IconButton/IconButton.mdx +5 -1
- package/lib/commonjs/components/IconCapsule/IconCapsule.js +12 -4
- package/lib/commonjs/components/IconCapsule/IconCapsule.js.map +1 -1
- package/lib/commonjs/components/IconCapsule/IconCapsule.mdx +12 -4
- package/lib/commonjs/components/Introduction.mdx +3 -98
- package/lib/commonjs/components/LazyList/LazyList.mdx +1 -1
- package/lib/commonjs/components/ListGroup/ListGroup.js +3 -30
- package/lib/commonjs/components/ListGroup/ListGroup.js.map +1 -1
- package/lib/commonjs/components/ListGroup/ListGroup.mdx +5 -1
- package/lib/commonjs/components/ListItem/ListItem.js +5 -37
- package/lib/commonjs/components/ListItem/ListItem.js.map +1 -1
- package/lib/commonjs/components/ListItem/ListItem.mdx +5 -1
- package/lib/commonjs/components/MediaCard/MediaCard.mdx +5 -1
- package/lib/commonjs/components/MerchantProfile/MerchantProfile.mdx +1 -1
- package/lib/commonjs/components/MoneyValue/MoneyValue.mdx +6 -2
- package/lib/commonjs/components/NavArrow/NavArrow.js +42 -17
- package/lib/commonjs/components/NavArrow/NavArrow.js.map +1 -1
- package/lib/commonjs/components/NavArrow/NavArrow.mdx +5 -1
- package/lib/commonjs/components/PageTitle/PageTitle.js +10 -1
- package/lib/commonjs/components/PageTitle/PageTitle.js.map +1 -1
- package/lib/commonjs/components/PageTitle/PageTitle.mdx +5 -1
- package/lib/commonjs/components/Screen/Screen.js +53 -0
- package/lib/commonjs/components/Screen/Screen.js.map +1 -0
- package/lib/commonjs/components/Screen/Screen.mdx +58 -0
- package/lib/commonjs/components/Section/Section.js +3 -25
- package/lib/commonjs/components/Section/Section.js.map +1 -1
- package/lib/commonjs/components/Section/Section.mdx +5 -1
- package/lib/commonjs/components/Stepper/Step.mdx +5 -1
- package/lib/commonjs/components/Stepper/StepLabel.mdx +5 -1
- package/lib/commonjs/components/Stepper/Stepper.mdx +1 -1
- package/lib/commonjs/components/SupportText/SupportText.js +83 -0
- package/lib/commonjs/components/SupportText/SupportText.js.map +1 -0
- package/lib/commonjs/components/SupportText/SupportText.mdx +48 -0
- package/lib/commonjs/components/SupportText/SupportTextIcon.js +47 -0
- package/lib/commonjs/components/SupportText/SupportTextIcon.js.map +1 -0
- package/lib/commonjs/components/SupportText/SupportTextIcon.mdx +35 -0
- package/lib/commonjs/components/SupportText/index.js +21 -0
- package/lib/commonjs/components/SupportText/index.js.map +1 -0
- package/lib/commonjs/components/TextInput/TextInput.mdx +9 -1
- package/lib/commonjs/components/ThreadHero/ThreadHero.mdx +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.mdx +5 -1
- package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +1 -1
- package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +2 -24
- package/lib/commonjs/components/TransactionDetails/TransactionDetails.js.map +1 -1
- package/lib/commonjs/components/TransactionDetails/TransactionDetails.mdx +1 -1
- package/lib/commonjs/components/TransactionStatus/TransactionStatus.mdx +1 -1
- package/lib/commonjs/components/UpiHandle/UpiHandle.js +9 -1
- package/lib/commonjs/components/UpiHandle/UpiHandle.js.map +1 -1
- package/lib/commonjs/components/UpiHandle/UpiHandle.mdx +5 -1
- package/lib/commonjs/components/VStack/VStack.js +73 -0
- package/lib/commonjs/components/VStack/VStack.js.map +1 -0
- package/lib/commonjs/components/VStack/VStack.mdx +44 -0
- package/lib/commonjs/components/index.js +28 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/design-tokens/JFS Variables-variables-full.json +1 -18633
- package/lib/commonjs/icons/ic_info.svg +1 -0
- package/lib/commonjs/icons/ic_warning.svg +1 -0
- package/lib/commonjs/icons/registry.js +2 -2
- package/lib/commonjs/icons/registry.js.map +1 -1
- package/lib/commonjs/utils/react-utils.js +47 -0
- package/lib/commonjs/utils/react-utils.js.map +1 -0
- package/lib/module/components/Accordion/Accordion.mdx +1 -1
- package/lib/module/components/ActionFooter/ActionFooter.js +2 -14
- package/lib/module/components/ActionFooter/ActionFooter.js.map +1 -1
- package/lib/module/components/ActionFooter/ActionFooter.mdx +1 -1
- package/lib/module/components/ActionTile/ActionTile.js +10 -1
- package/lib/module/components/ActionTile/ActionTile.js.map +1 -1
- package/lib/module/components/ActionTile/ActionTile.mdx +5 -1
- package/lib/module/components/AppBar/AppBar.js +109 -231
- package/lib/module/components/AppBar/AppBar.js.map +1 -1
- package/lib/module/components/AppBar/AppBar.mdx +51 -39
- package/lib/module/components/Avatar/Avatar.mdx +9 -1
- package/lib/module/components/AvatarGroup/AvatarGroup.mdx +9 -1
- package/lib/module/components/Badge/Badge.mdx +1 -1
- package/lib/module/components/Balance/Balance.js +72 -0
- package/lib/module/components/Balance/Balance.js.map +1 -0
- package/lib/module/components/Balance/Balance.mdx +62 -0
- package/lib/module/components/BottomNav/BottomNav.js +9 -1
- package/lib/module/components/BottomNav/BottomNav.js.map +1 -1
- package/lib/module/components/BottomNav/BottomNav.mdx +5 -1
- package/lib/module/components/BottomNavItem/BottomNavItem.js +9 -1
- package/lib/module/components/BottomNavItem/BottomNavItem.js.map +1 -1
- package/lib/module/components/BottomNavItem/BottomNavItem.mdx +5 -1
- package/lib/module/components/Button/Button.mdx +5 -1
- package/lib/module/components/ButtonGroup/ButtonGroup.js +59 -0
- package/lib/module/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/lib/module/components/ButtonGroup/ButtonGroup.mdx +56 -0
- package/lib/module/components/Card/Card.mdx +1 -1
- package/lib/module/components/CardFeedback/CardFeedback.mdx +5 -1
- package/lib/module/components/ChipGroup/ChipGroup.js +49 -0
- package/lib/module/components/ChipGroup/ChipGroup.js.map +1 -0
- package/lib/module/components/ChipGroup/ChipGroup.mdx +40 -0
- package/lib/module/components/ChipSelect/ChipSelect.js +98 -0
- package/lib/module/components/ChipSelect/ChipSelect.js.map +1 -0
- package/lib/module/components/ChipSelect/ChipSelect.mdx +80 -0
- package/lib/module/components/CtaCard/CtaCard.js +15 -20
- package/lib/module/components/CtaCard/CtaCard.js.map +1 -1
- package/lib/module/components/CtaCard/CtaCard.mdx +1 -1
- package/lib/module/components/Disclaimer/Disclaimer.js +9 -1
- package/lib/module/components/Disclaimer/Disclaimer.js.map +1 -1
- package/lib/module/components/Disclaimer/Disclaimer.mdx +5 -1
- package/lib/module/components/Divider/Divider.mdx +5 -1
- package/lib/module/components/Drawer/Drawer.mdx +9 -1
- package/lib/module/components/EmptyState/EmptyState.js +132 -0
- package/lib/module/components/EmptyState/EmptyState.js.map +1 -0
- package/lib/module/components/EmptyState/EmptyState.mdx +73 -0
- package/lib/module/components/FilterBar/FilterBar.mdx +1 -1
- package/lib/module/components/HStack/HStack.js +61 -0
- package/lib/module/components/HStack/HStack.js.map +1 -0
- package/lib/module/components/HStack/HStack.mdx +44 -0
- package/lib/module/components/IconButton/IconButton.mdx +5 -1
- package/lib/module/components/IconCapsule/IconCapsule.js +12 -4
- package/lib/module/components/IconCapsule/IconCapsule.js.map +1 -1
- package/lib/module/components/IconCapsule/IconCapsule.mdx +12 -4
- package/lib/module/components/Introduction.mdx +3 -98
- package/lib/module/components/LazyList/LazyList.mdx +1 -1
- package/lib/module/components/ListGroup/ListGroup.js +1 -30
- package/lib/module/components/ListGroup/ListGroup.js.map +1 -1
- package/lib/module/components/ListGroup/ListGroup.mdx +5 -1
- package/lib/module/components/ListItem/ListItem.js +1 -35
- package/lib/module/components/ListItem/ListItem.js.map +1 -1
- package/lib/module/components/ListItem/ListItem.mdx +5 -1
- package/lib/module/components/MediaCard/MediaCard.mdx +5 -1
- package/lib/module/components/MerchantProfile/MerchantProfile.mdx +1 -1
- package/lib/module/components/MoneyValue/MoneyValue.mdx +6 -2
- package/lib/module/components/NavArrow/NavArrow.js +42 -17
- package/lib/module/components/NavArrow/NavArrow.js.map +1 -1
- package/lib/module/components/NavArrow/NavArrow.mdx +5 -1
- package/lib/module/components/PageTitle/PageTitle.js +10 -1
- package/lib/module/components/PageTitle/PageTitle.js.map +1 -1
- package/lib/module/components/PageTitle/PageTitle.mdx +5 -1
- package/lib/module/components/Screen/Screen.js +47 -0
- package/lib/module/components/Screen/Screen.js.map +1 -0
- package/lib/module/components/Screen/Screen.mdx +58 -0
- package/lib/module/components/Section/Section.js +1 -23
- package/lib/module/components/Section/Section.js.map +1 -1
- package/lib/module/components/Section/Section.mdx +5 -1
- package/lib/module/components/Stepper/Step.mdx +5 -1
- package/lib/module/components/Stepper/StepLabel.mdx +5 -1
- package/lib/module/components/Stepper/Stepper.mdx +1 -1
- package/lib/module/components/SupportText/SupportText.js +78 -0
- package/lib/module/components/SupportText/SupportText.js.map +1 -0
- package/lib/module/components/SupportText/SupportText.mdx +48 -0
- package/lib/module/components/SupportText/SupportTextIcon.js +42 -0
- package/lib/module/components/SupportText/SupportTextIcon.js.map +1 -0
- package/lib/module/components/SupportText/SupportTextIcon.mdx +35 -0
- package/lib/module/components/SupportText/index.js +5 -0
- package/lib/module/components/SupportText/index.js.map +1 -0
- package/lib/module/components/TextInput/TextInput.mdx +9 -1
- package/lib/module/components/ThreadHero/ThreadHero.mdx +1 -1
- package/lib/module/components/Tooltip/Tooltip.mdx +5 -1
- package/lib/module/components/TransactionBubble/TransactionBubble.mdx +1 -1
- package/lib/module/components/TransactionDetails/TransactionDetails.js +2 -26
- package/lib/module/components/TransactionDetails/TransactionDetails.js.map +1 -1
- package/lib/module/components/TransactionDetails/TransactionDetails.mdx +1 -1
- package/lib/module/components/TransactionStatus/TransactionStatus.mdx +1 -1
- package/lib/module/components/UpiHandle/UpiHandle.js +9 -1
- package/lib/module/components/UpiHandle/UpiHandle.js.map +1 -1
- package/lib/module/components/UpiHandle/UpiHandle.mdx +5 -1
- package/lib/module/components/VStack/VStack.js +67 -0
- package/lib/module/components/VStack/VStack.js.map +1 -0
- package/lib/module/components/VStack/VStack.mdx +44 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/design-tokens/JFS Variables-variables-full.json +1 -18633
- package/lib/module/design-tokens/figma-variables-resolver.js +2 -2
- package/lib/module/design-tokens/figma-variables-resolver.js.map +1 -1
- package/lib/module/icons/ic_info.svg +1 -0
- package/lib/module/icons/ic_warning.svg +1 -0
- package/lib/module/icons/registry.js +2 -2
- package/lib/module/icons/registry.js.map +1 -1
- package/lib/module/utils/react-utils.js +43 -0
- package/lib/module/utils/react-utils.js.map +1 -0
- package/lib/typescript/components/ActionFooter/ActionFooter.d.ts.map +1 -1
- package/lib/typescript/components/ActionTile/ActionTile.d.ts +1 -1
- package/lib/typescript/components/ActionTile/ActionTile.d.ts.map +1 -1
- package/lib/typescript/components/AppBar/AppBar.d.ts +34 -68
- package/lib/typescript/components/AppBar/AppBar.d.ts.map +1 -1
- package/lib/typescript/components/Balance/Balance.d.ts +44 -0
- package/lib/typescript/components/Balance/Balance.d.ts.map +1 -0
- package/lib/typescript/components/BottomNav/BottomNav.d.ts +1 -1
- package/lib/typescript/components/BottomNav/BottomNav.d.ts.map +1 -1
- package/lib/typescript/components/BottomNavItem/BottomNavItem.d.ts +1 -1
- package/lib/typescript/components/BottomNavItem/BottomNavItem.d.ts.map +1 -1
- package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts +36 -0
- package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/lib/typescript/components/ChipGroup/ChipGroup.d.ts +29 -0
- package/lib/typescript/components/ChipGroup/ChipGroup.d.ts.map +1 -0
- package/lib/typescript/components/ChipSelect/ChipSelect.d.ts +47 -0
- package/lib/typescript/components/ChipSelect/ChipSelect.d.ts.map +1 -0
- package/lib/typescript/components/CtaCard/CtaCard.d.ts +1 -1
- package/lib/typescript/components/CtaCard/CtaCard.d.ts.map +1 -1
- package/lib/typescript/components/Disclaimer/Disclaimer.d.ts +1 -1
- package/lib/typescript/components/Disclaimer/Disclaimer.d.ts.map +1 -1
- package/lib/typescript/components/EmptyState/EmptyState.d.ts +38 -0
- package/lib/typescript/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/lib/typescript/components/HStack/HStack.d.ts +41 -0
- package/lib/typescript/components/HStack/HStack.d.ts.map +1 -0
- package/lib/typescript/components/IconCapsule/IconCapsule.d.ts +1 -1
- package/lib/typescript/components/IconCapsule/IconCapsule.d.ts.map +1 -1
- package/lib/typescript/components/ListGroup/ListGroup.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/ListItem.d.ts.map +1 -1
- package/lib/typescript/components/NavArrow/NavArrow.d.ts +3 -3
- package/lib/typescript/components/NavArrow/NavArrow.d.ts.map +1 -1
- package/lib/typescript/components/PageTitle/PageTitle.d.ts +1 -1
- package/lib/typescript/components/PageTitle/PageTitle.d.ts.map +1 -1
- package/lib/typescript/components/Screen/Screen.d.ts +23 -0
- package/lib/typescript/components/Screen/Screen.d.ts.map +1 -0
- package/lib/typescript/components/Section/Section.d.ts.map +1 -1
- package/lib/typescript/components/SupportText/SupportText.d.ts +34 -0
- package/lib/typescript/components/SupportText/SupportText.d.ts.map +1 -0
- package/lib/typescript/components/SupportText/SupportTextIcon.d.ts +10 -0
- package/lib/typescript/components/SupportText/SupportTextIcon.d.ts.map +1 -0
- package/lib/typescript/components/SupportText/index.d.ts +3 -0
- package/lib/typescript/components/SupportText/index.d.ts.map +1 -0
- package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts.map +1 -1
- package/lib/typescript/components/UpiHandle/UpiHandle.d.ts +1 -1
- package/lib/typescript/components/UpiHandle/UpiHandle.d.ts.map +1 -1
- package/lib/typescript/components/VStack/VStack.d.ts +41 -0
- package/lib/typescript/components/VStack/VStack.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +4 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/icons/registry.d.ts +1 -1
- package/lib/typescript/icons/registry.d.ts.map +1 -1
- package/lib/typescript/utils/react-utils.d.ts +7 -0
- package/lib/typescript/utils/react-utils.d.ts.map +1 -0
- package/package.json +7 -5
- package/src/components/.token-metadata.json +468 -12
- package/src/components/Accordion/Accordion.mdx +1 -1
- package/src/components/ActionFooter/ActionFooter.mdx +1 -1
- package/src/components/ActionFooter/ActionFooter.tsx +3 -12
- package/src/components/ActionTile/ActionTile.mdx +5 -1
- package/src/components/ActionTile/ActionTile.tsx +5 -1
- package/src/components/AppBar/AppBar.mdx +51 -39
- package/src/components/AppBar/AppBar.tsx +149 -263
- package/src/components/Avatar/Avatar.mdx +9 -1
- package/src/components/AvatarGroup/AvatarGroup.mdx +9 -1
- package/src/components/Badge/Badge.mdx +1 -1
- package/src/components/Balance/Balance.mdx +62 -0
- package/src/components/Balance/Balance.tsx +107 -0
- package/src/components/BottomNav/BottomNav.mdx +5 -1
- package/src/components/BottomNav/BottomNav.tsx +6 -3
- package/src/components/BottomNavItem/BottomNavItem.mdx +5 -1
- package/src/components/BottomNavItem/BottomNavItem.tsx +19 -16
- package/src/components/Button/Button.mdx +5 -1
- package/src/components/ButtonGroup/ButtonGroup.mdx +56 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +78 -0
- package/src/components/Card/Card.mdx +1 -1
- package/src/components/CardFeedback/CardFeedback.mdx +5 -1
- package/src/components/ChipGroup/ChipGroup.mdx +40 -0
- package/src/components/ChipGroup/ChipGroup.tsx +67 -0
- package/src/components/ChipSelect/ChipSelect.mdx +80 -0
- package/src/components/ChipSelect/ChipSelect.tsx +138 -0
- package/src/components/CtaCard/CtaCard.mdx +1 -1
- package/src/components/CtaCard/CtaCard.tsx +16 -21
- package/src/components/Disclaimer/Disclaimer.mdx +5 -1
- package/src/components/Disclaimer/Disclaimer.tsx +6 -3
- package/src/components/Divider/Divider.mdx +5 -1
- package/src/components/Drawer/Drawer.mdx +9 -1
- package/src/components/EmptyState/EmptyState.mdx +73 -0
- package/src/components/EmptyState/EmptyState.tsx +181 -0
- package/src/components/FilterBar/FilterBar.mdx +1 -1
- package/src/components/HStack/HStack.mdx +44 -0
- package/src/components/HStack/HStack.tsx +95 -0
- package/src/components/IconButton/IconButton.mdx +5 -1
- package/src/components/IconCapsule/IconCapsule.mdx +12 -4
- package/src/components/IconCapsule/IconCapsule.tsx +13 -10
- package/src/components/Introduction.mdx +3 -98
- package/src/components/LazyList/LazyList.mdx +1 -1
- package/src/components/ListGroup/ListGroup.mdx +5 -1
- package/src/components/ListGroup/ListGroup.tsx +5 -43
- package/src/components/ListItem/ListItem.mdx +5 -1
- package/src/components/ListItem/ListItem.tsx +15 -60
- package/src/components/MediaCard/MediaCard.mdx +5 -1
- package/src/components/MerchantProfile/MerchantProfile.mdx +1 -1
- package/src/components/MoneyValue/MoneyValue.mdx +6 -2
- package/src/components/NavArrow/NavArrow.mdx +5 -1
- package/src/components/NavArrow/NavArrow.tsx +48 -16
- package/src/components/PageTitle/PageTitle.mdx +5 -1
- package/src/components/PageTitle/PageTitle.tsx +8 -4
- package/src/components/Screen/Screen.mdx +58 -0
- package/src/components/Screen/Screen.tsx +60 -0
- package/src/components/Section/Section.mdx +5 -1
- package/src/components/Section/Section.tsx +17 -46
- package/src/components/Stepper/Step.mdx +5 -1
- package/src/components/Stepper/StepLabel.mdx +5 -1
- package/src/components/Stepper/Stepper.mdx +1 -1
- package/src/components/SupportText/SupportText.mdx +48 -0
- package/src/components/SupportText/SupportText.tsx +104 -0
- package/src/components/SupportText/SupportTextIcon.mdx +35 -0
- package/src/components/SupportText/SupportTextIcon.tsx +45 -0
- package/src/components/SupportText/index.ts +2 -0
- package/src/components/TextInput/TextInput.mdx +9 -1
- package/src/components/ThreadHero/ThreadHero.mdx +1 -1
- package/src/components/Tooltip/Tooltip.mdx +5 -1
- package/src/components/TransactionBubble/TransactionBubble.mdx +1 -1
- package/src/components/TransactionDetails/TransactionDetails.mdx +1 -1
- package/src/components/TransactionDetails/TransactionDetails.tsx +1 -38
- package/src/components/TransactionStatus/TransactionStatus.mdx +1 -1
- package/src/components/UpiHandle/UpiHandle.mdx +5 -1
- package/src/components/UpiHandle/UpiHandle.tsx +4 -1
- package/src/components/VStack/VStack.mdx +44 -0
- package/src/components/VStack/VStack.tsx +100 -0
- package/src/components/index.ts +4 -0
- package/src/design-tokens/JFS Variables-variables-full.json +1 -18633
- package/src/icons/ic_info.svg +1 -0
- package/src/icons/ic_warning.svg +1 -0
- package/src/icons/registry.ts +9 -1
- package/src/utils/react-utils.ts +51 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
6
7
|
import Icon from '../../icons/Icon';
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
/**
|
|
@@ -35,18 +36,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
35
36
|
*/
|
|
36
37
|
function IconCapsule({
|
|
37
38
|
iconName = "ic_card",
|
|
38
|
-
modes = {},
|
|
39
|
+
modes: propModes = {},
|
|
39
40
|
accessibilityLabel,
|
|
40
41
|
accessibilityRole = "image",
|
|
41
42
|
...rest
|
|
42
43
|
}) {
|
|
44
|
+
const {
|
|
45
|
+
modes: globalModes
|
|
46
|
+
} = useTokens();
|
|
47
|
+
const modes = {
|
|
48
|
+
...globalModes,
|
|
49
|
+
...propModes
|
|
50
|
+
};
|
|
43
51
|
// Resolve design tokens using the provided modes
|
|
44
52
|
const size = getVariableByName('iconCapsule/size', modes) || 42;
|
|
45
53
|
const radius = getVariableByName('iconCapsule/radius', modes) || 9999;
|
|
46
54
|
const backgroundColor = getVariableByName('iconCapsule/background', modes) || '#cfa159';
|
|
47
|
-
const borderColor = getVariableByName('
|
|
48
|
-
const borderSize = getVariableByName('
|
|
49
|
-
const iconColor = getVariableByName('
|
|
55
|
+
const borderColor = getVariableByName('iconCapsule/border/color', modes) || 'rgba(255,255,255,0)';
|
|
56
|
+
const borderSize = getVariableByName('iconCapsule/border/size', modes) || 1;
|
|
57
|
+
const iconColor = getVariableByName('iconCapsule/icon/color', modes) || '#0f0d0a';
|
|
50
58
|
const iconSize = getVariableByName('iconCapsule/icon/size', modes) || 18;
|
|
51
59
|
|
|
52
60
|
// Convert radius to React Native format (if 9999, use size/2 for perfect circle)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","getVariableByName","Icon","jsx","_jsx","IconCapsule","iconName","modes","accessibilityLabel","accessibilityRole","rest","size","radius","backgroundColor","borderColor","borderSize","iconColor","iconSize","borderRadius","containerStyle","width","height","borderWidth","overflow","alignItems","justifyContent","defaultAccessibilityLabel","replace","l","toUpperCase","style","children","name","color","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/IconCapsule/IconCapsule.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,OAAOC,IAAI,MAAM,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAC;EACnBC,QAAQ,GAAG,SAAS;EACpBC,KAAK,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["React","View","getVariableByName","useTokens","Icon","jsx","_jsx","IconCapsule","iconName","modes","propModes","accessibilityLabel","accessibilityRole","rest","globalModes","size","radius","backgroundColor","borderColor","borderSize","iconColor","iconSize","borderRadius","containerStyle","width","height","borderWidth","overflow","alignItems","justifyContent","defaultAccessibilityLabel","replace","l","toUpperCase","style","children","name","color","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/IconCapsule/IconCapsule.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,OAAOC,IAAI,MAAM,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAC;EACnBC,QAAQ,GAAG,SAAS;EACpBC,KAAK,EAAEC,SAAS,GAAG,CAAC,CAAC;EACrBC,kBAAkB;EAClBC,iBAAiB,GAAG,OAAO;EAC3B,GAAGC;AACa,CAAC,EAAE;EACnB,MAAM;IAAEJ,KAAK,EAAEK;EAAY,CAAC,G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AC,CAACC,WAAW,CAAC,CAAC,CAAC;EAE9I,oBACE3B,IAAA,CAACL,IAAI;IACHiC,KAAK,EAAEX,cAAe;IACtBX,iBAAiB,EAAEA,iBAAkB;IACrCD,kBAAkB,EAAEmB,yBAA0B;IAAA,GAC1CjB,IAAI;IAAAsB,QAAA,eAER7B,IAAA,CAACF,IAAI;MACHgC,IAAI,EAAE5B,QAAS;MACfO,IAAI,EAAEM,QAAS;MACfgB,KAAK,EAAEjB,SAAU;MACjBkB,2BAA2B,EAAE,IAAK;MAClCC,yBAAyB,EAAC;IAAI,CAC/B;EAAC,CACE,CAAC;AAEX;AAEA,eAAehC,WAAW","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as IconCapsuleStories from './IconCapsule.stories';
|
|
3
3
|
import IconCapsule from './IconCapsule';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -17,6 +17,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
17
17
|
- **Modes:** M | L | S
|
|
18
18
|
- **Default:** M
|
|
19
19
|
|
|
20
|
+
### Emphasis
|
|
21
|
+
- **Modes:** High | Medium | Low
|
|
22
|
+
- **Default:** High
|
|
23
|
+
|
|
20
24
|
### Appearance.Brand
|
|
21
25
|
- **Modes:** Primary | Secondary | Neutral
|
|
22
26
|
- **Default:** Primary
|
|
@@ -24,6 +28,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
24
28
|
### Color Mode
|
|
25
29
|
- **Modes:** Light | Dark
|
|
26
30
|
- **Default:** Light
|
|
31
|
+
|
|
32
|
+
### Colors Router
|
|
33
|
+
- **Modes:** POC | Old
|
|
34
|
+
- **Default:** POC
|
|
27
35
|
## Usage
|
|
28
36
|
|
|
29
37
|
<Canvas>
|
|
@@ -62,11 +70,11 @@ This component uses the following design token collections. Each collection supp
|
|
|
62
70
|
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
63
71
|
|
|
64
72
|
- **`iconCapsule/background`**
|
|
73
|
+
- **`iconCapsule/border/color`**
|
|
74
|
+
- **`iconCapsule/border/size`**
|
|
75
|
+
- **`iconCapsule/icon/color`**
|
|
65
76
|
- **`iconCapsule/icon/size`**
|
|
66
77
|
- **`iconCapsule/radius`**
|
|
67
78
|
- **`iconCapsule/size`**
|
|
68
|
-
- **`iconCapsuleborder/color`**
|
|
69
|
-
- **`iconCapsuleborder/size`**
|
|
70
|
-
- **`iconCapsuleicon/color`**
|
|
71
79
|
|
|
72
80
|
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -1,102 +1,7 @@
|
|
|
1
|
-
import { Meta } from '@storybook/
|
|
1
|
+
import { Meta } from '@storybook/blocks';
|
|
2
2
|
|
|
3
3
|
<Meta title="Introduction" />
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
Welcome to the component library documentation for this React Native project. This Storybook instance provides comprehensive documentation and interactive examples of all components in the application.
|
|
8
|
-
|
|
9
|
-
## What is Storybook?
|
|
10
|
-
|
|
11
|
-
Storybook is a tool for building UI components in isolation. It makes development, testing, and documentation easier by providing a sandbox environment where you can:
|
|
12
|
-
|
|
13
|
-
- **Develop components in isolation** - Build components without worrying about app-specific dependencies
|
|
14
|
-
- **Test edge cases** - Easily test components with different props and states
|
|
15
|
-
- **Document components** - Create living documentation that stays in sync with your code
|
|
16
|
-
- **Share with your team** - Provide a visual reference for designers and developers
|
|
17
|
-
|
|
18
|
-
## Documentation Contract
|
|
19
|
-
|
|
20
|
-
Every component page now follows a consistent template:
|
|
21
|
-
|
|
22
|
-
- **Accessibility** — how to label, hint, and expose roles/states so assistive tech users get the right cues.
|
|
23
|
-
- **Anatomy** — key slots/parts you can compose or override (leading/trailing, slots, tokens).
|
|
24
|
-
- **Usage Constraints** — safe overrides, layout expectations, and behaviors to avoid.
|
|
25
|
-
|
|
26
|
-
Use these sections as a checklist when creating or reviewing stories so guidance stays close to the API.
|
|
27
|
-
|
|
28
|
-
## Performance Panel
|
|
29
|
-
|
|
30
|
-
A lightweight performance panel is enabled for all stories. Open the **Performance** addon in the Storybook toolbar to inspect mount/remount timings and interaction costs. Use it to:
|
|
31
|
-
|
|
32
|
-
- Compare render timing between variants without creating extra stories.
|
|
33
|
-
- Spot regressions when props or modes change.
|
|
34
|
-
- Validate that heavy children (lists, drawers, sheets) still mount within budget.
|
|
35
|
-
|
|
36
|
-
## Getting Started
|
|
37
|
-
|
|
38
|
-
### Running Storybook
|
|
39
|
-
|
|
40
|
-
#### For Web (Development)
|
|
41
|
-
```bash
|
|
42
|
-
yarn storybook-web
|
|
43
|
-
```
|
|
44
|
-
This will start Storybook on `http://localhost:6006`
|
|
45
|
-
|
|
46
|
-
#### For React Native (iOS/Android)
|
|
47
|
-
```bash
|
|
48
|
-
# iOS
|
|
49
|
-
yarn ios
|
|
50
|
-
|
|
51
|
-
# Android
|
|
52
|
-
yarn android
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Building Storybook for Production
|
|
56
|
-
```bash
|
|
57
|
-
yarn build:storybook-web
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Component Organization
|
|
61
|
-
|
|
62
|
-
Components are organized in the `src/components` directory. Each component typically includes:
|
|
63
|
-
|
|
64
|
-
- **Component file** - The main component implementation
|
|
65
|
-
- **Story file** - Interactive examples and test cases
|
|
66
|
-
- **Documentation** - Comprehensive documentation with usage examples
|
|
67
|
-
|
|
68
|
-
## Available Components
|
|
69
|
-
|
|
70
|
-
### Avatar
|
|
71
|
-
- **Avatar** - A flexible avatar component that displays user profile pictures or monogram initials. Supports multiple size modes and is fully integrated with Figma design tokens.
|
|
72
|
-
|
|
73
|
-
### IconCapsule
|
|
74
|
-
- **IconCapsule** - A flexible icon capsule component that displays an icon within a styled circular or rounded container. Supports different icons and appearance modes, fully integrated with Figma design tokens.
|
|
75
|
-
|
|
76
|
-
## Documentation Features
|
|
77
|
-
|
|
78
|
-
This Storybook instance includes:
|
|
79
|
-
|
|
80
|
-
- ✅ **Automatic documentation** - Generated from JSDoc comments and component metadata
|
|
81
|
-
- ✅ **Interactive examples** - Live, editable component examples
|
|
82
|
-
- ✅ **Props documentation** - Automatic props table generation
|
|
83
|
-
- ✅ **MDX support** - Rich documentation with Markdown and JSX
|
|
84
|
-
|
|
85
|
-
## Best Practices
|
|
86
|
-
|
|
87
|
-
When creating new components:
|
|
88
|
-
|
|
89
|
-
1. **Add JSDoc comments** - Document your components with JSDoc for automatic documentation
|
|
90
|
-
2. **Create stories** - Add multiple stories showing different states and use cases
|
|
91
|
-
3. **Use TypeScript/PropTypes** - Define prop types for better documentation
|
|
92
|
-
4. **Write MDX docs** - Create comprehensive documentation pages when needed
|
|
93
|
-
|
|
94
|
-
## Resources
|
|
95
|
-
|
|
96
|
-
- [Storybook Documentation](https://storybook.js.org/)
|
|
97
|
-
- [React Native Storybook](https://github.com/storybookjs/react-native)
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
Happy coding! 🚀
|
|
5
|
+
# Introduction
|
|
102
6
|
|
|
7
|
+
Welcome to the JFS Components Library.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as LazyListStories from './LazyList.stories';
|
|
3
3
|
import LazyList from './LazyList';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -8,37 +8,8 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
|
8
8
|
* Helper function to recursively clone children and pass modes prop to components that accept it.
|
|
9
9
|
* This ensures that all child components in slots receive the modes prop from the parent.
|
|
10
10
|
*/
|
|
11
|
+
import { cloneChildrenWithModes } from '../../utils/react-utils';
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
function cloneChildrenWithModes(children, modes) {
|
|
13
|
-
const result = React.Children.map(children, child => {
|
|
14
|
-
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
15
|
-
return child;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Get existing children
|
|
19
|
-
const childChildren = child.props?.children;
|
|
20
|
-
const hasChildren = childChildren !== undefined && childChildren !== null;
|
|
21
|
-
|
|
22
|
-
// Clone the child with modes prop if it doesn't already have one
|
|
23
|
-
// or merge with existing modes if it does
|
|
24
|
-
// Merge order: parent modes first, then child's explicit modes override them
|
|
25
|
-
const existingModes = child.props?.modes;
|
|
26
|
-
const mergedModes = existingModes ? {
|
|
27
|
-
...modes,
|
|
28
|
-
...existingModes
|
|
29
|
-
} : modes;
|
|
30
|
-
|
|
31
|
-
// Recursively process children if they exist
|
|
32
|
-
const processedChildren = hasChildren ? cloneChildrenWithModes(React.Children.toArray(childChildren), modes) : undefined;
|
|
33
|
-
|
|
34
|
-
// Clone element with modes and processed children
|
|
35
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
36
|
-
...child.props,
|
|
37
|
-
modes: mergedModes
|
|
38
|
-
}, processedChildren);
|
|
39
|
-
});
|
|
40
|
-
return result || [];
|
|
41
|
-
}
|
|
42
13
|
/**
|
|
43
14
|
* ListGroup component that mirrors the Figma "List Group" component.
|
|
44
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","getVariableByName","jsx","_jsx","jsxs","_jsxs","
|
|
1
|
+
{"version":3,"names":["React","View","Text","getVariableByName","cloneChildrenWithModes","jsx","_jsx","jsxs","_jsxs","ListGroup","label","listGroupSlot","modes","style","accessibilityLabel","accessibilityHint","rest","backgroundColor","borderColor","borderWidth","gap","labelColor","labelFontSize","labelLineHeight","labelFontFamily","labelFontWeightRaw","labelFontWeight","toString","containerStyle","borderStyle","flexDirection","alignItems","width","labelStyle","color","fontSize","lineHeight","fontFamily","fontWeight","processedSlot","Children","toArray","defaultAccessibilityLabel","accessibilityRole","children","marginBottom","numberOfLines","accessibilityElementsHidden","importantForAccessibility","map","child","index","isValidElement","items","isLast","length","wrapperStyle","key"],"sourceRoot":"../../../../src","sources":["components/ListGroup/ListGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACzE,SAASC,iBAAiB,QAAQ,8CAA8C;;AAEhF;AACA;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,yBAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAWhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,SAASA,CAAC;EACjBC,KAAK,GAAG,EAAE;EACVC,aAAa;EACbC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC,kBAAkB;EAClBC,iBAAiB;EACjB,GAAGC;AACW,CAAC,EAAE;EACjB;EACA,MAAMC,eAAe,GAAGd,iBAAiB,CAAC,sBAAsB,EAAES,KAAK,CAAC,IAAI,qBAAqB;EACjG,MAAMM,WAAW,GAAGf,iBAAiB,CAAC,wBAAwB,EAAES,KAAK,CAAC,IAAI,qBAAqB;EAC/F,MAAMO,WAAW,GAAGhB,iBAAiB,CAAC,uBAAuB,EAAES,KAAK,CAAC,IAAI,CAAC;EAC1E,MAAMQ,GAAG,GAAGjB,iBAAiB,CAAC,eAAe,EAAES,KAAK,CAAC,IAAI,EAAE;;EAE3D;EACA,MAAMS,UAAU,GAAGlB,iBAAiB,CAAC,uBAAuB,EAAES,KAAK,CAAC,IAAI,SAAS;EACjF,MAAMU,aAAa,GAAGnB,iBAAiB,CAAC,oBAAoB,EAAES,KAAK,CAAC,IAAI,EAAE;EAC1E,MAAMW,eAAe,GAAGpB,iBAAiB,CAAC,sBAAsB,EAAES,KAAK,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C,2BAA2B,EAAE,IAAK;MAClCC,yBAAyB,EAAC,IAAI;MAAAJ,QAAA,EAE7BlC;IAAK,CACF,CAAC,GACL,IAAI,EACP6B,aAAa,gBACZjC,IAAA,CAACL,IAAI;MAACY,KAAK,EAAE;QAAEmB,KAAK,EAAE;MAAO,CAAE;MAAAY,QAAA,EAC5B5C,KAAK,CAACwC,QAAQ,CAACC,OAAO,CAACF,aAAa,CAAC,CAACU,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAK;QAC3D,IAAI,eAACnD,KAAK,CAACoD,cAAc,CAACF,KAAK,CAAC,EAAE;UAChC,OAAOA,KAAK;QACd;QACA;QACA,MAAMG,KAAK,GAAGrD,KAAK,CAACwC,QAAQ,CAACC,OAAO,CAACF,aAAa,CAAC;QACnD,MAAMe,MAAM,GAAGH,KAAK,KAAKE,KAAK,CAACE,MAAM,GAAG,CAAC;QACzC,MAAMC,YAAY,GAAG,CAACF,MAAM,GAAG;UAAET,YAAY,EAAEzB;QAAI,CAAC,GAAG,CAAC,CAAC;QAEzD,oBACEd,IAAA,CAACL,IAAI;UAAuCY,KAAK,EAAE2C,YAAa;UAAAZ,QAAA,EAC7DM;QAAK,GADGA,KAAK,CAACO,GAAG,IAAI,WAAWN,KAAK,EAElC,CAAC;MAEX,CAAC;IAAC,CACE,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX;AAEA,eAAe1C,SAAS","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as ListGroupStories from './ListGroup.stories';
|
|
3
3
|
import ListGroup from './ListGroup';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -13,6 +13,10 @@ Helper function to recursively clone children and pass modes prop to components
|
|
|
13
13
|
|
|
14
14
|
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
15
15
|
|
|
16
|
+
### Colors Router
|
|
17
|
+
- **Modes:** POC | Old
|
|
18
|
+
- **Default:** POC
|
|
19
|
+
|
|
16
20
|
### Title Level
|
|
17
21
|
- **Modes:** Default | Bold
|
|
18
22
|
- **Default:** Default
|
|
@@ -14,42 +14,8 @@ import { usePressableWebSupport } from '../../utils/web-platform-utils';
|
|
|
14
14
|
* @param forcedModes - Optional modes that will ALWAYS be applied last, overriding any other modes.
|
|
15
15
|
* Useful for slots that need to enforce specific context values.
|
|
16
16
|
*/
|
|
17
|
+
import { cloneChildrenWithModes } from '../../utils/react-utils';
|
|
17
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
function cloneChildrenWithModes(children, modes, forcedModes) {
|
|
19
|
-
const result = React.Children.map(children, child => {
|
|
20
|
-
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
21
|
-
return child;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Get existing children
|
|
25
|
-
const childChildren = child.props?.children;
|
|
26
|
-
const hasChildren = childChildren !== undefined && childChildren !== null;
|
|
27
|
-
|
|
28
|
-
// Clone the child with modes prop if it doesn't already have one
|
|
29
|
-
// or merge with existing modes if it does
|
|
30
|
-
// Merge order: parent modes first, then child's explicit modes override them,
|
|
31
|
-
// then forcedModes (if provided) are applied last and can never be overridden
|
|
32
|
-
const existingModes = child.props?.modes;
|
|
33
|
-
const mergedModes = forcedModes ? {
|
|
34
|
-
...modes,
|
|
35
|
-
...(existingModes || {}),
|
|
36
|
-
...forcedModes
|
|
37
|
-
} : existingModes ? {
|
|
38
|
-
...modes,
|
|
39
|
-
...existingModes
|
|
40
|
-
} : modes;
|
|
41
|
-
|
|
42
|
-
// Recursively process children if they exist
|
|
43
|
-
const processedChildren = hasChildren ? cloneChildrenWithModes(React.Children.toArray(childChildren), modes, forcedModes) : undefined;
|
|
44
|
-
|
|
45
|
-
// Clone element with modes and processed children
|
|
46
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
47
|
-
...child.props,
|
|
48
|
-
modes: mergedModes
|
|
49
|
-
}, processedChildren);
|
|
50
|
-
});
|
|
51
|
-
return result || [];
|
|
52
|
-
}
|
|
53
19
|
/**
|
|
54
20
|
* ListItem component that mirrors the Figma "List Item" component.
|
|
55
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","View","Text","Pressable","getVariableByName","IconCapsule","NavArrow","usePressableWebSupport","jsx","_jsx","jsxs","_jsxs","
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","Pressable","getVariableByName","IconCapsule","NavArrow","usePressableWebSupport","cloneChildrenWithModes","jsx","_jsx","jsxs","_jsxs","ListItem","layout","title","supportText","showSupportText","leading","supportSlot","endSlot","navArrow","modes","onPress","style","contentStyle","accessibilityLabel","accessibilityHint","accessibilityState","webAccessibilityProps","rest","gap","paddingTop","paddingBottom","paddingLeft","paddingRight","titleColor","titleFontSize","titleLineHeight","titleFontFamily","titleFontWeightRaw","titleFontWeight","toString","supportColor","supportFontSize","supportLineHeight","supportFontFamily","supportFontWeightRaw","supportFontWeight","baseContainerStyle","sharedLayoutStyle","flexDirection","alignItems","innerContentBaseStyle","flex","verticalContentBaseStyle","titleTextStyle","color","fontSize","lineHeight","fontFamily","fontWeight","supportTextStyle","trailingWrapperStyle","marginLeft","defaultAccessibilityLabel","webPropsHorizontal","restProps","disabled","webPropsVertical","processedLeading","Children","toArray","leadingElement","length","renderSupportContent","processedSupportSlot","numberOfLines","children","processedEndSlot","trailingContent","innerContent","minWidth","direction","accessibilityRole","pressed","opacity","undefined","verticalContent"],"sourceRoot":"../../../../src","sources":["components/ListItem/ListItem.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,QAAiF,cAAc;AAC7H,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,OAAOC,WA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-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as ListItemStories from './ListItem.stories';
|
|
3
3
|
import ListItem from './ListItem';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -26,6 +26,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
26
26
|
### Color Mode
|
|
27
27
|
- **Modes:** Light | Dark
|
|
28
28
|
- **Default:** Light
|
|
29
|
+
|
|
30
|
+
### Colors Router
|
|
31
|
+
- **Modes:** POC | Old
|
|
32
|
+
- **Default:** POC
|
|
29
33
|
## Usage
|
|
30
34
|
|
|
31
35
|
### Horizontal Layout with NavArrow
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as MediaCardStories from './MediaCard.stories';
|
|
3
3
|
import MediaCard from './MediaCard';
|
|
4
4
|
import { AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -13,6 +13,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
13
13
|
### Contrast Context
|
|
14
14
|
- **Modes:** on dark | on light
|
|
15
15
|
- **Default:** on dark
|
|
16
|
+
|
|
17
|
+
### Colors Router
|
|
18
|
+
- **Modes:** POC | Old
|
|
19
|
+
- **Default:** POC
|
|
16
20
|
## Usage
|
|
17
21
|
|
|
18
22
|
<Canvas>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as MerchantProfileStories from './MerchantProfile.stories';
|
|
3
3
|
import MerchantProfile from './MerchantProfile';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as MoneyValueStories from './MoneyValue.stories';
|
|
3
3
|
import MoneyValue from './MoneyValue';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -17,8 +17,12 @@ This component uses the following design token collections. Each collection supp
|
|
|
17
17
|
- **Modes:** Light | Dark
|
|
18
18
|
- **Default:** Light
|
|
19
19
|
|
|
20
|
+
### Colors Router
|
|
21
|
+
- **Modes:** POC | Old
|
|
22
|
+
- **Default:** POC
|
|
23
|
+
|
|
20
24
|
### Context3
|
|
21
|
-
- **Modes:** Default | Transaction Bubble
|
|
25
|
+
- **Modes:** Default | Transaction Bubble | Balance
|
|
22
26
|
- **Default:** Default
|
|
23
27
|
## Usage
|
|
24
28
|
|
|
@@ -20,7 +20,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
20
|
*
|
|
21
21
|
* @component
|
|
22
22
|
* @param {Object} props
|
|
23
|
-
* @param {'Back'|'Forward'} [props.direction='Back'] - Arrow direction
|
|
23
|
+
* @param {'Back'|'Forward'|'Down'} [props.direction='Back'] - Arrow direction
|
|
24
24
|
* @param {Object} [props.modes={}] - Modes for design token resolution
|
|
25
25
|
* @param {Object} [props.style] - Additional container styles
|
|
26
26
|
*/
|
|
@@ -36,38 +36,63 @@ function NavArrow({
|
|
|
36
36
|
const iconWidth = Number(getVariableByName('navArrow/icon/width', modes)) || 4;
|
|
37
37
|
const iconHeight = Number(getVariableByName('navArrow/icon/height', modes)) || 8;
|
|
38
38
|
const strokeWeight = Number(getVariableByName('navArrow/icon/strokeWeight', modes)) || 2;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
// Base dimensions from tokens (these are for Vertical orientation like Back/Forward)
|
|
41
|
+
const baseContainerWidth = Number(getVariableByName('navArrow/width', modes)) || 6;
|
|
42
|
+
const baseContainerHeight = Number(getVariableByName('navArrow/height', modes)) || 10;
|
|
41
43
|
const borderRadius = Number(getVariableByName('navArrow/radius', modes)) || 0;
|
|
42
44
|
const backgroundColor = getVariableByName('navArrow/background', modes) || 'transparent';
|
|
45
|
+
|
|
46
|
+
// For Down direction, we swap width and height considerations
|
|
47
|
+
const isDown = direction === 'Down';
|
|
43
48
|
const containerStyle = {
|
|
44
|
-
width
|
|
45
|
-
|
|
49
|
+
// If Down, we use the height token for width and width token for height
|
|
50
|
+
width: isDown ? baseContainerHeight : baseContainerWidth,
|
|
51
|
+
height: isDown ? baseContainerWidth : baseContainerHeight,
|
|
46
52
|
borderRadius,
|
|
47
53
|
backgroundColor,
|
|
48
54
|
alignItems: 'center',
|
|
49
55
|
justifyContent: 'center',
|
|
50
56
|
...(style || {})
|
|
51
57
|
};
|
|
52
|
-
const defaultAccessibilityLabel = accessibilityLabel || (direction === 'Back' ? 'Go back' : 'Go forward');
|
|
58
|
+
const defaultAccessibilityLabel = accessibilityLabel || (direction === 'Back' ? 'Go back' : direction === 'Forward' ? 'Go forward' : 'Go down');
|
|
59
|
+
|
|
60
|
+
// Determine SVG dimensions based on orientation
|
|
61
|
+
// For Down, we swap width/height so the layout box is correct (8x4 instead of 4x8)
|
|
62
|
+
const svgWidth = isDown ? iconHeight : iconWidth;
|
|
63
|
+
const svgHeight = isDown ? iconWidth : iconHeight;
|
|
64
|
+
|
|
65
|
+
// SVG path generation
|
|
66
|
+
let chevronPath;
|
|
67
|
+
let transform;
|
|
68
|
+
if (isDown) {
|
|
69
|
+
// Arrow pointing down: M1 1 L[mid] [bottom] L[right] 1
|
|
70
|
+
// Width is iconHeight (8), Height is iconWidth (4)
|
|
71
|
+
// Tip at (4, 3), Left (1, 1), Right (7, 1)
|
|
72
|
+
chevronPath = `M1 1L${svgWidth / 2} ${svgHeight - 1}L${svgWidth - 1} 1`;
|
|
73
|
+
} else {
|
|
74
|
+
// Arrow pointing right (Forward)
|
|
75
|
+
// Width is iconWidth (4), Height is iconHeight (8)
|
|
76
|
+
chevronPath = `M1 1L${iconWidth - 1} ${iconHeight / 2}L1 ${iconHeight - 1}`;
|
|
53
77
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
78
|
+
// For Back, we just flip the Forward arrow
|
|
79
|
+
if (direction === 'Back') {
|
|
80
|
+
transform = [{
|
|
81
|
+
scaleX: -1
|
|
82
|
+
}];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
58
85
|
return /*#__PURE__*/_jsx(View, {
|
|
59
86
|
style: containerStyle,
|
|
60
87
|
accessibilityRole: "image",
|
|
61
88
|
accessibilityLabel: defaultAccessibilityLabel,
|
|
62
89
|
...rest,
|
|
63
90
|
children: /*#__PURE__*/_jsx(Svg, {
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
66
|
-
viewBox: `0 0 ${
|
|
67
|
-
style:
|
|
68
|
-
transform
|
|
69
|
-
scaleX: -1
|
|
70
|
-
}]
|
|
91
|
+
width: svgWidth,
|
|
92
|
+
height: svgHeight,
|
|
93
|
+
viewBox: `0 0 ${svgWidth} ${svgHeight}`,
|
|
94
|
+
style: transform ? {
|
|
95
|
+
transform
|
|
71
96
|
} : undefined,
|
|
72
97
|
children: /*#__PURE__*/_jsx(Path, {
|
|
73
98
|
d: chevronPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Svg","Path","getVariableByName","jsx","_jsx","NavArrow","direction","modes","style","accessibilityLabel","rest","iconColor","iconWidth","Number","iconHeight","strokeWeight","
|
|
1
|
+
{"version":3,"names":["React","View","Svg","Path","getVariableByName","jsx","_jsx","NavArrow","direction","modes","style","accessibilityLabel","rest","iconColor","iconWidth","Number","iconHeight","strokeWeight","baseContainerWidth","baseContainerHeight","borderRadius","backgroundColor","isDown","containerStyle","width","height","alignItems","justifyContent","defaultAccessibilityLabel","svgWidth","svgHeight","chevronPath","transform","scaleX","accessibilityRole","children","viewBox","undefined","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","f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KAAK,EAAEK,QAAS;MAChBJ,MAAM,EAAEK,SAAU;MAClBM,OAAO,EAAE,OAAOP,QAAQ,IAAIC,SAAS,EAAG;MACxCpB,KAAK,EAAEsB,SAAS,GAAG;QAAEA;MAAU,CAAC,GAAGK,SAAU;MAAAF,QAAA,eAE7C7B,IAAA,CAACH,IAAI;QACHmC,CAAC,EAAEP,WAAY;QACfQ,MAAM,EAAE1B,SAAU;QAClB2B,WAAW,EAAEvB,YAAa;QAC1BwB,aAAa,EAAC,OAAO;QACrBC,cAAc,EAAC,OAAO;QACtBC,IAAI,EAAC;MAAM,CACZ;IAAC,CACC;EAAC,CACF,CAAC;AAEX;AAEA,eAAepC,QAAQ","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as NavArrowStories from './NavArrow.stories';
|
|
3
3
|
import NavArrow from './NavArrow';
|
|
4
4
|
|
|
@@ -16,6 +16,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
16
16
|
- **Modes:** Light | Dark
|
|
17
17
|
- **Default:** Light
|
|
18
18
|
|
|
19
|
+
### Colors Router
|
|
20
|
+
- **Modes:** POC | Old
|
|
21
|
+
- **Default:** POC
|
|
22
|
+
|
|
19
23
|
### Context2
|
|
20
24
|
- **Modes:** Default | AppBar
|
|
21
25
|
- **Default:** Default
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
/**
|
|
8
9
|
* PageTitle component that mirrors the Figma "Page Title" component.
|
|
@@ -21,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
21
22
|
*/
|
|
22
23
|
function PageTitle({
|
|
23
24
|
title = 'Page Title',
|
|
24
|
-
modes = {},
|
|
25
|
+
modes: propModes = {},
|
|
25
26
|
style,
|
|
26
27
|
textStyle,
|
|
27
28
|
numberOfLines,
|
|
@@ -29,6 +30,14 @@ function PageTitle({
|
|
|
29
30
|
accessibilityHint,
|
|
30
31
|
...rest
|
|
31
32
|
}) {
|
|
33
|
+
const {
|
|
34
|
+
modes: globalModes
|
|
35
|
+
} = useTokens();
|
|
36
|
+
const modes = {
|
|
37
|
+
...globalModes,
|
|
38
|
+
...propModes
|
|
39
|
+
};
|
|
40
|
+
|
|
32
41
|
// Resolve container padding tokens
|
|
33
42
|
const paddingHorizontal = getVariableByName('pageTitle/padding/horizontal', modes) || 16;
|
|
34
43
|
const paddingVertical = getVariableByName('pageTitle/padding/vertical', modes) || 8;
|