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,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React
|
|
4
|
-
import { View } from 'react-native';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, Pressable } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
+
import NavArrow from '../NavArrow/NavArrow';
|
|
8
|
+
// We might need to import Image or Svg if we had the assets locally, but for now we'll use placeholders or standard icons for defaults.
|
|
9
|
+
// The user prompt mentioned "Use getVariableByName... strict camelCase".
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Helper function to recursively clone children and pass modes prop to components that accept it.
|
|
11
|
-
* This ensures that all child components in slots receive the modes prop from the parent.
|
|
12
13
|
*/
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
function cloneChildrenWithModes(children, modes) {
|
|
@@ -23,7 +24,6 @@ function cloneChildrenWithModes(children, modes) {
|
|
|
23
24
|
|
|
24
25
|
// Clone the child with modes prop if it doesn't already have one
|
|
25
26
|
// or merge with existing modes if it does
|
|
26
|
-
// Merge order: parent modes first, then child's explicit modes override them
|
|
27
27
|
const existingModes = child.props?.modes;
|
|
28
28
|
const mergedModes = existingModes ? {
|
|
29
29
|
...modes,
|
|
@@ -40,126 +40,123 @@ function cloneChildrenWithModes(children, modes) {
|
|
|
40
40
|
}, processedChildren);
|
|
41
41
|
})?.filter(child => child !== null && child !== undefined) ?? [];
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*
|
|
47
|
-
* This component supports:
|
|
48
|
-
* - **leading** IconButton (default: back button with ic_chevron_left)
|
|
49
|
-
* - **middle** slot for custom content (typically title or search)
|
|
50
|
-
* - **actions** slot for custom action buttons (default: two IconButtons)
|
|
51
|
-
* - **design-token driven styling** via `getVariableByName` and `modes`
|
|
52
|
-
*
|
|
53
|
-
* Wherever the Figma layer name contains "Slot", this component exposes a
|
|
54
|
-
* dedicated React "slot" prop:
|
|
55
|
-
* - Slot "Middle" → `middleSlot`
|
|
56
|
-
* - Slot "Actions" → `actionsSlot`
|
|
57
|
-
*
|
|
58
|
-
* @component
|
|
59
|
-
* @param {Object} props
|
|
60
|
-
* @param {React.ReactNode} [props.leading] - Optional leading element. Defaults to IconButton with ic_chevron_left.
|
|
61
|
-
* @param {React.ReactNode} [props.middleSlot] - Optional custom slot for middle content (Figma Slot "Middle").
|
|
62
|
-
* @param {React.ReactNode} [props.actionsSlot] - Optional custom slot for action buttons (Figma Slot "Actions").
|
|
63
|
-
* @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
|
|
64
|
-
* @param {Function} [props.onLeadingPress] - Callback when leading button is pressed (only used if leading is not provided).
|
|
65
|
-
* @param {Object} [props.style] - Optional container style overrides.
|
|
66
|
-
* @param {string} [props.accessibilityLabel] - Accessibility label for the app bar
|
|
67
|
-
* @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
function AppBar({
|
|
71
|
-
leading,
|
|
43
|
+
export default function AppBar({
|
|
44
|
+
type = 'MainPage',
|
|
45
|
+
leadingSlot,
|
|
72
46
|
middleSlot,
|
|
73
47
|
actionsSlot,
|
|
74
|
-
modes = {},
|
|
48
|
+
modes: propModes = {},
|
|
75
49
|
onLeadingPress,
|
|
76
50
|
style,
|
|
77
|
-
accessibilityLabel
|
|
51
|
+
accessibilityLabel,
|
|
78
52
|
accessibilityHint,
|
|
79
53
|
...rest
|
|
80
54
|
}) {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const paddingVertical = getVariableByName('appBarActions/padding/vertical', modes) ?? 10;
|
|
101
|
-
const actionsGap = getVariableByName('appBarActions/actions/gap', modes) ?? 8;
|
|
55
|
+
const {
|
|
56
|
+
modes: globalModes
|
|
57
|
+
} = useTokens();
|
|
58
|
+
const modes = {
|
|
59
|
+
...globalModes,
|
|
60
|
+
...propModes
|
|
61
|
+
};
|
|
62
|
+
const isMain = type === 'MainPage';
|
|
63
|
+
const isSub = type === 'SubPage';
|
|
64
|
+
|
|
65
|
+
// --- Tokens ---
|
|
66
|
+
// Construct token keys based on type. keys must be camelCase as per instruction.
|
|
67
|
+
// We use explicit string literals so that the extraction script can find them.
|
|
68
|
+
const paddingHorizontal = isMain ? getVariableByName('appBar/mainPage/padding/horizontal', modes) : getVariableByName('appBar/subPage/padding/horizontal', modes);
|
|
69
|
+
const paddingVertical = isMain ? getVariableByName('appBar/mainPage/padding/vertical', modes) : getVariableByName('appBar/subPage/padding/vertical', modes);
|
|
70
|
+
const backgroundColor = isMain ? getVariableByName('appBar/mainPage/background', modes) : getVariableByName('appBar/subPage/background', modes);
|
|
71
|
+
const actionsGap = isMain ? getVariableByName('appBar/mainPage/actions/gap', modes) : getVariableByName('appBar/subPage/actions/gap', modes);
|
|
72
|
+
|
|
73
|
+
// Layout styles
|
|
102
74
|
const containerStyle = {
|
|
103
75
|
flexDirection: 'row',
|
|
104
76
|
alignItems: 'center',
|
|
105
77
|
justifyContent: 'space-between',
|
|
106
|
-
paddingHorizontal,
|
|
107
|
-
paddingVertical,
|
|
108
|
-
|
|
78
|
+
paddingHorizontal: paddingHorizontal ?? 16,
|
|
79
|
+
paddingVertical: paddingVertical ?? (isMain ? 16 : 10),
|
|
80
|
+
backgroundColor: backgroundColor ?? '#FFFFFF'
|
|
81
|
+
// We can set minHeight if we want to enforce consistency, but padding should dictate it mostly.
|
|
82
|
+
// Figma shows specific heights implicitly via padding + content.
|
|
83
|
+
// MainPage: h=68 (16 top/bot padding? 36 height content?)
|
|
84
|
+
// SubPage: h=52
|
|
109
85
|
};
|
|
110
|
-
const actionsRowStyle = {
|
|
111
|
-
flexDirection: 'row',
|
|
112
|
-
gap: actionsGap,
|
|
113
|
-
alignItems: 'center'
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
// Default leading: IconButton with back icon
|
|
117
|
-
const defaultLeading = leading ?? /*#__PURE__*/_jsx(IconButton, {
|
|
118
|
-
iconName: "ic_chevron_left",
|
|
119
|
-
modes: modes,
|
|
120
|
-
...(onLeadingPress !== undefined ? {
|
|
121
|
-
onPress: onLeadingPress
|
|
122
|
-
} : {}),
|
|
123
|
-
accessibilityLabel: "Go back",
|
|
124
|
-
accessibilityHint: "Navigates to the previous screen"
|
|
125
|
-
});
|
|
126
86
|
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
87
|
+
// --- Leading Slot Default ---
|
|
88
|
+
// SubPage default: Back Arrow
|
|
89
|
+
// MainPage default: Jio Logo (We'll use a placeholder or basic text if no asset,
|
|
90
|
+
// but looking at "AppBarHome" before, it had "ic_hellojio". Let's stick to generic defaults or empty if not provided,
|
|
91
|
+
// but usually a component library provides sensible defaults.)
|
|
92
|
+
|
|
93
|
+
// Actually, let's implement the specific defaults mentioned in the plan/analysis
|
|
94
|
+
// SubPage: NavArrow props (icon, etc). We'll use IconButton with 'ic_chevron_left' as a close approximation.
|
|
95
|
+
|
|
96
|
+
let defaultLeading = null;
|
|
97
|
+
if (leadingSlot === undefined) {
|
|
98
|
+
if (isSub) {
|
|
99
|
+
defaultLeading = /*#__PURE__*/_jsx(Pressable, {
|
|
100
|
+
...(onLeadingPress ? {
|
|
101
|
+
onPress: onLeadingPress
|
|
102
|
+
} : {}),
|
|
103
|
+
hitSlop: 8,
|
|
104
|
+
accessibilityRole: "button",
|
|
105
|
+
accessibilityLabel: "Back",
|
|
106
|
+
style: ({
|
|
107
|
+
pressed
|
|
108
|
+
}) => ({
|
|
109
|
+
opacity: pressed ? 0.7 : 1,
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
justifyContent: 'center'
|
|
112
|
+
}),
|
|
113
|
+
children: /*#__PURE__*/_jsx(NavArrow, {
|
|
114
|
+
direction: "Back",
|
|
115
|
+
modes: modes
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
} else {
|
|
119
|
+
// MainPage default leading: often the Brand Logo.
|
|
120
|
+
// We'll leave it empty or render a placeholder if desired, but standard AppBar often lets consumer pass logo.
|
|
121
|
+
// Previous code had `leadingIconName='ic_hellojio'` for Home.
|
|
122
|
+
// We will render nothing by default for MainPage leading to keep it flexible, OR a specialized Logo component if we had one.
|
|
123
|
+
// For now, let's assume consumer passes it for MainPage, or we leave empty.
|
|
124
|
+
// Wait, Figma screenshot shows "Jio" logo.
|
|
125
|
+
// The user said: "mostly token namings are 'camelCase'. Maximize existing component usage."
|
|
126
|
+
// I'll leave defaultLeading as null for MainPage unless I have a "BrandLogo" component.
|
|
127
|
+
}
|
|
128
|
+
}
|
|
144
129
|
|
|
145
|
-
//
|
|
146
|
-
const
|
|
147
|
-
const
|
|
130
|
+
// --- Process Slots ---
|
|
131
|
+
const processedLeading = leadingSlot ? cloneChildrenWithModes([leadingSlot], modes)[0] : defaultLeading;
|
|
132
|
+
const processedMiddle = middleSlot ? cloneChildrenWithModes(React.Children.toArray(middleSlot), modes) : null;
|
|
148
133
|
|
|
149
|
-
//
|
|
150
|
-
|
|
134
|
+
// Actions Gap wrapper
|
|
135
|
+
// The Figma has "Actions" slot with a gap.
|
|
136
|
+
const actionsStyle = {
|
|
137
|
+
flexDirection: 'row',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
gap: actionsGap ?? 0
|
|
140
|
+
};
|
|
141
|
+
const processedActions = actionsSlot ? /*#__PURE__*/_jsx(View, {
|
|
142
|
+
style: actionsStyle,
|
|
143
|
+
children: cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes)
|
|
144
|
+
}) : null;
|
|
151
145
|
return /*#__PURE__*/_jsxs(View, {
|
|
152
|
-
style: [containerStyle,
|
|
153
|
-
borderBottomWidth: 2,
|
|
154
|
-
borderBottomColor: '#222'
|
|
155
|
-
} : null, style],
|
|
146
|
+
style: [containerStyle, style],
|
|
156
147
|
accessibilityRole: "header",
|
|
157
|
-
accessibilityLabel: accessibilityLabel,
|
|
158
|
-
...(accessibilityHint
|
|
148
|
+
accessibilityLabel: accessibilityLabel || (isMain ? "Main Header" : "Sub Header"),
|
|
149
|
+
...(accessibilityHint ? {
|
|
159
150
|
accessibilityHint
|
|
160
151
|
} : {}),
|
|
161
152
|
...rest,
|
|
162
|
-
children: [
|
|
153
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
154
|
+
style: {
|
|
155
|
+
flexDirection: 'row',
|
|
156
|
+
alignItems: 'center'
|
|
157
|
+
},
|
|
158
|
+
children: processedLeading
|
|
159
|
+
}), processedMiddle && /*#__PURE__*/_jsx(View, {
|
|
163
160
|
style: {
|
|
164
161
|
position: 'absolute',
|
|
165
162
|
left: 0,
|
|
@@ -168,134 +165,15 @@ function AppBar({
|
|
|
168
165
|
bottom: 0,
|
|
169
166
|
alignItems: 'center',
|
|
170
167
|
justifyContent: 'center',
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
zIndex: -1 // Behind actions if overlap? Or should be on top?
|
|
169
|
+
// Usually middle title shouldn't block actions. `pointerEvents="box-none"` is safer.
|
|
173
170
|
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
children: processedMiddleSlot
|
|
171
|
+
pointerEvents: "box-none",
|
|
172
|
+
children: processedMiddle
|
|
177
173
|
}), /*#__PURE__*/_jsx(View, {
|
|
178
|
-
style:
|
|
179
|
-
children:
|
|
180
|
-
})]
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* AppBarHome component that mirrors the Figma "AppBar.home" component.
|
|
186
|
-
*
|
|
187
|
-
* This component supports:
|
|
188
|
-
* - **leading** IconButton (default: circular button with customizable icon)
|
|
189
|
-
* - **actions** slot for custom action buttons (default: search and notification IconButtons)
|
|
190
|
-
* - **avatar** Avatar component on the right
|
|
191
|
-
* - **design-token driven styling** via `getVariableByName` and `modes`
|
|
192
|
-
*
|
|
193
|
-
* Wherever the Figma layer name contains "Slot", this component exposes a
|
|
194
|
-
* dedicated React "slot" prop:
|
|
195
|
-
* - Slot "Actions" → `actionsSlot`
|
|
196
|
-
*
|
|
197
|
-
* @component
|
|
198
|
-
* @param {Object} props
|
|
199
|
-
* @param {React.ReactNode} [props.leading] - Optional leading element. Defaults to IconButton with customizable icon.
|
|
200
|
-
* @param {React.ReactNode} [props.actionsSlot] - Optional custom slot for action buttons (Figma Slot "Actions").
|
|
201
|
-
* @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
|
|
202
|
-
* @param {Function} [props.onLeadingPress] - Callback when leading button is pressed (only used if leading is not provided).
|
|
203
|
-
* @param {string} [props.leadingIconName] - Icon name for default leading button (default: 'ic_hellojio').
|
|
204
|
-
* @param {Object} [props.avatarProps] - Props to pass to Avatar component.
|
|
205
|
-
* @param {Object} [props.style] - Optional container style overrides.
|
|
206
|
-
* @param {string} [props.accessibilityLabel] - Accessibility label for the app bar
|
|
207
|
-
* @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
function AppBarHome({
|
|
211
|
-
leading,
|
|
212
|
-
actionsSlot,
|
|
213
|
-
modes = {},
|
|
214
|
-
onLeadingPress,
|
|
215
|
-
leadingIconName = 'ic_hellojio',
|
|
216
|
-
avatarProps,
|
|
217
|
-
style,
|
|
218
|
-
accessibilityLabel = "Home app bar",
|
|
219
|
-
accessibilityHint,
|
|
220
|
-
...rest
|
|
221
|
-
}) {
|
|
222
|
-
// Resolve container tokens
|
|
223
|
-
const paddingHorizontal = getVariableByName('appBarHome/padding/horizontal', modes) ?? 16;
|
|
224
|
-
const paddingVertical = getVariableByName('appBarHome/padding/vertical', modes) ?? 16;
|
|
225
|
-
const actionsGap = getVariableByName('appBarHome/actions/gap', modes) ?? 0;
|
|
226
|
-
const containerStyle = {
|
|
227
|
-
flexDirection: 'row',
|
|
228
|
-
alignItems: 'center',
|
|
229
|
-
justifyContent: 'space-between',
|
|
230
|
-
paddingHorizontal,
|
|
231
|
-
paddingVertical,
|
|
232
|
-
width: '100%'
|
|
233
|
-
};
|
|
234
|
-
const homeActionsRowStyle = {
|
|
235
|
-
flexDirection: 'row',
|
|
236
|
-
gap: actionsGap,
|
|
237
|
-
alignItems: 'center'
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
// Default leading: IconButton with customizable icon
|
|
241
|
-
// The IconButton already handles its own circular styling, so we just use it directly
|
|
242
|
-
const defaultLeading = leading ?? /*#__PURE__*/_jsx(IconButton, {
|
|
243
|
-
iconName: leadingIconName,
|
|
244
|
-
modes: modes,
|
|
245
|
-
...(onLeadingPress !== undefined ? {
|
|
246
|
-
onPress: onLeadingPress
|
|
247
|
-
} : {}),
|
|
248
|
-
accessibilityLabel: "Home",
|
|
249
|
-
accessibilityHint: "Opens home menu"
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
// Default actions: Search and Notification IconButtons
|
|
253
|
-
const defaultActions = actionsSlot ?? /*#__PURE__*/_jsxs(View, {
|
|
254
|
-
style: homeActionsRowStyle,
|
|
255
|
-
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
256
|
-
iconName: "ic_search",
|
|
257
|
-
modes: modes,
|
|
258
|
-
onPress: () => {},
|
|
259
|
-
accessibilityLabel: "Search",
|
|
260
|
-
accessibilityHint: "Opens search screen"
|
|
261
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
|
262
|
-
iconName: "ic_notification",
|
|
263
|
-
modes: modes,
|
|
264
|
-
onPress: () => {},
|
|
265
|
-
accessibilityLabel: "Notifications",
|
|
266
|
-
accessibilityHint: "Opens notifications"
|
|
267
|
-
})]
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
// Clone slot children and pass modes to all children that accept it
|
|
271
|
-
const processedActionsSlot = actionsSlot ? cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes) : defaultActions;
|
|
272
|
-
|
|
273
|
-
// Process leading if it's a React element
|
|
274
|
-
const processedLeading = /*#__PURE__*/React.isValidElement(leading) ? cloneChildrenWithModes([leading], modes)[0] : defaultLeading;
|
|
275
|
-
|
|
276
|
-
// Process avatar with modes
|
|
277
|
-
const avatarModes = avatarProps?.modes ? {
|
|
278
|
-
...modes,
|
|
279
|
-
...avatarProps.modes
|
|
280
|
-
} : modes;
|
|
281
|
-
const processedAvatar = /*#__PURE__*/_jsx(Avatar, {
|
|
282
|
-
...(avatarProps ?? {}),
|
|
283
|
-
modes: avatarModes
|
|
284
|
-
});
|
|
285
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
286
|
-
style: [containerStyle, style],
|
|
287
|
-
accessibilityRole: "header",
|
|
288
|
-
accessibilityLabel: accessibilityLabel,
|
|
289
|
-
...(accessibilityHint !== undefined ? {
|
|
290
|
-
accessibilityHint
|
|
291
|
-
} : {}),
|
|
292
|
-
...rest,
|
|
293
|
-
children: [processedLeading, /*#__PURE__*/_jsxs(View, {
|
|
294
|
-
style: homeActionsRowStyle,
|
|
295
|
-
children: [processedActionsSlot, processedAvatar]
|
|
174
|
+
style: actionsStyle,
|
|
175
|
+
children: processedActions
|
|
296
176
|
})]
|
|
297
177
|
});
|
|
298
178
|
}
|
|
299
|
-
export default AppBar;
|
|
300
|
-
export { AppBarHome };
|
|
301
179
|
//# sourceMappingURL=AppBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","View","Pressable","getVariableByName","useTokens","NavArrow","jsx","_jsx","jsxs","_jsxs","cloneChildrenWithModes","children","modes","Children","map","child","isValidElement","childChildren","props","hasChildren","undefined","existingModes","mergedModes","processedChildren","toArray","cloneElement","filter","AppBar","type","leadingSlot","middleSlot","actionsSlot","propModes","onLeadingPress","style","accessibilityLabel","accessibilityHint","rest","globalModes","isMain","isSub","paddingHorizontal","paddingVertical","backgroundColor","actionsGap","containerStyle","flexDirection","alignItems","justifyContent","defaultLeading","onPress","hitSlop","accessibilityRole","pressed","opacity","direction","processedLeading","processedMiddle","actionsStyle","gap","processedActions","position","left","right","top","bottom","zIndex","pointerEvents"],"sourceRoot":"../../../../src","sources":["components/AppBar/AppBar.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAoB,OAAO;AACvC,SAASC,IAAI,EAAkCC,SAAS,QAAQ,cAAc;AAC9E,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAGhE,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C;AACA;;AAEA;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA,SAASC,sBAAsBA,CAC7BC,QAAyB,EACzBC,KAA0B,EACP;EACnB,OAAOZ,KAAK,CAACa,QAAQ,CAACC,GAAG,CAACH,QAAQ,EAAGI,KAAK,IAAK;IAC7C,IAAI,eAACf,KAAK,CAACgB,cAAc,CAACD,KAAK,CAAC,EAAE;MAChC,OAAOA,KAAK;IACd;;IAEA;IACA,MAAME,aAAa,GAAIF,KAAK,CAACG,KAAK,EAAUP,QAAQ;IACpD,MAAMQ,WAAW,GAAGF,aAAa,KAAKG,SAAS,IAAIH,aAAa,KAAK,IAAI;;IAEzE;IACA;IACA,MAAMI,aAAa,GAAIN,KAAK,CAACG,KAAK,EAAUN,KAAK;IACjD,MAAMU,WAAW,GAAGD,aAAa,GAAG;MAAE,GAAGT,KAAK;MAAE,GAAGS;IAAc,CAAC,GAAGT,KAAK;;IAE1E;IACA,MAAMW,iBAA8C,GAAGJ,WAAW,GAC9DT,sBAAsB,CACtBV,KAAK,CAACa,QAAQ,CAACW,OAAO,CAACP,aAAa,CAAC,EACrCL,KACF,CAAC,GACCQ,SAAS;;IAEb;IACA,oBAAOpB,KAAK,CAACyB,YAAY,CACvBV,KAAK,EACL;MACE,GAAIA,KAAK,CAACG,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,CAAC;EAAA,CACH,CAAC;AAEX","ignoreList":[]}
|
|
@@ -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>
|