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
|
@@ -1,63 +1,75 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
1
|
+
import { Canvas, Meta, Story, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as AppBarStories from './AppBar.stories';
|
|
3
|
-
import AppBar from './AppBar';
|
|
4
|
-
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
5
3
|
|
|
6
4
|
<Meta of={AppBarStories} />
|
|
7
5
|
|
|
8
6
|
# AppBar
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
The `AppBar` component supports two main types tailored for different hierarchy levels in the app:
|
|
9
|
+
- **MainPage**: Taller bar, typically used on landing pages. Supports branding (leading), and varied actions.
|
|
10
|
+
- **SubPage**: Standard height, used for inner pages. Typically features a "Back" arrow and a page title.
|
|
11
|
+
|
|
11
12
|
|
|
12
13
|
## Available Collections and Modes
|
|
13
14
|
|
|
14
|
-
This component
|
|
15
|
-
## Usage
|
|
15
|
+
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
### Color Mode
|
|
18
|
+
- **Modes:** Light | Dark
|
|
19
|
+
- **Default:** Light
|
|
20
|
+
|
|
21
|
+
### Colors Router
|
|
22
|
+
- **Modes:** POC | Old
|
|
23
|
+
- **Default:** POC
|
|
24
|
+
## Usage
|
|
20
25
|
|
|
26
|
+
```tsx
|
|
27
|
+
import { AppBar } from 'jfs-components';
|
|
28
|
+
// or relative path...
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
// MainPage Example
|
|
31
|
+
<AppBar
|
|
32
|
+
type="MainPage"
|
|
33
|
+
leadingSlot={<JioLogo />}
|
|
34
|
+
actionsSlot={
|
|
35
|
+
<>
|
|
36
|
+
<IconButton iconName="ic_search" />
|
|
37
|
+
<IconButton iconName="ic_notification" />
|
|
38
|
+
<Avatar />
|
|
39
|
+
</>
|
|
40
|
+
}
|
|
29
41
|
/>
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</AnatomySection>
|
|
39
|
-
|
|
40
|
-
<UsageConstraintsSection
|
|
41
|
-
items={[
|
|
42
|
-
'Pass shared `modes` so token-driven spacing and sizes stay consistent across slots and Avatar.',
|
|
43
|
-
'Avoid focusable controls in the middle slot; it is for display content and hidden from the accessibility tree.',
|
|
44
|
-
'Provide explicit `onLeadingPress`/`onPress` handlers to avoid inert navigation controls.',
|
|
45
|
-
'Override layout with `style` sparingly—keep token padding to preserve tap targets.',
|
|
46
|
-
]}
|
|
43
|
+
// SubPage Example
|
|
44
|
+
<AppBar
|
|
45
|
+
type="SubPage"
|
|
46
|
+
// Default leading is back arrow, so leadingSlot can be omitted if that's desired
|
|
47
|
+
onLeadingPress={() => navigation.goBack()}
|
|
48
|
+
middleSlot={<Text style={{ fontWeight: 'bold' }}>Settings</Text>}
|
|
49
|
+
actionsSlot={<IconButton iconName="ic_more_horizontal" />}
|
|
47
50
|
/>
|
|
51
|
+
```
|
|
52
|
+
|
|
48
53
|
## Props
|
|
49
54
|
|
|
50
|
-
<
|
|
55
|
+
<Controls />
|
|
56
|
+
|
|
57
|
+
## Slots & Modes
|
|
58
|
+
|
|
59
|
+
The `AppBar` automatically passes `modes` down to all children within `leadingSlot`, `middleSlot`, and `actionsSlot`.
|
|
60
|
+
This ensures that if you switch the AppBar's mode (e.g. to Dark Mode), all buttons and text inside will adapt if they respect the `modes` prop.
|
|
51
61
|
|
|
52
62
|
## Design Tokens
|
|
53
63
|
|
|
54
64
|
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
55
65
|
|
|
56
|
-
- **`
|
|
57
|
-
- **`
|
|
58
|
-
- **`
|
|
59
|
-
- **`
|
|
60
|
-
- **`
|
|
61
|
-
- **`
|
|
66
|
+
- **`appBar/mainPage/actions/gap`**
|
|
67
|
+
- **`appBar/mainPage/background`**
|
|
68
|
+
- **`appBar/mainPage/padding/horizontal`**
|
|
69
|
+
- **`appBar/mainPage/padding/vertical`**
|
|
70
|
+
- **`appBar/subPage/actions/gap`**
|
|
71
|
+
- **`appBar/subPage/background`**
|
|
72
|
+
- **`appBar/subPage/padding/horizontal`**
|
|
73
|
+
- **`appBar/subPage/padding/vertical`**
|
|
62
74
|
|
|
63
75
|
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 AvatarStories from './Avatar.stories';
|
|
3
3
|
import Avatar from './Avatar';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -13,6 +13,10 @@ Avatar component that displays either an image or a monogram.
|
|
|
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
|
+
### Context4
|
|
17
|
+
- **Modes:** Default | Chip
|
|
18
|
+
- **Default:** Default
|
|
19
|
+
|
|
16
20
|
### Avatar Size
|
|
17
21
|
- **Modes:** L | M | S
|
|
18
22
|
- **Default:** L
|
|
@@ -20,6 +24,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
20
24
|
### Color Mode
|
|
21
25
|
- **Modes:** Light | Dark
|
|
22
26
|
- **Default:** Light
|
|
27
|
+
|
|
28
|
+
### Colors Router
|
|
29
|
+
- **Modes:** POC | Old
|
|
30
|
+
- **Default:** POC
|
|
23
31
|
## Usage
|
|
24
32
|
|
|
25
33
|
<Canvas>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as AvatarGroupStories from './AvatarGroup.stories';
|
|
3
3
|
import AvatarGroup from './AvatarGroup';
|
|
4
4
|
|
|
@@ -12,9 +12,17 @@ AvatarGroup component with design-token-driven styling.
|
|
|
12
12
|
|
|
13
13
|
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
14
14
|
|
|
15
|
+
### Context4
|
|
16
|
+
- **Modes:** Default | Chip
|
|
17
|
+
- **Default:** Default
|
|
18
|
+
|
|
15
19
|
### Avatar Size
|
|
16
20
|
- **Modes:** L | M | S
|
|
17
21
|
- **Default:** L
|
|
22
|
+
|
|
23
|
+
### Colors Router
|
|
24
|
+
- **Modes:** POC | Old
|
|
25
|
+
- **Default:** POC
|
|
18
26
|
## Usage
|
|
19
27
|
|
|
20
28
|
<Canvas>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = 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 _MoneyValue = _interopRequireDefault(require("../MoneyValue/MoneyValue"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
/**
|
|
14
|
+
* Balance component that displays a title and a monetary value.
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @example
|
|
18
|
+
* ```jsx
|
|
19
|
+
* <Balance title="Total Balance" amount="12500" />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function Balance({
|
|
23
|
+
title = "Total owed to people",
|
|
24
|
+
amount = "500",
|
|
25
|
+
currency = "₹",
|
|
26
|
+
modes = {},
|
|
27
|
+
style,
|
|
28
|
+
children
|
|
29
|
+
}) {
|
|
30
|
+
// Resolve design tokens
|
|
31
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('balance/gap', modes) ?? 6;
|
|
32
|
+
|
|
33
|
+
// Title styles
|
|
34
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('balance/title/foreground', modes) ?? '#0c0d10';
|
|
35
|
+
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontSize', modes) ?? 14;
|
|
36
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontFamily', modes) ?? 'System';
|
|
37
|
+
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('balance/title/lineHeight', modes) ?? 18;
|
|
38
|
+
const titleFontWeightValue = (0, _figmaVariablesResolver.getVariableByName)('balance/title/fontWeight', modes) ?? 500;
|
|
39
|
+
const titleFontWeight = typeof titleFontWeightValue === 'number' ? titleFontWeightValue.toString() : titleFontWeightValue;
|
|
40
|
+
const containerStyle = {
|
|
41
|
+
flexDirection: 'column',
|
|
42
|
+
alignItems: 'flex-start',
|
|
43
|
+
gap: gap
|
|
44
|
+
};
|
|
45
|
+
const titleStyle = {
|
|
46
|
+
color: titleColor,
|
|
47
|
+
fontSize: titleFontSize,
|
|
48
|
+
fontFamily: titleFontFamily,
|
|
49
|
+
lineHeight: titleLineHeight,
|
|
50
|
+
fontWeight: titleFontWeight
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Handle slot children or default content
|
|
54
|
+
const content = _react.default.Children.map(children, child => {
|
|
55
|
+
if (/*#__PURE__*/_react.default.isValidElement(child)) {
|
|
56
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
57
|
+
modes
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return child;
|
|
61
|
+
});
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
63
|
+
style: [containerStyle, style],
|
|
64
|
+
"data-node-id": "1986:6203",
|
|
65
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
66
|
+
style: titleStyle,
|
|
67
|
+
"data-node-id": "1986:2613",
|
|
68
|
+
children: title
|
|
69
|
+
}), children ? content : /*#__PURE__*/(0, _jsxRuntime.jsx)(_MoneyValue.default, {
|
|
70
|
+
value: amount,
|
|
71
|
+
currency: currency,
|
|
72
|
+
modes: modes
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
var _default = exports.default = Balance;
|
|
77
|
+
//# sourceMappingURL=Balance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_MoneyValue","_jsxRuntime","e","__esModule","default","Balance","title","amount","currency","modes","style","children","gap","getVariableByName","titleColor","titleFontSize","titleFontFamily","titleLineHeight","titleFontWeightValue","titleFontWeight","toString","containerStyle","flexDirection","alignItems","titleStyle","color","fontSize","fontFamily","lineHeight","fontWeight","content","React","Children","map","child","isValidElement","cloneElement","jsxs","View","jsx","Text","value","_default","exports"],"sourceRoot":"../../../../src","sources":["components/Balance/Balance.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAiD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAiCjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,OAAOA,CAAC;EACbC,KAAK,GAAG,sBAAsB;EAC9BC,MAAM,GAAG,KAAK;EACdC,QAAQ,GAAG,GAAG;EACdC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC;AACU,CAAC,EAAE;EACb;EACA,MAAMC,GAAG,GAAG,IAAAC,yCAAiB,EAAC,aAAa,EAAEJ,KAAK,CAAC,IAAI,CAAC;;EAExD;EACA,MAAMK,UAAU,GAAG,IAAAD,yCAAiB,EAAC,0BAA0B,EAAEJ,KAAK,CAAC,IAAI,SAAS;EACpF,MAAMM,aAAa,GAAG,IAAAF,yCAAiB,EAAC,wBAAwB,EAAEJ,KAAK,CAAC,IAAI,EAAE;EAC9E,MAAMO,eA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,QAAQ,GACLmB,OAAO,gBAEP,IAAA7B,WAAA,CAAAsC,GAAA,EAACvC,WAAA,CAAAI,OAAU;MACPqC,KAAK,EAAElC,MAAO;MACdC,QAAQ,EAAEA,QAAS;MACnBC,KAAK,EAAEA;IAAM,CAChB,CACJ;EAAA,CACC,CAAC;AAEf;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAAvC,OAAA,GAEcC,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
|
|
2
|
+
import Balance from './Balance';
|
|
3
|
+
import * as BalanceStories from './Balance.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={BalanceStories} />
|
|
6
|
+
|
|
7
|
+
# Balance
|
|
8
|
+
|
|
9
|
+
The `Balance` component displays a title and a monetary value, typically used to show total amounts or outstanding balances.
|
|
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 { Balance } from 'jfs-components';
|
|
19
|
+
|
|
20
|
+
// Basic usage
|
|
21
|
+
<Balance
|
|
22
|
+
title="Total owed to people"
|
|
23
|
+
amount="50,000.67"
|
|
24
|
+
currency="₹"
|
|
25
|
+
/>
|
|
26
|
+
|
|
27
|
+
// With modes
|
|
28
|
+
<Balance
|
|
29
|
+
title="Total Balance"
|
|
30
|
+
amount="12,500.00"
|
|
31
|
+
modes={{ "Color Mode": "Dark" }}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
<ArgsTable of={Balance} />
|
|
38
|
+
|
|
39
|
+
## Stories
|
|
40
|
+
|
|
41
|
+
### Default
|
|
42
|
+
<Canvas of={BalanceStories.Default} />
|
|
43
|
+
|
|
44
|
+
### With Modes
|
|
45
|
+
<Canvas of={BalanceStories.WithModes} />
|
|
46
|
+
|
|
47
|
+
### Custom Slot
|
|
48
|
+
<Canvas of={BalanceStories.CustomSlot} />
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Design Tokens
|
|
52
|
+
|
|
53
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
54
|
+
|
|
55
|
+
- **`balance/gap`**
|
|
56
|
+
- **`balance/title/fontFamily`**
|
|
57
|
+
- **`balance/title/fontSize`**
|
|
58
|
+
- **`balance/title/fontWeight`**
|
|
59
|
+
- **`balance/title/foreground`**
|
|
60
|
+
- **`balance/title/lineHeight`**
|
|
61
|
+
|
|
62
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -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 _BottomNavItem = _interopRequireDefault(require("../BottomNavItem/BottomNavItem"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -53,13 +54,20 @@ function BottomNav({
|
|
|
53
54
|
label: 'Explore',
|
|
54
55
|
iconName: 'ic_search'
|
|
55
56
|
}],
|
|
56
|
-
modes = {},
|
|
57
|
+
modes: propModes = {},
|
|
57
58
|
onItemPress,
|
|
58
59
|
style,
|
|
59
60
|
accessibilityLabel = "Bottom navigation",
|
|
60
61
|
accessibilityHint,
|
|
61
62
|
...rest
|
|
62
63
|
}) {
|
|
64
|
+
const {
|
|
65
|
+
modes: globalModes
|
|
66
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
67
|
+
const modes = {
|
|
68
|
+
...globalModes,
|
|
69
|
+
...propModes
|
|
70
|
+
};
|
|
63
71
|
// Resolve container styling tokens
|
|
64
72
|
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('bottomNav/background', modes) || '#ffffff';
|
|
65
73
|
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('bottomNav/border/color', modes) || '#cccfd1';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_BottomNavItem","_jsxRuntime","e","__esModule","default","BottomNav","items","key","label","iconName","modes","onItemPress","style","accessibilityLabel","accessibilityHint","rest","backgroundColor","getVariableByName","borderColor","borderWidth","paddingTop","paddingBottom","paddingHorizontal","containerStyle","flexDirection","alignItems","borderTopWidth","borderTopColor","borderLeftWidth","borderRightWidth","borderBottomWidth","renderItem","item","itemModes","handlePress","onPress","jsx","undefined","onKeyPress","nativeEvent","disabled","flex","labelStyle","iconColor","iconSize","View","accessibilityRole","children","map","_default","exports"],"sourceRoot":"../../../../src","sources":["components/BottomNav/BottomNav.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_BottomNavItem","_jsxRuntime","e","__esModule","default","BottomNav","items","key","label","iconName","modes","propModes","onItemPress","style","accessibilityLabel","accessibilityHint","rest","globalModes","useTokens","backgroundColor","getVariableByName","borderColor","borderWidth","paddingTop","paddingBottom","paddingHorizontal","containerStyle","flexDirection","alignItems","borderTopWidth","borderTopColor","borderLeftWidth","borderRightWidth","borderBottomWidth","renderItem","item","itemModes","handlePress","onPress","jsx","undefined","onKeyPress","nativeEvent","disabled","flex","labelStyle","iconColor","iconSize","View","accessibilityRole","children","map","_default","exports"],"sourceRoot":"../../../../src","sources":["components/BottomNav/BottomNav.tsx"],"mappings":";;;;;;A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,IAAI,CAACY;MAAS,CAAC,GAAG,CAAC,CAAC;IAAA,GAnB9DZ,IAAI,CAAC5B,GAAG,IAAI4B,IAAI,CAAC3B,KAoBvB,CAAC;EAEN,CAAC;EAED,oBACE,IAAAP,WAAA,CAAAsC,GAAA,EAAC1C,YAAA,CAAAmD,IAAI;IACHnC,KAAK,EAAE,CAACa,cAAc,EAAEb,KAAK,CAAE;IAC/BoC,iBAAiB,EAAC,SAAS;IAC3BnC,kBAAkB,EAAEA,kBAAmB;IAAA,IAClCC,iBAAiB,KAAKyB,SAAS,GAAG;MAAEzB;IAAkB,CAAC,GAAG,CAAC,CAAC;IAAA,GAC7DC,IAAI;IAAAkC,QAAA,EAEP5C,KAAK,CAAC6C,GAAG,CAACjB,UAAU;EAAC,CAClB,CAAC;AAEX;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAAjD,OAAA,GAEcC,SAAS","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as BottomNavStories from './BottomNav.stories';
|
|
3
3
|
import BottomNav from './BottomNav';
|
|
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>
|
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(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 _webPlatformUtils = require("../../utils/web-platform-utils");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -37,7 +38,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
37
38
|
function BottomNavItem({
|
|
38
39
|
iconName = 'ic_home',
|
|
39
40
|
label = 'Home',
|
|
40
|
-
modes = {},
|
|
41
|
+
modes: propModes = {},
|
|
41
42
|
onPress,
|
|
42
43
|
disabled = false,
|
|
43
44
|
style,
|
|
@@ -50,6 +51,13 @@ function BottomNavItem({
|
|
|
50
51
|
webAccessibilityProps,
|
|
51
52
|
...rest
|
|
52
53
|
}) {
|
|
54
|
+
const {
|
|
55
|
+
modes: globalModes
|
|
56
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
57
|
+
const modes = {
|
|
58
|
+
...globalModes,
|
|
59
|
+
...propModes
|
|
60
|
+
};
|
|
53
61
|
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
54
62
|
const [isHovered, setIsHovered] = (0, _react.useState)(false);
|
|
55
63
|
const pressedStyle = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_figmaVariablesResolver","_Icon","_interopRequireDefault","_webPlatformUtils","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BottomNavItem","iconName","label","modes","onPress","disabled","style","labelStyle","iconColor","iconColorOverride","iconSize","iconSizeOverride","accessibilityLabel","accessibilityHint","accessibilityState","webAccessibilityProps","rest","isFocused","setIsFocused","useState","isHovered","setIsHovered","pressedStyle","opacity","focusStyle","borderBottomWidth","borderBottomColor","hoverStyle","gap","getVariableByName","fontFamily","fontWeightRaw","fontWeight","toString","fontSize","lineHeight","labelColor","resolvedIconColor","resolvedIconSize","baseContainerStyle","alignItems","textStyle","color","textAlign","marginTop","defaultAccessibilityLabel","webProps","usePressableWebSupport","restProps","undefined","renderContent","jsxs","Fragment","children","jsx","name","size","accessibilityElementsHidden","importantForAccessibility","Text","View","accessibilityRole","Pressable","selected","onPressIn","onPressOut","onFocus","onBlur","onHoverIn","onHoverOut","pressed","_default","exports"],"sourceRoot":"../../../../src","sources":["components/BottomNavItem/BottomNavItem.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAC,sBAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_Icon","_interopRequireDefault","_webPlatformUtils","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BottomNavItem","iconName","label","modes","propModes","onPress","disabled","style","labelStyle","iconColor","iconColorOverride","iconSize","iconSizeOverride","accessibilityLabel","accessibilityHint","accessibilityState","webAccessibilityProps","rest","globalModes","useTokens","isFocused","setIsFocused","useState","isHovered","setIsHovered","pressedStyle","opacity","focusStyle","borderBottomWidth","borderBottomColor","hoverStyle","gap","getVariableByName","fontFamily","fontWeightRaw","fontWeight","toString","fontSize","lineHeight","labelColor","resolvedIconColor","resolvedIconSize","baseContainerStyle","alignItems","textStyle","color","textAlign","marginTop","defaultAccessibilityLabel","webProps","usePressableWebSupport","restProps","undefined","renderContent","jsxs","Fragment","children","jsx","name","size","accessibilityElementsHidden","importantForAccessibility","Text","View","accessibilityRole","Pressable","selected","onPressIn","onPressOut","onFocus","onBlur","onHoverIn","onHoverOut","pressed","_default","exports"],"sourceRoot":"../../../../src","sources":["components/BottomNavItem/BottomNavItem.tsx"],"mappings":";;;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|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as BottomNavItemStories from './BottomNavItem.stories';
|
|
3
3
|
import BottomNavItem from './BottomNavItem';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -20,6 +20,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
20
20
|
### Color Mode
|
|
21
21
|
- **Modes:** Light | Dark
|
|
22
22
|
- **Default:** Light
|
|
23
|
+
|
|
24
|
+
### Colors Router
|
|
25
|
+
- **Modes:** POC | Old
|
|
26
|
+
- **Default:** POC
|
|
23
27
|
## Usage
|
|
24
28
|
|
|
25
29
|
<Canvas>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as ButtonStories from './Button.stories';
|
|
3
3
|
import Button from './Button';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -29,6 +29,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
29
29
|
- **Modes:** Light | Dark
|
|
30
30
|
- **Default:** Light
|
|
31
31
|
|
|
32
|
+
### Colors Router
|
|
33
|
+
- **Modes:** POC | Old
|
|
34
|
+
- **Default:** POC
|
|
35
|
+
|
|
32
36
|
### Appearance.System
|
|
33
37
|
- **Modes:** positive | warning | negative
|
|
34
38
|
- **Default:** positive
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = 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 _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* ButtonGroup component that aggregates multiple buttons (e.g., IconButton)
|
|
14
|
+
* and handles their layout and styling/theming via design tokens.
|
|
15
|
+
*
|
|
16
|
+
* It passes the provided `modes` to all its immediate React Element children.
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <ButtonGroup modes={{"Appearance": "light"}}>
|
|
22
|
+
* <IconButton iconName="ic_qr_code" />
|
|
23
|
+
* <IconButton iconName="ic_photo" />
|
|
24
|
+
* </ButtonGroup>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
function ButtonGroup({
|
|
28
|
+
children,
|
|
29
|
+
modes = {},
|
|
30
|
+
style
|
|
31
|
+
}) {
|
|
32
|
+
// Resolve design tokens
|
|
33
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('buttonGroup/padding/gap', modes) ?? 12;
|
|
34
|
+
const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('buttonGroup/padding/horizontal', modes) ?? 0;
|
|
35
|
+
const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('buttonGroup/padding/vertical', modes) ?? 0;
|
|
36
|
+
|
|
37
|
+
// Container style
|
|
38
|
+
const containerStyle = {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
gap: gap,
|
|
42
|
+
paddingHorizontal: paddingHorizontal,
|
|
43
|
+
paddingVertical: paddingVertical
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Clone children to pass `modes` prop
|
|
47
|
+
const childrenWithModes = _react.default.Children.map(children, child => {
|
|
48
|
+
if (/*#__PURE__*/_react.default.isValidElement(child)) {
|
|
49
|
+
// We safely try to pass `modes` to the child.
|
|
50
|
+
// If the child doesn't accept `modes`, it will just be an extra prop which is usually fine in React,
|
|
51
|
+
// but ideally children should be components that respect `modes`.
|
|
52
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
53
|
+
modes: modes
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return child;
|
|
57
|
+
});
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
59
|
+
style: [containerStyle, style],
|
|
60
|
+
children: childrenWithModes
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
var _default = exports.default = ButtonGroup;
|
|
64
|
+
//# sourceMappingURL=ButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_jsxRuntime","e","__esModule","default","ButtonGroup","children","modes","style","gap","getVariableByName","paddingHorizontal","paddingVertical","containerStyle","flexDirection","alignItems","childrenWithModes","React","Children","map","child","isValidElement","cloneElement","jsx","View","_default","exports"],"sourceRoot":"../../../../src","sources":["components/ButtonGroup/ButtonGroup.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,uBAAA,GAAAF,OAAA;AAAgF,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmBhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,WAAWA,CAAC;EACjBC,QAAQ;EACRC,KAAK,GAAG,CAAC,CAAC;EACVC;AACc,CAAC,EAAE;EACjB;EACA,MAAMC,GAAG,GAAG,IAAAC,yCAAiB,EAAC,yBAAyB,EAAEH,KAAK,CAAC,IAAI,EAAE;EACrE,MAAMI,iBAAiB,GAAG,IAAAD,yCAAiB,EAAC,gCAAgC,EAAEH,KAAK,CAAC,IAAI,CAAC;EACzF,MAAMK,eAAe,GAAG,IAAAF,yCAAiB,EAAC,8BAA8B,EAAEH,KAAK,CAAC,IAAI,CAAC;;EAErF;EACA,MAAMM,cAAyB,GAAG;IAC9BC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBN,GAAG,EAAEA,GAAG;IACRE,iBAAiB,EAAEA,iBAAiB;IACpCC,eAAe,EAAEA;EACrB,CAAC;;EAED;EACA,MAAMI,iBAAiB,GAAGC,cAAK,CAACC,QAAQ,CAACC,GAAG,CAACb,QAAQ,EAAGc,KAAK,IAAK;IAC9D,iBAAIH,cAAK,CAACI,cAAc,CAACD,KAAK,CAAC,EAAE;MAC7B;MACA;MACA;MACA,oBAAOH,cAAK,CAACK,YAAY,CAACF,KAAK,EAAE;QAAEb,KAAK,EAAEA;MAAM,CAAQ,CAAC;IAC7D;IACA,OAAOa,KAAK;EAChB,CAAC,CAAC;EAEF,oBACI,IAAAnB,WAAA,CAAAsB,GAAA,EAACxB,YAAA,CAAAyB,IAAI;IAAChB,KAAK,EAAE,CAACK,cAAc,EAAEL,KAAK,CAAE;IAAAF,QAAA,EAChCU;EAAiB,CAChB,CAAC;AAEf;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEcC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{/* ButtonGroup.mdx */}
|
|
2
|
+
|
|
3
|
+
import { Canvas, Meta, Story, Controls } from '@storybook/blocks';
|
|
4
|
+
import * as ButtonGroupStories from './ButtonGroup.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={ButtonGroupStories} />
|
|
7
|
+
|
|
8
|
+
# Button Group
|
|
9
|
+
|
|
10
|
+
A layout container that organizes multiple buttons (typically `IconButton`) in a horizontal row with consistent spacing as defined by design tokens.
|
|
11
|
+
|
|
12
|
+
The `ButtonGroup` component automatically passes its `modes` prop down to all valid React children, ensuring that the entire group responds to theme or mode changes in unison.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Available Collections and Modes
|
|
16
|
+
|
|
17
|
+
This component does not use any design token collections with multiple modes.
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { ButtonGroup, IconButton } from 'jfs-components';
|
|
22
|
+
|
|
23
|
+
function MyHeader() {
|
|
24
|
+
return (
|
|
25
|
+
<ButtonGroup modes={{ "Appearance": "dark" }}>
|
|
26
|
+
<IconButton iconName="ic_qr_code" />
|
|
27
|
+
<IconButton iconName="ic_photo" />
|
|
28
|
+
</ButtonGroup>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Props
|
|
34
|
+
|
|
35
|
+
<Controls />
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### Default
|
|
40
|
+
|
|
41
|
+
<Canvas of={ButtonGroupStories.Default} />
|
|
42
|
+
|
|
43
|
+
### With Custom Modes
|
|
44
|
+
|
|
45
|
+
<Canvas of={ButtonGroupStories.WithModes} />
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Design Tokens
|
|
49
|
+
|
|
50
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
51
|
+
|
|
52
|
+
- **`buttonGroup/padding/gap`**
|
|
53
|
+
- **`buttonGroup/padding/horizontal`**
|
|
54
|
+
- **`buttonGroup/padding/vertical`**
|
|
55
|
+
|
|
56
|
+
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 CardStories from './Card.stories';
|
|
3
3
|
import Card from './Card';
|
|
4
4
|
import { AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|