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 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","TouchableOpacity","getVariableByName","Icon","jsx","_jsx","jsxs","_jsxs","ChipSelect","label","active","icon","close","modes","style","labelSlot","onPress","resolvedModes","gap","parseInt","paddingHorizontal","paddingVertical","radius","backgroundColor","textColor","fontSize","fontFamily","lineHeight","fontWeight","iconSize","containerStyle","flexDirection","alignItems","justifyContent","borderRadius","textStyle","color","textAlign","renderLabel","isValidElement","cloneElement","children","activeOpacity","name","size"],"sourceRoot":"../../../../src","sources":["components/ChipSelect/ChipSelect.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,EAAEC,gBAAgB,QAAwD,cAAc;AAC3G,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,OAAOC,IAAI,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAyCpC;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAC;EAChBC,KAAK,GAAG,MAAM;EACdC,MAAM,GAAG,KAAK;EACdC,IAAI,GAAG,kBAAkB;EACzBC,KAAK,GAAG,IAAI;EACZC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC,SAAS;EACTC;AACa,CAAC,EAAE;EAChB;EACA;EACA,MAAMC,aAAa,GAAG;IAClB,GAAGJ,KAAK;IACR,kBAAkB,EAAEH,MAAM,GAAG,QAAQ,GAAG;EAC5C,CAAC;;EAED;EACA,MAAMQ,GAAG,GAAGC,QAAQ,CAACjB,iBAAiB,CAAC,gBAAgB,EAAEe,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;EACjF,MAAMG,iBAAiB,GAAGD,QAAQ,CAACjB,iBAAiB,CAAC,+BAA+B,EAAEe,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE;EAC/G,MAAMI,eAAe,GAAGF,QAAQ,CAACjB,iBAAiB,CAAC,6BAA6B,EAAEe,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;EAC1G,MAAMK,MAAM,GAAGH,QAAQ,CAACjB,iBAAiB,CAAC,mBAAmB,EAAEe,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG;;EAEzF;EACA,MAAMM,eAAe,GAAGrB,iBAAiB,CAAC,uBAAuB,EAAEe,aAAa,CAAC,IAAI,SAAS;;EAE9F;EACA,MAAMO,SAAS,GAAGtB,iBAAiB,CAAC,uBAA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A,OAAOF,SAAS;IACpB;IACA,oBAAOV,IAAA,CAACL,IAAI;MAACc,KAAK,EAAEqB,SAAU;MAAAM,QAAA,EAAEhC;IAAK,CAAO,CAAC;EACjD,CAAC;EAED,oBACIF,KAAA,CAACN,gBAAgB;IACba,KAAK,EAAE,CAACgB,cAAc,EAAEhB,KAAK,CAAE;IAC/BE,OAAO,EAAEA,OAAQ;IACjB0B,aAAa,EAAE,GAAI;IAAAD,QAAA,GAGlB9B,IAAI,iBACDN,IAAA,CAACF,IAAI;MAACwC,IAAI,EAAEhC,IAAK;MAACiC,IAAI,EAAEf,QAAS;MAACO,KAAK,EAAEZ;IAAU,CAAE,CACxD,EAEAc,WAAW,CAAC,CAAC,EAGb5B,MAAM,IAAIE,KAAK,iBACZP,IAAA,CAACF,IAAI;MAACwC,IAAI,EAAC,UAAU;MAACC,IAAI,EAAEf,QAAS;MAACO,KAAK,EAAEZ;IAAU,CAAE,CAC5D;EAAA,CACa,CAAC;AAE3B;AAEA,eAAehB,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks';
|
|
2
|
+
import * as ChipSelectStories from './ChipSelect.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ChipSelectStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
<Subtitle>
|
|
8
|
+
A selection chip component that toggles between Idle and Active states.
|
|
9
|
+
</Subtitle>
|
|
10
|
+
|
|
11
|
+
<Description>
|
|
12
|
+
The `ChipSelect` component is used for making selections, such as dates or filters.
|
|
13
|
+
It supports two states driven by the `active` prop:
|
|
14
|
+
- **Idle (`active={false}`)**: Customize with an icon and label.
|
|
15
|
+
- **Active (`active={true}`)**: Displays the label and a close icon. The start icon remains visible if provided.
|
|
16
|
+
|
|
17
|
+
Styling is driven by Figma tokens via `getVariableByName`.
|
|
18
|
+
</Description>
|
|
19
|
+
|
|
20
|
+
<Primary />
|
|
21
|
+
|
|
22
|
+
<Controls />
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Available Collections and Modes
|
|
26
|
+
|
|
27
|
+
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
28
|
+
|
|
29
|
+
### ChipSelect State
|
|
30
|
+
- **Modes:** Idle | Active
|
|
31
|
+
- **Default:** Idle
|
|
32
|
+
|
|
33
|
+
### Color Mode
|
|
34
|
+
- **Modes:** Light | Dark
|
|
35
|
+
- **Default:** Light
|
|
36
|
+
|
|
37
|
+
### Colors Router
|
|
38
|
+
- **Modes:** POC | Old
|
|
39
|
+
- **Default:** POC
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import ChipSelect from './ChipSelect';
|
|
44
|
+
|
|
45
|
+
// Idle State (Icon + Label)
|
|
46
|
+
<ChipSelect
|
|
47
|
+
label="Select Date"
|
|
48
|
+
active={false}
|
|
49
|
+
icon="ic_calendar_week"
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
// Active State (Icon + Label + Close Icon)
|
|
53
|
+
<ChipSelect
|
|
54
|
+
label="12 Oct 2023"
|
|
55
|
+
active={true}
|
|
56
|
+
icon="ic_calendar_week"
|
|
57
|
+
close={true}
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
<Stories />
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## Design Tokens
|
|
65
|
+
|
|
66
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
67
|
+
|
|
68
|
+
- **`chipSelect/background`**
|
|
69
|
+
- **`chipSelect/fontFamily`**
|
|
70
|
+
- **`chipSelect/fontSize`**
|
|
71
|
+
- **`chipSelect/fontWeight`**
|
|
72
|
+
- **`chipSelect/foreground`**
|
|
73
|
+
- **`chipSelect/gap`**
|
|
74
|
+
- **`chipSelect/icon/size`**
|
|
75
|
+
- **`chipSelect/lineHeight`**
|
|
76
|
+
- **`chipSelect/padding/horizontal`**
|
|
77
|
+
- **`chipSelect/padding/vertical`**
|
|
78
|
+
- **`chipSelect/radius`**
|
|
79
|
+
|
|
80
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -3,8 +3,10 @@
|
|
|
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 IconCapsule from '../IconCapsule/IconCapsule';
|
|
7
8
|
import Button from '../Button/Button';
|
|
9
|
+
import { cloneChildrenWithModes } from '../../utils/react-utils';
|
|
8
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
/**
|
|
10
12
|
* CtaCard component that maps directly to the Figma design using design tokens.
|
|
@@ -17,13 +19,20 @@ function CtaCard({
|
|
|
17
19
|
iconName = "ic_upi_number",
|
|
18
20
|
buttonLabel = "Get started",
|
|
19
21
|
onPressButton,
|
|
20
|
-
modes = {},
|
|
22
|
+
modes: propModes = {},
|
|
21
23
|
iconSlot,
|
|
22
24
|
titleSlot,
|
|
23
25
|
bodySlot,
|
|
24
26
|
buttonSlot,
|
|
25
27
|
style
|
|
26
28
|
}) {
|
|
29
|
+
const {
|
|
30
|
+
modes: globalModes
|
|
31
|
+
} = useTokens();
|
|
32
|
+
const modes = {
|
|
33
|
+
...globalModes,
|
|
34
|
+
...propModes
|
|
35
|
+
};
|
|
27
36
|
// --- Token Resolution ---
|
|
28
37
|
// Container
|
|
29
38
|
const backgroundColor = getVariableByName('ctaCard/background', modes) || '#0078ad';
|
|
@@ -78,37 +87,23 @@ function CtaCard({
|
|
|
78
87
|
lineHeight: bodyLineHeight,
|
|
79
88
|
fontWeight: '400' // Regular
|
|
80
89
|
};
|
|
81
|
-
|
|
82
|
-
// --- Slot Helper ---
|
|
83
|
-
// Helper to clone element with modes if no modes are already present on it (standard in this library)
|
|
84
|
-
const renderSlot = slot => {
|
|
85
|
-
if (/*#__PURE__*/React.isValidElement(slot)) {
|
|
86
|
-
return /*#__PURE__*/React.cloneElement(slot, {
|
|
87
|
-
modes: {
|
|
88
|
-
...modes,
|
|
89
|
-
...slot.props.modes
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
return slot;
|
|
94
|
-
};
|
|
95
90
|
return /*#__PURE__*/_jsxs(View, {
|
|
96
91
|
style: [containerStyle, style],
|
|
97
92
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
98
93
|
style: contentWrapStyle,
|
|
99
|
-
children: [iconSlot ?
|
|
94
|
+
children: [iconSlot ? cloneChildrenWithModes(iconSlot, modes) : /*#__PURE__*/_jsx(IconCapsule, {
|
|
100
95
|
iconName: iconName,
|
|
101
96
|
modes: modes
|
|
102
|
-
}), titleSlot ?
|
|
97
|
+
}), titleSlot ? cloneChildrenWithModes(titleSlot, modes) : /*#__PURE__*/_jsx(Text, {
|
|
103
98
|
style: titleStyle,
|
|
104
99
|
children: title
|
|
105
|
-
}), bodySlot ?
|
|
100
|
+
}), bodySlot ? cloneChildrenWithModes(bodySlot, modes) : /*#__PURE__*/_jsx(Text, {
|
|
106
101
|
style: bodyStyle,
|
|
107
102
|
children: body
|
|
108
103
|
})]
|
|
109
|
-
}), buttonSlot ?
|
|
104
|
+
}), buttonSlot ? cloneChildrenWithModes(buttonSlot, modes) : /*#__PURE__*/_jsx(Button, {
|
|
110
105
|
label: buttonLabel,
|
|
111
|
-
onPress: onPressButton,
|
|
106
|
+
onPress: onPressButton || (() => {}),
|
|
112
107
|
modes: modes
|
|
113
108
|
})]
|
|
114
109
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","getVariableByName","IconCapsule","Button","jsx","_jsx","jsxs","_jsxs","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","iconSlot","titleSlot","bodySlot","buttonSlot","style","backgroundColor","radius","paddingHorizontal","paddingVertical","gap","contentGap","titleColor","titleFontFamily","titleFontSize","titleLineHeight","bodyColor","bodyFontFamily","bodyFontSize","bodyLineHeight","containerStyle","borderRadius","alignItems","width","overflow","contentWrapStyle","titleStyle","color","fontFamily","fontSize","lineHeight","fontWeight","bodyStyle","
|
|
1
|
+
{"version":3,"names":["React","View","Text","getVariableByName","useTokens","IconCapsule","Button","cloneChildrenWithModes","jsx","_jsx","jsxs","_jsxs","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","propModes","iconSlot","titleSlot","bodySlot","buttonSlot","style","globalModes","backgroundColor","radius","paddingHorizontal","paddingVertical","gap","contentGap","titleColor","titleFontFamily","titleFontSize","titleLineHeight","bodyColor","bodyFontFamily","bodyFontSize","bodyLineHeight","containerStyle","borderRadius","alignItems","width","overflow","contentWrapStyle","titleStyle","color","fontFamily","fontSize","lineHeight","fontWeight","bodyStyle","children","label","onPress"],"sourceRoot":"../../../../src","sources":["components/CtaCard/CtaCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,OAAOC,WAAW,MAAM,4BAA4B;AACpD,OAAOC,MAAM,MAAM,kBAAkB;AACrC,SAASC,sBAAsB,QAAQ,yBAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuDhE;AACA;AACA;AACA;AACA;AACA,SAASC,OAAOA,CAAC;EACbC,KAAK,GAAG,yBAAyB;EACjCC,IAAI,GAAG,kCAAkC;EACzCC,QAAQ,GAAG,eAAe;EAC1BC,WAAW,GAAG,aAAa;EAC3BC,aAAa;EACbC,KAAK,EAAEC,SAAS,GAAG,CAAC,CAAC;EACrBC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,UAAU;EACVC;AACU,CAAC,EAAE;EACb,MAAM;IAAEN,KAAK,EAAEO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Q,GACLf,sBAAsB,CAACe,QAAQ,EAAEJ,KAAK,CAAC,gBAEvCT,IAAA,CAACP,IAAI;QAACsB,KAAK,EAAE4B,SAAU;QAAAC,QAAA,EAAEvC;MAAI,CAAO,CACvC;IAAA,CACC,CAAC,EAGNS,UAAU,GACPhB,sBAAsB,CAACgB,UAAU,EAAEL,KAAK,CAAC,gBAEzCT,IAAA,CAACH,MAAM;MACHgD,KAAK,EAAEtC,WAAY;MACnBuC,OAAO,EAAEtC,aAAa,KAAK,MAAM,CAAE,CAAC,CAAE;MACtCC,KAAK,EAAEA;IAAM,CAChB,CACJ;EAAA,CACC,CAAC;AAEf;AAEA,eAAeN,OAAO","ignoreList":[]}
|
|
@@ -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 { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
/**
|
|
8
9
|
* Disclaimer text block that mirrors the Figma "Disclaimer" component.
|
|
@@ -27,13 +28,20 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
27
28
|
*/
|
|
28
29
|
function Disclaimer({
|
|
29
30
|
disclaimer = 'All financial services are provided by Jio Payments Bank Pvt. Ltd.',
|
|
30
|
-
modes = {},
|
|
31
|
+
modes: propModes = {},
|
|
31
32
|
style,
|
|
32
33
|
textStyle,
|
|
33
34
|
accessibilityLabel,
|
|
34
35
|
accessibilityHint,
|
|
35
36
|
...rest
|
|
36
37
|
}) {
|
|
38
|
+
const {
|
|
39
|
+
modes: globalModes
|
|
40
|
+
} = useTokens();
|
|
41
|
+
const modes = {
|
|
42
|
+
...globalModes,
|
|
43
|
+
...propModes
|
|
44
|
+
};
|
|
37
45
|
// Resolve typography and color from Figma variables
|
|
38
46
|
const color = getVariableByName('disclaimer/color', modes) || '#24262b';
|
|
39
47
|
const fontSize = getVariableByName('disclaimer/label/fontSize', modes) || 10;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","getVariableByName","jsxs","_jsxs","jsx","_jsx","Disclaimer","disclaimer","modes","style","textStyle","accessibilityLabel","accessibilityHint","rest","color","fontSize","lineHeight","fontFamily","fontWeightRaw","fontWeight","toString","baseTextStyle","textAlign","containerStyle","alignItems","justifyContent","maxWidth","width","defaultAccessibilityLabel","accessibilityRole","children","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/Disclaimer/Disclaimer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,iBAAiB,QAAQ,8CAA8C;AAAA,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","View","Text","getVariableByName","useTokens","jsxs","_jsxs","jsx","_jsx","Disclaimer","disclaimer","modes","propModes","style","textStyle","accessibilityLabel","accessibilityHint","rest","globalModes","color","fontSize","lineHeight","fontFamily","fontWeightRaw","fontWeight","toString","baseTextStyle","textAlign","containerStyle","alignItems","justifyContent","maxWidth","width","defaultAccessibilityLabel","accessibilityRole","children","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/Disclaimer/Disclaimer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAAA,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;AAWhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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,CAAE;IAC/BqB,iBAAiB,EAAC,MAAM;IACxBnB,kBAAkB,EAAEkB,yBAA0B;IAC9CjB,iBAAiB,EAAEA,iBAAkB;IAAA,GACjCC,IAAI;IAAAkB,QAAA,eAER7B,KAAA,CAACJ,IAAI;MACHW,KAAK,EAAE,CAACa,aAAa,EAAEZ,SAAS,CAAE;MAClCsB,2BAA2B,EAAE,IAAK;MAClCC,yBAAyB,EAAC,IAAI;MAAAF,QAAA,GAE7BzB,UAAU,EACV,IAAI;IAAA,CACD;EAAC,CACH,CAAC;AAEX;AAEA,eAAeD,UAAU","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as DisclaimerStories from './Disclaimer.stories';
|
|
3
3
|
import Disclaimer from './Disclaimer';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -16,6 +16,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
16
16
|
### Color Mode
|
|
17
17
|
- **Modes:** Light | Dark
|
|
18
18
|
- **Default:** Light
|
|
19
|
+
|
|
20
|
+
### Colors Router
|
|
21
|
+
- **Modes:** POC | Old
|
|
22
|
+
- **Default:** POC
|
|
19
23
|
## Usage
|
|
20
24
|
|
|
21
25
|
<Canvas>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as DividerStories from './Divider.stories';
|
|
3
3
|
import Divider from './Divider';
|
|
4
4
|
|
|
@@ -19,6 +19,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
19
19
|
### Color Mode
|
|
20
20
|
- **Modes:** Light | Dark
|
|
21
21
|
- **Default:** Light
|
|
22
|
+
|
|
23
|
+
### Colors Router
|
|
24
|
+
- **Modes:** POC | Old
|
|
25
|
+
- **Default:** POC
|
|
22
26
|
## Usage
|
|
23
27
|
|
|
24
28
|
### Horizontal Divider
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as DrawerStories from './Drawer.stories';
|
|
3
3
|
import Drawer from './Drawer';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -13,9 +13,17 @@ Lightweight bottom drawer/sheet with a draggable handle.
|
|
|
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
|
+
### Page type
|
|
17
|
+
- **Modes:** MainPage | SubPage
|
|
18
|
+
- **Default:** MainPage
|
|
19
|
+
|
|
16
20
|
### Color Mode
|
|
17
21
|
- **Modes:** Light | Dark
|
|
18
22
|
- **Default:** Light
|
|
23
|
+
|
|
24
|
+
### Colors Router
|
|
25
|
+
- **Modes:** POC | Old
|
|
26
|
+
- **Default:** POC
|
|
19
27
|
## Usage
|
|
20
28
|
|
|
21
29
|
<Canvas>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { View, Text } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
+
import IconCapsule from '../IconCapsule/IconCapsule';
|
|
8
|
+
import Button from '../Button/Button';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* EmptyState component that displays an icon, title, description and an action button.
|
|
12
|
+
*
|
|
13
|
+
* @component
|
|
14
|
+
*/
|
|
15
|
+
function EmptyState({
|
|
16
|
+
title = "No payments to show",
|
|
17
|
+
description = "Start by paying bills, recharge or your friends",
|
|
18
|
+
iconSlot,
|
|
19
|
+
buttonSlot,
|
|
20
|
+
modes: propModes = {},
|
|
21
|
+
style,
|
|
22
|
+
testID
|
|
23
|
+
}) {
|
|
24
|
+
const {
|
|
25
|
+
modes: globalModes
|
|
26
|
+
} = useTokens();
|
|
27
|
+
const modes = {
|
|
28
|
+
...globalModes,
|
|
29
|
+
...propModes
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Container Tokens
|
|
33
|
+
const gap = getVariableByName('emptyState/gap', modes) || 24;
|
|
34
|
+
const padding = getVariableByName('emptyState/padding', modes) || 4;
|
|
35
|
+
const radius = getVariableByName('emptyState/radius', modes) || 16;
|
|
36
|
+
|
|
37
|
+
// Content Wrap Tokens
|
|
38
|
+
const contentGap = getVariableByName('emptyState/content/gap', modes) || 16;
|
|
39
|
+
|
|
40
|
+
// Title Tokens
|
|
41
|
+
const titleColor = getVariableByName('emptyState/title/color', modes) || '#0d0d0f';
|
|
42
|
+
const titleFontSize = getVariableByName('emptyState/title/fontSize', modes) || 16;
|
|
43
|
+
const titleFontFamily = getVariableByName('emptyState/title/fontFamily', modes) || 'System';
|
|
44
|
+
const titleLineHeight = getVariableByName('emptyState/title/lineHeight', modes) || 18;
|
|
45
|
+
const titleFontWeight = getVariableByName('emptyState/title/fontWeight', modes) || 700;
|
|
46
|
+
|
|
47
|
+
// Body Tokens
|
|
48
|
+
const bodyColor = getVariableByName('emptyState/body/color', modes) || '#1a1c1f';
|
|
49
|
+
const bodyFontSize = getVariableByName('emptyState/body/fontSize', modes) || 12;
|
|
50
|
+
const bodyFontFamily = getVariableByName('emptyState/body/fontFamily', modes) || 'System';
|
|
51
|
+
const bodyLineHeight = getVariableByName('emptyState/body/lineHeight', modes) || 16;
|
|
52
|
+
const bodyFontWeight = getVariableByName('emptyState/body/fontWeight', modes) || 400;
|
|
53
|
+
const containerStyle = {
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
gap: gap,
|
|
58
|
+
padding: padding,
|
|
59
|
+
borderRadius: radius
|
|
60
|
+
// Width is set in Figma as fixed 236, but typical practice is to let it be flexible or controlled by parent
|
|
61
|
+
// However, for strict adherence to "Maximize existing component usage" and specific styles, we can leave width
|
|
62
|
+
// to parent or default to auto.
|
|
63
|
+
};
|
|
64
|
+
const contentWrapStyle = {
|
|
65
|
+
flexDirection: 'column',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
gap: contentGap,
|
|
68
|
+
width: '100%'
|
|
69
|
+
};
|
|
70
|
+
const titleStyle = {
|
|
71
|
+
color: titleColor,
|
|
72
|
+
fontSize: titleFontSize,
|
|
73
|
+
fontFamily: titleFontFamily,
|
|
74
|
+
lineHeight: titleLineHeight,
|
|
75
|
+
fontWeight: String(titleFontWeight),
|
|
76
|
+
textAlign: 'center'
|
|
77
|
+
};
|
|
78
|
+
const bodyStyle = {
|
|
79
|
+
color: bodyColor,
|
|
80
|
+
fontSize: bodyFontSize,
|
|
81
|
+
fontFamily: bodyFontFamily,
|
|
82
|
+
lineHeight: bodyLineHeight,
|
|
83
|
+
fontWeight: String(bodyFontWeight),
|
|
84
|
+
textAlign: 'center'
|
|
85
|
+
};
|
|
86
|
+
const defaultIconSlot = useMemo(() => /*#__PURE__*/_jsx(IconCapsule, {
|
|
87
|
+
modes: modes
|
|
88
|
+
}), [modes]);
|
|
89
|
+
|
|
90
|
+
// Checking if iconSlot is passed; if not use default.
|
|
91
|
+
// If it is passed, we assume the user handles everything or we inject props if it's a valid element?
|
|
92
|
+
// User instructions say: "whenever there is a slot, that's should be implemented as real react slot... manual passing down modes"
|
|
93
|
+
// So we just render what is passed, but for defaults we pass modes.
|
|
94
|
+
// Ideally, if iconSlot is a function we could pass modes, but ReactNode is static.
|
|
95
|
+
// The instruction "make sure modes are always passed to all slot children" implies we might need to cloneElement if possible,
|
|
96
|
+
// AND/OR user needs to pass it manually in usage.
|
|
97
|
+
// But for the DEFAULT slots we render, we definitely pass modes.
|
|
98
|
+
|
|
99
|
+
const iconContent = iconSlot || defaultIconSlot;
|
|
100
|
+
const defaultButtonSlot = useMemo(() => /*#__PURE__*/_jsx(Button, {
|
|
101
|
+
label: "Button",
|
|
102
|
+
modes: modes
|
|
103
|
+
}), [modes]);
|
|
104
|
+
const buttonContent = buttonSlot || defaultButtonSlot;
|
|
105
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
106
|
+
style: [containerStyle, style],
|
|
107
|
+
testID: testID,
|
|
108
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
109
|
+
style: contentWrapStyle,
|
|
110
|
+
children: [iconContent, /*#__PURE__*/_jsx(View, {
|
|
111
|
+
style: {
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
gap: 0
|
|
114
|
+
},
|
|
115
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
116
|
+
style: {
|
|
117
|
+
alignItems: 'center'
|
|
118
|
+
},
|
|
119
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
120
|
+
style: titleStyle,
|
|
121
|
+
children: title
|
|
122
|
+
}), description ? /*#__PURE__*/_jsx(Text, {
|
|
123
|
+
style: bodyStyle,
|
|
124
|
+
children: description
|
|
125
|
+
}) : null]
|
|
126
|
+
})
|
|
127
|
+
})]
|
|
128
|
+
}), buttonContent]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export default EmptyState;
|
|
132
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","getVariableByName","useTokens","IconCapsule","Button","jsx","_jsx","jsxs","_jsxs","EmptyState","title","description","iconSlot","buttonSlot","modes","propModes","style","testID","globalModes","gap","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","iconContent","defaultButtonSlot","label","buttonContent","children"],"sourceRoot":"../../../../src","sources":["components/EmptyState/EmptyState.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,OAAOC,WAAW,MAAM,4BAA4B;AACpD,OAAOC,MAAM,MAAM,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA+BrC;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAC;EAChBC,KAAK,GAAG,qBAAqB;EAC7BC,WAAW,GAAG,iDAAiD;EAC/DC,QAAQ;EACRC,UAAU;EACVC,KAAK,EAAEC,SAAS,GAAG,CAAC,CAAC;EACrBC,KAAK;EACLC;AACa,CAAC,EAAE;EAChB,MAAM;IAAEH,KAAK,EAAEI;EAAY,CAAC,GAAGhB,SAAS,CAAC,CAAC;EAC1C,MAAMY,KAAK,GAAG;IAAE,GAAGI,WAAW;IAAE,GAAGH;EAAU,CAAC;;EAE9C;EACA,MAAMI,GAAG,GAAGlB,iBAAiB,CAAC,gBAAgB,EAAEa,KAAK,CAAC,IAAI,EAAE;EAC5D,MAAMM,OAAO,GAAGnB,iBAAiB,CAAC,oBAAoB,EAAEa,KAAK,CAAC,IAAI,CAAC;EACnE,MAAMO,MAAM,GAAGpB,iBAAiB,CAAC,mBAAmB,EAAEa,KAAK,CAAC,IAAI,EAAE;;EAElE;EACA,MAAMQ,UAAU,GAAGrB,iBAAiB,CAAC,wBAAwB,EAAEa,KAAK,CAAC,IAAI,EAAE;;EAE3E;EACA,MAAMS,UAAU,GAAGtB,iBAAiB,CAAC,wBAAwB,EAAEa,KAAK,CAAC,IAAI,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,UAAW;YAAAc,QAAA,EAAE5C;UAAK,CAAO,CAAC,EACtCC,WAAW,gBAAGL,IAAA,CAACN,IAAI;YAACgB,KAAK,EAAEgC,SAAU;YAAAM,QAAA,EAAE3C;UAAW,CAAO,CAAC,GAAG,IAAI;QAAA,CAChE;MAAC,CACL,CAAC;IAAA,CACL,CAAC,EAGN0C,aAAa;EAAA,CACZ,CAAC;AAEf;AAEA,eAAe5C,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,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
+
import { cloneChildrenWithModes } from '../../utils/react-utils';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* HStack component for horizontal layout using design token spacing.
|
|
11
|
+
*/
|
|
12
|
+
export const HStack = ({
|
|
13
|
+
children,
|
|
14
|
+
alignVertical,
|
|
15
|
+
justifyHorizontal,
|
|
16
|
+
wrap,
|
|
17
|
+
reverse = false,
|
|
18
|
+
as,
|
|
19
|
+
modes: propModes = {},
|
|
20
|
+
style,
|
|
21
|
+
...rest
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
modes: globalModes
|
|
25
|
+
} = useTokens();
|
|
26
|
+
const modes = {
|
|
27
|
+
...globalModes,
|
|
28
|
+
...propModes
|
|
29
|
+
};
|
|
30
|
+
const paddingTop = getVariableByName('hstack/padding/top', modes);
|
|
31
|
+
const paddingBottom = getVariableByName('hstack/padding/bottom', modes);
|
|
32
|
+
const paddingLeft = getVariableByName('hstack/padding/left', modes);
|
|
33
|
+
const paddingRight = getVariableByName('hstack/padding/right', modes);
|
|
34
|
+
const gap = getVariableByName('hstack/gap', modes);
|
|
35
|
+
const flexWrap = typeof wrap === 'boolean' ? wrap ? 'wrap' : 'nowrap' : wrap;
|
|
36
|
+
const containerStyle = {
|
|
37
|
+
flexDirection: reverse ? 'row-reverse' : 'row',
|
|
38
|
+
alignItems: alignVertical,
|
|
39
|
+
justifyContent: justifyHorizontal,
|
|
40
|
+
flexWrap,
|
|
41
|
+
paddingTop,
|
|
42
|
+
paddingBottom,
|
|
43
|
+
paddingLeft,
|
|
44
|
+
paddingRight,
|
|
45
|
+
gap
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Pass modes down to children
|
|
49
|
+
const processedChildren = children ? cloneChildrenWithModes(children, modes) : null;
|
|
50
|
+
const viewProps = {
|
|
51
|
+
...rest,
|
|
52
|
+
as
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/_jsx(View, {
|
|
55
|
+
style: [containerStyle, style],
|
|
56
|
+
...viewProps,
|
|
57
|
+
children: processedChildren
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
export default HStack;
|
|
61
|
+
//# sourceMappingURL=HStack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","getVariableByName","useTokens","cloneChildrenWithModes","jsx","_jsx","HStack","children","alignVertical","justifyHorizontal","wrap","reverse","as","modes","propModes","style","rest","globalModes","paddingTop","paddingBottom","paddingLeft","paddingRight","gap","flexWrap","containerStyle","flexDirection","alignItems","justifyContent","processedChildren","viewProps"],"sourceRoot":"../../../../src","sources":["components/HStack/HStack.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAyC,cAAc;AACpE,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,SAASC,sBAAsB,QAAQ,yBAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoChE;AACA;AACA;AACA,OAAO,MAAMC,MAAM,GAAGA,CAAC;EACnBC,QAAQ;EACRC,aAAa;EACbC,iBAAiB;EACjBC,IAAI;EACJC,OAAO,GAAG,KAAK;EACfC,EAAE;EACFC,KAAK,EAAEC,SAAS,GAAG,CAAC,CAAC;EACrBC,KAAK;EACL,GAAGC;AACM,CAAC,KAAK;EACf,MAAM;IAAEH,KAAK,EAAEI;EAAY,CAAC,GAAGf,SAAS,CAAC,CAAC;EAC1C,MAAMW,KAAK,GAAG;IAAE,GAAGI,WAAW;IAAE,GAAGH;EAAU,CAAC;EAE9C,MAAMI,UAAU,GAAGjB,iBAAiB,CAAC,oBAAoB,EAAEY,KAAK,CAAC;EACjE,MAAMM,aAAa,GAAGlB,iBAAiB,CAAC,uBAAuB,EAAEY,KAAK,CAAC;EACvE,MAAMO,WAAW,GAAGnB,iBAAiB,CAAC,qBAAqB,EAAEY,KAAK,CAAC;EACnE,MAAMQ,YAAY,GAAGpB,iBAAiB,CAAC,sBAAsB,EAAEY,KAAK,CAAC;EACrE,MAAMS,GAAG,GAAGrB,iBAAiB,CAAC,YAAY,EAAEY,KAAK,CAAC;EAElD,MAAMU,QAAQ,GAAG,OAAOb,IAAI,KAAK,SAAS,GAAIA,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAIA,IAAI;EAE9E,MAAMc,cAAyB,GAAG;IAC9BC,aAAa,EAAEd,OAAO,GAAG,aAAa,GAAG,KAAK;IAC9Ce,UAAU,EAAElB,aAAa;IACzBmB,cAAc,EAAElB,iBAAiB;IACjCc,QAAQ;IACRL,UAAU;IACVC,aAAa;IACbC,WAAW;IACXC,YAAY;IACZC;EACJ,CAAC;;EAED;EACA,MAAMM,iBAAiB,GAAGrB,QAAQ,GAC5BJ,sBAAsB,CAACI,QAAQ,EAAEM,KAAK,CAAC,GACvC,IAAI;EAEV,MAAMgB,SAAS,GAAG;IACd,GAAGb,IAAI;IACPJ;EACJ,CAAC;EAED,oBACIP,IAAA,CAACL,IAAI;IAACe,KAAK,EAAE,CAACS,cAAc,EAAET,KAAK,CAAE;IAAA,GAAKc,SAAS;IAAAtB,QAAA,EAC9CqB;EAAiB,CAChB,CAAC;AAEf,CAAC;AAED,eAAetB,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>
|