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
|
@@ -0,0 +1,138 @@
|
|
|
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 _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
|
+
var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
|
|
12
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
/**
|
|
17
|
+
* EmptyState component that displays an icon, title, description and an action button.
|
|
18
|
+
*
|
|
19
|
+
* @component
|
|
20
|
+
*/
|
|
21
|
+
function EmptyState({
|
|
22
|
+
title = "No payments to show",
|
|
23
|
+
description = "Start by paying bills, recharge or your friends",
|
|
24
|
+
iconSlot,
|
|
25
|
+
buttonSlot,
|
|
26
|
+
modes: propModes = {},
|
|
27
|
+
style,
|
|
28
|
+
testID
|
|
29
|
+
}) {
|
|
30
|
+
const {
|
|
31
|
+
modes: globalModes
|
|
32
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
33
|
+
const modes = {
|
|
34
|
+
...globalModes,
|
|
35
|
+
...propModes
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Container Tokens
|
|
39
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('emptyState/gap', modes) || 24;
|
|
40
|
+
const padding = (0, _figmaVariablesResolver.getVariableByName)('emptyState/padding', modes) || 4;
|
|
41
|
+
const radius = (0, _figmaVariablesResolver.getVariableByName)('emptyState/radius', modes) || 16;
|
|
42
|
+
|
|
43
|
+
// Content Wrap Tokens
|
|
44
|
+
const contentGap = (0, _figmaVariablesResolver.getVariableByName)('emptyState/content/gap', modes) || 16;
|
|
45
|
+
|
|
46
|
+
// Title Tokens
|
|
47
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/color', modes) || '#0d0d0f';
|
|
48
|
+
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/fontSize', modes) || 16;
|
|
49
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/fontFamily', modes) || 'System';
|
|
50
|
+
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/lineHeight', modes) || 18;
|
|
51
|
+
const titleFontWeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/fontWeight', modes) || 700;
|
|
52
|
+
|
|
53
|
+
// Body Tokens
|
|
54
|
+
const bodyColor = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/color', modes) || '#1a1c1f';
|
|
55
|
+
const bodyFontSize = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/fontSize', modes) || 12;
|
|
56
|
+
const bodyFontFamily = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/fontFamily', modes) || 'System';
|
|
57
|
+
const bodyLineHeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/lineHeight', modes) || 16;
|
|
58
|
+
const bodyFontWeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/fontWeight', modes) || 400;
|
|
59
|
+
const containerStyle = {
|
|
60
|
+
flexDirection: 'column',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
gap: gap,
|
|
64
|
+
padding: padding,
|
|
65
|
+
borderRadius: radius
|
|
66
|
+
// Width is set in Figma as fixed 236, but typical practice is to let it be flexible or controlled by parent
|
|
67
|
+
// However, for strict adherence to "Maximize existing component usage" and specific styles, we can leave width
|
|
68
|
+
// to parent or default to auto.
|
|
69
|
+
};
|
|
70
|
+
const contentWrapStyle = {
|
|
71
|
+
flexDirection: 'column',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
gap: contentGap,
|
|
74
|
+
width: '100%'
|
|
75
|
+
};
|
|
76
|
+
const titleStyle = {
|
|
77
|
+
color: titleColor,
|
|
78
|
+
fontSize: titleFontSize,
|
|
79
|
+
fontFamily: titleFontFamily,
|
|
80
|
+
lineHeight: titleLineHeight,
|
|
81
|
+
fontWeight: String(titleFontWeight),
|
|
82
|
+
textAlign: 'center'
|
|
83
|
+
};
|
|
84
|
+
const bodyStyle = {
|
|
85
|
+
color: bodyColor,
|
|
86
|
+
fontSize: bodyFontSize,
|
|
87
|
+
fontFamily: bodyFontFamily,
|
|
88
|
+
lineHeight: bodyLineHeight,
|
|
89
|
+
fontWeight: String(bodyFontWeight),
|
|
90
|
+
textAlign: 'center'
|
|
91
|
+
};
|
|
92
|
+
const defaultIconSlot = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
|
|
93
|
+
modes: modes
|
|
94
|
+
}), [modes]);
|
|
95
|
+
|
|
96
|
+
// Checking if iconSlot is passed; if not use default.
|
|
97
|
+
// If it is passed, we assume the user handles everything or we inject props if it's a valid element?
|
|
98
|
+
// User instructions say: "whenever there is a slot, that's should be implemented as real react slot... manual passing down modes"
|
|
99
|
+
// So we just render what is passed, but for defaults we pass modes.
|
|
100
|
+
// Ideally, if iconSlot is a function we could pass modes, but ReactNode is static.
|
|
101
|
+
// The instruction "make sure modes are always passed to all slot children" implies we might need to cloneElement if possible,
|
|
102
|
+
// AND/OR user needs to pass it manually in usage.
|
|
103
|
+
// But for the DEFAULT slots we render, we definitely pass modes.
|
|
104
|
+
|
|
105
|
+
const iconContent = iconSlot || defaultIconSlot;
|
|
106
|
+
const defaultButtonSlot = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
107
|
+
label: "Button",
|
|
108
|
+
modes: modes
|
|
109
|
+
}), [modes]);
|
|
110
|
+
const buttonContent = buttonSlot || defaultButtonSlot;
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
112
|
+
style: [containerStyle, style],
|
|
113
|
+
testID: testID,
|
|
114
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
115
|
+
style: contentWrapStyle,
|
|
116
|
+
children: [iconContent, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
117
|
+
style: {
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
gap: 0
|
|
120
|
+
},
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
122
|
+
style: {
|
|
123
|
+
alignItems: 'center'
|
|
124
|
+
},
|
|
125
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
126
|
+
style: titleStyle,
|
|
127
|
+
children: title
|
|
128
|
+
}), description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
129
|
+
style: bodyStyle,
|
|
130
|
+
children: description
|
|
131
|
+
}) : null]
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
}), buttonContent]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
var _default = exports.default = EmptyState;
|
|
138
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_IconCapsule","_interopRequireDefault","_Button","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EmptyState","title","description","iconSlot","buttonSlot","modes","propModes","style","testID","globalModes","useTokens","gap","getVariableByName","padding","radius","contentGap","titleColor","titleFontSize","titleFontFamily","titleLineHeight","titleFontWeight","bodyColor","bodyFontSize","bodyFontFamily","bodyLineHeight","bodyFontWeight","containerStyle","flexDirection","alignItems","justifyContent","borderRadius","contentWrapStyle","width","titleStyle","color","fontSize","fontFamily","lineHeight","fontWeight","String","textAlign","bodyStyle","defaultIconSlot","useMemo","jsx","iconContent","defaultButtonSlot","label","buttonContent","jsxs","View","children","Text","_default","exports"],"sourceRoot":"../../../../src","sources":["components/EmptyState/EmptyState.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,OAAA,GAAAD,sBAAA,CAAAL,OAAA;AAAqC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAK,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,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AC3C,KAAK,EAAE;UAAEqB,UAAU,EAAE,QAAQ;UAAEjB,GAAG,EAAE;QAAE,CAAE;QAAAwC,QAAA,eA0B1C,IAAAvE,WAAA,CAAAqE,IAAA,EAAC3E,YAAA,CAAA4E,IAAI;UAAC3C,KAAK,EAAE;YAAEqB,UAAU,EAAE;UAAS,CAAE;UAAAuB,QAAA,gBAClC,IAAAvE,WAAA,CAAAgE,GAAA,EAACtE,YAAA,CAAA8E,IAAI;YAAC7C,KAAK,EAAE0B,UAAW;YAAAkB,QAAA,EAAElD;UAAK,CAAO,CAAC,EACtCC,WAAW,gBAAG,IAAAtB,WAAA,CAAAgE,GAAA,EAACtE,YAAA,CAAA8E,IAAI;YAAC7C,KAAK,EAAEkC,SAAU;YAAAU,QAAA,EAAEjD;UAAW,CAAO,CAAC,GAAG,IAAI;QAAA,CAChE;MAAC,CACL,CAAC;IAAA,CACL,CAAC,EAGN8C,aAAa;EAAA,CACZ,CAAC;AAEf;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAvE,OAAA,GAEciB,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
|
+
import * as EmptyStateStories from './EmptyState.stories';
|
|
3
|
+
import EmptyState from './EmptyState';
|
|
4
|
+
|
|
5
|
+
<Meta of={EmptyStateStories} />
|
|
6
|
+
|
|
7
|
+
# EmptyState
|
|
8
|
+
|
|
9
|
+
The `EmptyState` component is used to display messages when there is no content to show, typically with an icon, title, description, and an action button.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Available Collections and Modes
|
|
13
|
+
|
|
14
|
+
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
15
|
+
|
|
16
|
+
### Color Mode
|
|
17
|
+
- **Modes:** Light | Dark
|
|
18
|
+
- **Default:** Light
|
|
19
|
+
|
|
20
|
+
### Colors Router
|
|
21
|
+
- **Modes:** POC | Old
|
|
22
|
+
- **Default:** POC
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { EmptyState } from 'jfs-components';
|
|
27
|
+
|
|
28
|
+
<EmptyState
|
|
29
|
+
title="No payments to show"
|
|
30
|
+
description="Start by paying bills, recharge or your friends"
|
|
31
|
+
modes={{}}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
<Controls />
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
### Default
|
|
42
|
+
|
|
43
|
+
<Canvas of={EmptyStateStories.Default} />
|
|
44
|
+
|
|
45
|
+
### Custom Text
|
|
46
|
+
|
|
47
|
+
<Canvas of={EmptyStateStories.WithCustomText} />
|
|
48
|
+
|
|
49
|
+
### Custom Slots
|
|
50
|
+
|
|
51
|
+
<Canvas of={EmptyStateStories.CustomSlots} />
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Design Tokens
|
|
55
|
+
|
|
56
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
57
|
+
|
|
58
|
+
- **`emptyState/body/color`**
|
|
59
|
+
- **`emptyState/body/fontFamily`**
|
|
60
|
+
- **`emptyState/body/fontSize`**
|
|
61
|
+
- **`emptyState/body/fontWeight`**
|
|
62
|
+
- **`emptyState/body/lineHeight`**
|
|
63
|
+
- **`emptyState/content/gap`**
|
|
64
|
+
- **`emptyState/gap`**
|
|
65
|
+
- **`emptyState/padding`**
|
|
66
|
+
- **`emptyState/radius`**
|
|
67
|
+
- **`emptyState/title/color`**
|
|
68
|
+
- **`emptyState/title/fontFamily`**
|
|
69
|
+
- **`emptyState/title/fontSize`**
|
|
70
|
+
- **`emptyState/title/fontWeight`**
|
|
71
|
+
- **`emptyState/title/lineHeight`**
|
|
72
|
+
|
|
73
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as FilterBarStories from './FilterBar.stories';
|
|
3
3
|
import FilterBar from './FilterBar';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.HStack = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
/**
|
|
15
|
+
* HStack component for horizontal layout using design token spacing.
|
|
16
|
+
*/
|
|
17
|
+
const HStack = ({
|
|
18
|
+
children,
|
|
19
|
+
alignVertical,
|
|
20
|
+
justifyHorizontal,
|
|
21
|
+
wrap,
|
|
22
|
+
reverse = false,
|
|
23
|
+
as,
|
|
24
|
+
modes: propModes = {},
|
|
25
|
+
style,
|
|
26
|
+
...rest
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
modes: globalModes
|
|
30
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
31
|
+
const modes = {
|
|
32
|
+
...globalModes,
|
|
33
|
+
...propModes
|
|
34
|
+
};
|
|
35
|
+
const paddingTop = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/top', modes);
|
|
36
|
+
const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/bottom', modes);
|
|
37
|
+
const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/left', modes);
|
|
38
|
+
const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/right', modes);
|
|
39
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('hstack/gap', modes);
|
|
40
|
+
const flexWrap = typeof wrap === 'boolean' ? wrap ? 'wrap' : 'nowrap' : wrap;
|
|
41
|
+
const containerStyle = {
|
|
42
|
+
flexDirection: reverse ? 'row-reverse' : 'row',
|
|
43
|
+
alignItems: alignVertical,
|
|
44
|
+
justifyContent: justifyHorizontal,
|
|
45
|
+
flexWrap,
|
|
46
|
+
paddingTop,
|
|
47
|
+
paddingBottom,
|
|
48
|
+
paddingLeft,
|
|
49
|
+
paddingRight,
|
|
50
|
+
gap
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Pass modes down to children
|
|
54
|
+
const processedChildren = children ? (0, _reactUtils.cloneChildrenWithModes)(children, modes) : null;
|
|
55
|
+
const viewProps = {
|
|
56
|
+
...rest,
|
|
57
|
+
as
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
60
|
+
style: [containerStyle, style],
|
|
61
|
+
...viewProps,
|
|
62
|
+
children: processedChildren
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
exports.HStack = HStack;
|
|
66
|
+
var _default = exports.default = HStack;
|
|
67
|
+
//# sourceMappingURL=HStack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_reactUtils","_jsxRuntime","e","__esModule","default","HStack","children","alignVertical","justifyHorizontal","wrap","reverse","as","modes","propModes","style","rest","globalModes","useTokens","paddingTop","getVariableByName","paddingBottom","paddingLeft","paddingRight","gap","flexWrap","containerStyle","flexDirection","alignItems","justifyContent","processedChildren","cloneChildrenWithModes","viewProps","jsx","View","exports","_default"],"sourceRoot":"../../../../src","s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BC,aAAa,EAAEhB,OAAO,GAAG,aAAa,GAAG,KAAK;IAC9CiB,UAAU,EAAEpB,aAAa;IACzBqB,cAAc,EAAEpB,iBAAiB;IACjCgB,QAAQ;IACRN,UAAU;IACVE,aAAa;IACbC,WAAW;IACXC,YAAY;IACZC;EACJ,CAAC;;EAED;EACA,MAAMM,iBAAiB,GAAGvB,QAAQ,GAC5B,IAAAwB,kCAAsB,EAACxB,QAAQ,EAAEM,KAAK,CAAC,GACvC,IAAI;EAEV,MAAMmB,SAAS,GAAG;IACd,GAAGhB,IAAI;IACPJ;EACJ,CAAC;EAED,oBACI,IAAAV,WAAA,CAAA+B,GAAA,EAACnC,YAAA,CAAAoC,IAAI;IAACnB,KAAK,EAAE,CAACW,cAAc,EAAEX,KAAK,CAAE;IAAA,GAAKiB,SAAS;IAAAzB,QAAA,EAC9CuB;EAAiB,CAChB,CAAC;AAEf,CAAC;AAAAK,OAAA,CAAA7B,MAAA,GAAAA,MAAA;AAAA,IAAA8B,QAAA,GAAAD,OAAA,CAAA9B,OAAA,GAEcC,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
|
+
import * as HStackStories from './HStack.stories';
|
|
3
|
+
import HStack from './HStack';
|
|
4
|
+
|
|
5
|
+
<Meta of={HStackStories} />
|
|
6
|
+
|
|
7
|
+
# HStack
|
|
8
|
+
|
|
9
|
+
`HStack` arranges its children in a horizontal line. It uses design tokens for spacing and gap.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Available Collections and Modes
|
|
13
|
+
|
|
14
|
+
This component does not use any design token collections with multiple modes.
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { HStack } from 'jfs-components';
|
|
19
|
+
|
|
20
|
+
<HStack justifyHorizontal="space-between" modes={{ 'hstack/gap': 16 }}>
|
|
21
|
+
<View>Left</View>
|
|
22
|
+
<View>Right</View>
|
|
23
|
+
</HStack>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story of={HStackStories.Default} />
|
|
28
|
+
</Canvas>
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
<Controls of={HStackStories.Default} />
|
|
33
|
+
|
|
34
|
+
## Design Tokens
|
|
35
|
+
|
|
36
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
37
|
+
|
|
38
|
+
- **`hstack/gap`**
|
|
39
|
+
- **`hstack/padding/bottom`**
|
|
40
|
+
- **`hstack/padding/left`**
|
|
41
|
+
- **`hstack/padding/right`**
|
|
42
|
+
- **`hstack/padding/top`**
|
|
43
|
+
|
|
44
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as IconButtonStories from './IconButton.stories';
|
|
3
3
|
import IconButton from './IconButton';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -28,6 +28,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
28
28
|
### Color Mode
|
|
29
29
|
- **Modes:** Light | Dark
|
|
30
30
|
- **Default:** Light
|
|
31
|
+
|
|
32
|
+
### Colors Router
|
|
33
|
+
- **Modes:** POC | Old
|
|
34
|
+
- **Default:** POC
|
|
31
35
|
## Usage
|
|
32
36
|
|
|
33
37
|
<Canvas>
|
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
10
11
|
var _Icon = _interopRequireDefault(require("../../icons/Icon"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -40,18 +41,25 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
40
41
|
*/
|
|
41
42
|
function IconCapsule({
|
|
42
43
|
iconName = "ic_card",
|
|
43
|
-
modes = {},
|
|
44
|
+
modes: propModes = {},
|
|
44
45
|
accessibilityLabel,
|
|
45
46
|
accessibilityRole = "image",
|
|
46
47
|
...rest
|
|
47
48
|
}) {
|
|
49
|
+
const {
|
|
50
|
+
modes: globalModes
|
|
51
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
52
|
+
const modes = {
|
|
53
|
+
...globalModes,
|
|
54
|
+
...propModes
|
|
55
|
+
};
|
|
48
56
|
// Resolve design tokens using the provided modes
|
|
49
57
|
const size = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/size', modes) || 42;
|
|
50
58
|
const radius = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/radius', modes) || 9999;
|
|
51
59
|
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/background', modes) || '#cfa159';
|
|
52
|
-
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('
|
|
53
|
-
const borderSize = (0, _figmaVariablesResolver.getVariableByName)('
|
|
54
|
-
const iconColor = (0, _figmaVariablesResolver.getVariableByName)('
|
|
60
|
+
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/border/color', modes) || 'rgba(255,255,255,0)';
|
|
61
|
+
const borderSize = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/border/size', modes) || 1;
|
|
62
|
+
const iconColor = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/icon/color', modes) || '#0f0d0a';
|
|
55
63
|
const iconSize = (0, _figmaVariablesResolver.getVariableByName)('iconCapsule/icon/size', modes) || 18;
|
|
56
64
|
|
|
57
65
|
// Convert radius to React Native format (if 9999, use size/2 for perfect circle)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_Icon","_jsxRuntime","e","__esModule","default","IconCapsule","iconName","modes","accessibilityLabel","accessibilityRole","rest","size","getVariableByName","radius","backgroundColor","borderColor","borderSize","iconColor","iconSize","borderRadius","containerStyle","width","height","borderWidth","overflow","alignItems","justifyContent","defaultAccessibilityLabel","replace","l","toUpperCase","jsx","View","style","children","name","color","accessibilityElementsHidden","importantForAccessibility","_default","exports"],"sourceRoot":"../../../../src","sources":["components/IconCapsule/IconCapsule.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_Icon","_jsxRuntime","e","__esModule","default","IconCapsule","iconName","modes","propModes","accessibilityLabel","accessibilityRole","rest","globalModes","useTokens","size","getVariableByName","radius","backgroundColor","borderColor","borderSize","iconColor","iconSize","borderRadius","containerStyle","width","height","borderWidth","overflow","alignItems","justifyContent","defaultAccessibilityLabel","replace","l","toUpperCase","jsx","View","style","children","name","color","accessibilityElementsHidden","importantForAccessibility","_default","exports"],"sourceRoot":"../../../../src","sources":["components/IconCapsule/IconCapsule.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAmC,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,O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;IACXW,MAAM,EAAEX,IAAI;IACZQ,YAAY,EAAEA,YAAY;IAC1BI,WAAW,EAAEP,UAAU;IACvBD,WAAW,EAAEA,WAAW;IACxBD,eAAe,EAAEA,eAAe;IAChCU,QAAQ,EAAE,QAAQ;IAClBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;;EAED;EACA,MAAMC,yBAAyB,GAAGrB,kBAAkB,IAAIH,QAAQ,CAACyB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,OAAO,EAAEC,CAAC,IAAIA,CAAC,CAACC,WAAW,CAAC,CAAC,CAAC;EAE9I,oBACE,IAAAhC,WAAA,CAAAiC,GAAA,EAACrC,YAAA,CAAAsC,IAAI;IACHC,KAAK,EAAEb,cAAe;IACtBb,iBAAiB,EAAEA,iBAAkB;IACrCD,kBAAkB,EAAEqB,yBAA0B;IAAA,GAC1CnB,IAAI;IAAA0B,QAAA,eAER,IAAApC,WAAA,CAAAiC,GAAA,EAAClC,KAAA,CAAAI,OAAI;MACHkC,IAAI,EAAEhC,QAAS;MACfQ,IAAI,EAAEO,QAAS;MACfkB,KAAK,EAAEnB,SAAU;MACjBoB,2BAA2B,EAAE,IAAK;MAClCC,yBAAyB,EAAC;IAAI,CAC/B;EAAC,CACE,CAAC;AAEX;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvC,OAAA,GAEcC,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';
|
|
@@ -7,41 +7,14 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
/**
|
|
13
14
|
* Helper function to recursively clone children and pass modes prop to components that accept it.
|
|
14
15
|
* This ensures that all child components in slots receive the modes prop from the parent.
|
|
15
|
-
*/
|
|
16
|
-
const result = _react.default.Children.map(children, child => {
|
|
17
|
-
if (! /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
18
|
-
return child;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Get existing children
|
|
22
|
-
const childChildren = child.props?.children;
|
|
23
|
-
const hasChildren = childChildren !== undefined && childChildren !== null;
|
|
24
|
-
|
|
25
|
-
// Clone the child with modes prop if it doesn't already have one
|
|
26
|
-
// or merge with existing modes if it does
|
|
27
|
-
// Merge order: parent modes first, then child's explicit modes override them
|
|
28
|
-
const existingModes = child.props?.modes;
|
|
29
|
-
const mergedModes = existingModes ? {
|
|
30
|
-
...modes,
|
|
31
|
-
...existingModes
|
|
32
|
-
} : modes;
|
|
33
|
-
|
|
34
|
-
// Recursively process children if they exist
|
|
35
|
-
const processedChildren = hasChildren ? cloneChildrenWithModes(_react.default.Children.toArray(childChildren), modes) : undefined;
|
|
16
|
+
*/
|
|
36
17
|
|
|
37
|
-
// Clone element with modes and processed children
|
|
38
|
-
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
39
|
-
...child.props,
|
|
40
|
-
modes: mergedModes
|
|
41
|
-
}, processedChildren);
|
|
42
|
-
});
|
|
43
|
-
return result || [];
|
|
44
|
-
}
|
|
45
18
|
/**
|
|
46
19
|
* ListGroup component that mirrors the Figma "List Group" component.
|
|
47
20
|
*
|
|
@@ -103,7 +76,7 @@ function ListGroup({
|
|
|
103
76
|
};
|
|
104
77
|
|
|
105
78
|
// Clone listGroupSlot children and pass modes to all children that accept it
|
|
106
|
-
const processedSlot = listGroupSlot ? cloneChildrenWithModes(_react.default.Children.toArray(listGroupSlot), modes) : null;
|
|
79
|
+
const processedSlot = listGroupSlot ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(listGroupSlot), modes) : null;
|
|
107
80
|
|
|
108
81
|
// Use provided accessibilityLabel or fall back to label
|
|
109
82
|
const defaultAccessibilityLabel = accessibilityLabel || label || "List group";
|