jfs-components 0.0.6 → 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.mdx +5 -1
- package/lib/commonjs/components/AppBar/AppBar.js +100 -238
- 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.mdx +5 -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 +5 -18
- 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.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 +3 -3
- 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.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.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/design-tokens/figma-variables-resolver.js +3 -9
- package/lib/commonjs/design-tokens/figma-variables-resolver.js.map +1 -2
- 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.mdx +5 -1
- package/lib/module/components/AppBar/AppBar.js +100 -238
- 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.mdx +5 -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 +5 -18
- 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.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 +3 -3
- 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.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.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 +0 -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/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/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.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/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/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/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/AppBar/AppBar.mdx +51 -39
- package/src/components/AppBar/AppBar.tsx +140 -261
- 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/BottomNavItem/BottomNavItem.mdx +5 -1
- 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 +12 -20
- package/src/components/Disclaimer/Disclaimer.mdx +5 -1
- 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 +3 -3
- 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/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/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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","getVariableByName","useTokens","IconCapsule","Button","jsx","_jsx","jsxs","_jsxs","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","propModes","iconSlot","titleSlot","bodySlot","buttonSlot","style","globalModes","backgroundColor","radius","paddingHorizontal","paddingVertical","gap","contentGap","titleColor","titleFontFamily","titleFontSize","titleLineHeight","bodyColor","bodyFontFamily","bodyFontSize","bodyLineHeight","containerStyle","borderRadius","alignItems","width","overflow","contentWrapStyle","titleStyle","color","fontFamily","fontSize","lineHeight","fontWeight","bodyStyle","
|
|
1
|
+
{"version":3,"names":["React","View","Text","getVariableByName","useTokens","IconCapsule","Button","cloneChildrenWithModes","jsx","_jsx","jsxs","_jsxs","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","propModes","iconSlot","titleSlot","bodySlot","buttonSlot","style","globalModes","backgroundColor","radius","paddingHorizontal","paddingVertical","gap","contentGap","titleColor","titleFontFamily","titleFontSize","titleLineHeight","bodyColor","bodyFontFamily","bodyFontSize","bodyLineHeight","containerStyle","borderRadius","alignItems","width","overflow","contentWrapStyle","titleStyle","color","fontFamily","fontSize","lineHeight","fontWeight","bodyStyle","children","label","onPress"],"sourceRoot":"../../../../src","sources":["components/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C,SAAoB,GAAG;IACzBL,KAAK,EAAEX,SAAS;IAChBY,UAAU,EAAEX,cAAc;IAC1BY,QAAQ,EAAEX,YAAY;IACtBY,UAAU,EAAEX,cAAc;IAC1BY,UAAU,EAAE,KAAK,CAAE;EACvB,CAAC;EAID,oBACIxC,KAAA,CAACV,IAAI;IAACuB,KAAK,EAAE,CAACgB,cAAc,EAAEhB,KAAK,CAAE;IAAA6B,QAAA,gBACjC1C,KAAA,CAACV,IAAI;MAACuB,KAAK,EAAEqB,gBAAiB;MAAAQ,QAAA,GAEzBjC,QAAQ,GACLb,sBAAsB,CAACa,QAAQ,EAAEF,KAAK,CAAC,gBAEvCT,IAAA,CAACJ,WAAW;QAACU,QAAQ,EAAEA,QAAS;QAACG,KAAK,EAAEA;MAAM,CAAE,CACnD,EAGAG,SAAS,GACNd,sBAAsB,CAACc,SAAS,EAAEH,KAAK,CAAC,gBAExCT,IAAA,CAACP,IAAI;QAACsB,KAAK,EAAEsB,UAAW;QAAAO,QAAA,EAAExC;MAAK,CAAO,CACzC,EAGAS,QAAQ,GACLf,sBAAsB,CAACe,QAAQ,EAAEJ,KAAK,CAAC,gBAEvCT,IAAA,CAACP,IAAI;QAACsB,KAAK,EAAE4B,SAAU;QAAAC,QAAA,EAAEvC;MAAI,CAAO,CACvC;IAAA,CACC,CAAC,EAGNS,UAAU,GACPhB,sBAAsB,CAACgB,UAAU,EAAEL,KAAK,CAAC,gBAEzCT,IAAA,CAACH,MAAM;MACHgD,KAAK,EAAEtC,WAAY;MACnBuC,OAAO,EAAEtC,aAAa,KAAK,MAAM,CAAE,CAAC,CAAE;MACtCC,KAAK,EAAEA;IAAM,CAChB,CACJ;EAAA,CACC,CAAC;AAEf;AAEA,eAAeN,OAAO","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as DisclaimerStories from './Disclaimer.stories';
|
|
3
3
|
import Disclaimer from './Disclaimer';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -16,6 +16,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
16
16
|
### Color Mode
|
|
17
17
|
- **Modes:** Light | Dark
|
|
18
18
|
- **Default:** Light
|
|
19
|
+
|
|
20
|
+
### Colors Router
|
|
21
|
+
- **Modes:** POC | Old
|
|
22
|
+
- **Default:** POC
|
|
19
23
|
## Usage
|
|
20
24
|
|
|
21
25
|
<Canvas>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as DividerStories from './Divider.stories';
|
|
3
3
|
import Divider from './Divider';
|
|
4
4
|
|
|
@@ -19,6 +19,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
19
19
|
### Color Mode
|
|
20
20
|
- **Modes:** Light | Dark
|
|
21
21
|
- **Default:** Light
|
|
22
|
+
|
|
23
|
+
### Colors Router
|
|
24
|
+
- **Modes:** POC | Old
|
|
25
|
+
- **Default:** POC
|
|
22
26
|
## Usage
|
|
23
27
|
|
|
24
28
|
### Horizontal Divider
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as DrawerStories from './Drawer.stories';
|
|
3
3
|
import Drawer from './Drawer';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -13,9 +13,17 @@ Lightweight bottom drawer/sheet with a draggable handle.
|
|
|
13
13
|
|
|
14
14
|
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
15
15
|
|
|
16
|
+
### Page type
|
|
17
|
+
- **Modes:** MainPage | SubPage
|
|
18
|
+
- **Default:** MainPage
|
|
19
|
+
|
|
16
20
|
### Color Mode
|
|
17
21
|
- **Modes:** Light | Dark
|
|
18
22
|
- **Default:** Light
|
|
23
|
+
|
|
24
|
+
### Colors Router
|
|
25
|
+
- **Modes:** POC | Old
|
|
26
|
+
- **Default:** POC
|
|
19
27
|
## Usage
|
|
20
28
|
|
|
21
29
|
<Canvas>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { View, Text } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
+
import IconCapsule from '../IconCapsule/IconCapsule';
|
|
8
|
+
import Button from '../Button/Button';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* EmptyState component that displays an icon, title, description and an action button.
|
|
12
|
+
*
|
|
13
|
+
* @component
|
|
14
|
+
*/
|
|
15
|
+
function EmptyState({
|
|
16
|
+
title = "No payments to show",
|
|
17
|
+
description = "Start by paying bills, recharge or your friends",
|
|
18
|
+
iconSlot,
|
|
19
|
+
buttonSlot,
|
|
20
|
+
modes: propModes = {},
|
|
21
|
+
style,
|
|
22
|
+
testID
|
|
23
|
+
}) {
|
|
24
|
+
const {
|
|
25
|
+
modes: globalModes
|
|
26
|
+
} = useTokens();
|
|
27
|
+
const modes = {
|
|
28
|
+
...globalModes,
|
|
29
|
+
...propModes
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Container Tokens
|
|
33
|
+
const gap = getVariableByName('emptyState/gap', modes) || 24;
|
|
34
|
+
const padding = getVariableByName('emptyState/padding', modes) || 4;
|
|
35
|
+
const radius = getVariableByName('emptyState/radius', modes) || 16;
|
|
36
|
+
|
|
37
|
+
// Content Wrap Tokens
|
|
38
|
+
const contentGap = getVariableByName('emptyState/content/gap', modes) || 16;
|
|
39
|
+
|
|
40
|
+
// Title Tokens
|
|
41
|
+
const titleColor = getVariableByName('emptyState/title/color', modes) || '#0d0d0f';
|
|
42
|
+
const titleFontSize = getVariableByName('emptyState/title/fontSize', modes) || 16;
|
|
43
|
+
const titleFontFamily = getVariableByName('emptyState/title/fontFamily', modes) || 'System';
|
|
44
|
+
const titleLineHeight = getVariableByName('emptyState/title/lineHeight', modes) || 18;
|
|
45
|
+
const titleFontWeight = getVariableByName('emptyState/title/fontWeight', modes) || 700;
|
|
46
|
+
|
|
47
|
+
// Body Tokens
|
|
48
|
+
const bodyColor = getVariableByName('emptyState/body/color', modes) || '#1a1c1f';
|
|
49
|
+
const bodyFontSize = getVariableByName('emptyState/body/fontSize', modes) || 12;
|
|
50
|
+
const bodyFontFamily = getVariableByName('emptyState/body/fontFamily', modes) || 'System';
|
|
51
|
+
const bodyLineHeight = getVariableByName('emptyState/body/lineHeight', modes) || 16;
|
|
52
|
+
const bodyFontWeight = getVariableByName('emptyState/body/fontWeight', modes) || 400;
|
|
53
|
+
const containerStyle = {
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
gap: gap,
|
|
58
|
+
padding: padding,
|
|
59
|
+
borderRadius: radius
|
|
60
|
+
// Width is set in Figma as fixed 236, but typical practice is to let it be flexible or controlled by parent
|
|
61
|
+
// However, for strict adherence to "Maximize existing component usage" and specific styles, we can leave width
|
|
62
|
+
// to parent or default to auto.
|
|
63
|
+
};
|
|
64
|
+
const contentWrapStyle = {
|
|
65
|
+
flexDirection: 'column',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
gap: contentGap,
|
|
68
|
+
width: '100%'
|
|
69
|
+
};
|
|
70
|
+
const titleStyle = {
|
|
71
|
+
color: titleColor,
|
|
72
|
+
fontSize: titleFontSize,
|
|
73
|
+
fontFamily: titleFontFamily,
|
|
74
|
+
lineHeight: titleLineHeight,
|
|
75
|
+
fontWeight: String(titleFontWeight),
|
|
76
|
+
textAlign: 'center'
|
|
77
|
+
};
|
|
78
|
+
const bodyStyle = {
|
|
79
|
+
color: bodyColor,
|
|
80
|
+
fontSize: bodyFontSize,
|
|
81
|
+
fontFamily: bodyFontFamily,
|
|
82
|
+
lineHeight: bodyLineHeight,
|
|
83
|
+
fontWeight: String(bodyFontWeight),
|
|
84
|
+
textAlign: 'center'
|
|
85
|
+
};
|
|
86
|
+
const defaultIconSlot = useMemo(() => /*#__PURE__*/_jsx(IconCapsule, {
|
|
87
|
+
modes: modes
|
|
88
|
+
}), [modes]);
|
|
89
|
+
|
|
90
|
+
// Checking if iconSlot is passed; if not use default.
|
|
91
|
+
// If it is passed, we assume the user handles everything or we inject props if it's a valid element?
|
|
92
|
+
// User instructions say: "whenever there is a slot, that's should be implemented as real react slot... manual passing down modes"
|
|
93
|
+
// So we just render what is passed, but for defaults we pass modes.
|
|
94
|
+
// Ideally, if iconSlot is a function we could pass modes, but ReactNode is static.
|
|
95
|
+
// The instruction "make sure modes are always passed to all slot children" implies we might need to cloneElement if possible,
|
|
96
|
+
// AND/OR user needs to pass it manually in usage.
|
|
97
|
+
// But for the DEFAULT slots we render, we definitely pass modes.
|
|
98
|
+
|
|
99
|
+
const iconContent = iconSlot || defaultIconSlot;
|
|
100
|
+
const defaultButtonSlot = useMemo(() => /*#__PURE__*/_jsx(Button, {
|
|
101
|
+
label: "Button",
|
|
102
|
+
modes: modes
|
|
103
|
+
}), [modes]);
|
|
104
|
+
const buttonContent = buttonSlot || defaultButtonSlot;
|
|
105
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
106
|
+
style: [containerStyle, style],
|
|
107
|
+
testID: testID,
|
|
108
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
109
|
+
style: contentWrapStyle,
|
|
110
|
+
children: [iconContent, /*#__PURE__*/_jsx(View, {
|
|
111
|
+
style: {
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
gap: 0
|
|
114
|
+
},
|
|
115
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
116
|
+
style: {
|
|
117
|
+
alignItems: 'center'
|
|
118
|
+
},
|
|
119
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
120
|
+
style: titleStyle,
|
|
121
|
+
children: title
|
|
122
|
+
}), description ? /*#__PURE__*/_jsx(Text, {
|
|
123
|
+
style: bodyStyle,
|
|
124
|
+
children: description
|
|
125
|
+
}) : null]
|
|
126
|
+
})
|
|
127
|
+
})]
|
|
128
|
+
}), buttonContent]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export default EmptyState;
|
|
132
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","View","Text","getVariableByName","useTokens","IconCapsule","Button","jsx","_jsx","jsxs","_jsxs","EmptyState","title","description","iconSlot","buttonSlot","modes","propModes","style","testID","globalModes","gap","padding","radius","contentGap","titleColor","titleFontSize","titleFontFamily","titleLineHeight","titleFontWeight","bodyColor","bodyFontSize","bodyFontFamily","bodyLineHeight","bodyFontWeight","containerStyle","flexDirection","alignItems","justifyContent","borderRadius","contentWrapStyle","width","titleStyle","color","fontSize","fontFamily","lineHeight","fontWeight","String","textAlign","bodyStyle","defaultIconSlot","iconContent","defaultButtonSlot","label","buttonContent","children"],"sourceRoot":"../../../../src","sources":["components/EmptyState/EmptyState.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,OAAOC,WAAW,MAAM,4BAA4B;AACpD,OAAOC,MAAM,MAAM,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA+BrC;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAC;EAChBC,KAAK,GAAG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AQ,IAAIqC,eAAe;EAE/C,MAAME,iBAAiB,GAAGrD,OAAO,CAAC,mBAC9BQ,IAAA,CAACF,MAAM;IAACgD,KAAK,EAAC,QAAQ;IAACtC,KAAK,EAAEA;EAAM,CAAE,CACzC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,MAAMuC,aAAa,GAAGxC,UAAU,IAAIsC,iBAAiB;EAErD,oBACI3C,KAAA,CAACT,IAAI;IAACiB,KAAK,EAAE,CAACiB,cAAc,EAAEjB,KAAK,CAAE;IAACC,MAAM,EAAEA,MAAO;IAAAqC,QAAA,gBACjD9C,KAAA,CAACT,IAAI;MAACiB,KAAK,EAAEsB,gBAAiB;MAAAgB,QAAA,GAEzBJ,WAAW,eAGZ5C,IAAA,CAACP,IAAI;QAACiB,KAAK,EAAE;UAAEmB,UAAU,EAAE,QAAQ;UAAEhB,GAAG,EAAE;QAAE,CAAE;QAAAmC,QAAA,eA0B1C9C,KAAA,CAACT,IAAI;UAACiB,KAAK,EAAE;YAAEmB,UAAU,EAAE;UAAS,CAAE;UAAAmB,QAAA,gBAClChD,IAAA,CAACN,IAAI;YAACgB,KAAK,EAAEwB,UAAW;YAAAc,QAAA,EAAE5C;UAAK,CAAO,CAAC,EACtCC,WAAW,gBAAGL,IAAA,CAACN,IAAI;YAACgB,KAAK,EAAEgC,SAAU;YAAAM,QAAA,EAAE3C;UAAW,CAAO,CAAC,GAAG,IAAI;QAAA,CAChE;MAAC,CACL,CAAC;IAAA,CACL,CAAC,EAGN0C,aAAa;EAAA,CACZ,CAAC;AAEf;AAEA,eAAe5C,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
|
+
import * as EmptyStateStories from './EmptyState.stories';
|
|
3
|
+
import EmptyState from './EmptyState';
|
|
4
|
+
|
|
5
|
+
<Meta of={EmptyStateStories} />
|
|
6
|
+
|
|
7
|
+
# EmptyState
|
|
8
|
+
|
|
9
|
+
The `EmptyState` component is used to display messages when there is no content to show, typically with an icon, title, description, and an action button.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Available Collections and Modes
|
|
13
|
+
|
|
14
|
+
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
15
|
+
|
|
16
|
+
### Color Mode
|
|
17
|
+
- **Modes:** Light | Dark
|
|
18
|
+
- **Default:** Light
|
|
19
|
+
|
|
20
|
+
### Colors Router
|
|
21
|
+
- **Modes:** POC | Old
|
|
22
|
+
- **Default:** POC
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { EmptyState } from 'jfs-components';
|
|
27
|
+
|
|
28
|
+
<EmptyState
|
|
29
|
+
title="No payments to show"
|
|
30
|
+
description="Start by paying bills, recharge or your friends"
|
|
31
|
+
modes={{}}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
<Controls />
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
### Default
|
|
42
|
+
|
|
43
|
+
<Canvas of={EmptyStateStories.Default} />
|
|
44
|
+
|
|
45
|
+
### Custom Text
|
|
46
|
+
|
|
47
|
+
<Canvas of={EmptyStateStories.WithCustomText} />
|
|
48
|
+
|
|
49
|
+
### Custom Slots
|
|
50
|
+
|
|
51
|
+
<Canvas of={EmptyStateStories.CustomSlots} />
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Design Tokens
|
|
55
|
+
|
|
56
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
57
|
+
|
|
58
|
+
- **`emptyState/body/color`**
|
|
59
|
+
- **`emptyState/body/fontFamily`**
|
|
60
|
+
- **`emptyState/body/fontSize`**
|
|
61
|
+
- **`emptyState/body/fontWeight`**
|
|
62
|
+
- **`emptyState/body/lineHeight`**
|
|
63
|
+
- **`emptyState/content/gap`**
|
|
64
|
+
- **`emptyState/gap`**
|
|
65
|
+
- **`emptyState/padding`**
|
|
66
|
+
- **`emptyState/radius`**
|
|
67
|
+
- **`emptyState/title/color`**
|
|
68
|
+
- **`emptyState/title/fontFamily`**
|
|
69
|
+
- **`emptyState/title/fontSize`**
|
|
70
|
+
- **`emptyState/title/fontWeight`**
|
|
71
|
+
- **`emptyState/title/lineHeight`**
|
|
72
|
+
|
|
73
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as FilterBarStories from './FilterBar.stories';
|
|
3
3
|
import FilterBar from './FilterBar';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
+
import { cloneChildrenWithModes } from '../../utils/react-utils';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* HStack component for horizontal layout using design token spacing.
|
|
11
|
+
*/
|
|
12
|
+
export const HStack = ({
|
|
13
|
+
children,
|
|
14
|
+
alignVertical,
|
|
15
|
+
justifyHorizontal,
|
|
16
|
+
wrap,
|
|
17
|
+
reverse = false,
|
|
18
|
+
as,
|
|
19
|
+
modes: propModes = {},
|
|
20
|
+
style,
|
|
21
|
+
...rest
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
modes: globalModes
|
|
25
|
+
} = useTokens();
|
|
26
|
+
const modes = {
|
|
27
|
+
...globalModes,
|
|
28
|
+
...propModes
|
|
29
|
+
};
|
|
30
|
+
const paddingTop = getVariableByName('hstack/padding/top', modes);
|
|
31
|
+
const paddingBottom = getVariableByName('hstack/padding/bottom', modes);
|
|
32
|
+
const paddingLeft = getVariableByName('hstack/padding/left', modes);
|
|
33
|
+
const paddingRight = getVariableByName('hstack/padding/right', modes);
|
|
34
|
+
const gap = getVariableByName('hstack/gap', modes);
|
|
35
|
+
const flexWrap = typeof wrap === 'boolean' ? wrap ? 'wrap' : 'nowrap' : wrap;
|
|
36
|
+
const containerStyle = {
|
|
37
|
+
flexDirection: reverse ? 'row-reverse' : 'row',
|
|
38
|
+
alignItems: alignVertical,
|
|
39
|
+
justifyContent: justifyHorizontal,
|
|
40
|
+
flexWrap,
|
|
41
|
+
paddingTop,
|
|
42
|
+
paddingBottom,
|
|
43
|
+
paddingLeft,
|
|
44
|
+
paddingRight,
|
|
45
|
+
gap
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Pass modes down to children
|
|
49
|
+
const processedChildren = children ? cloneChildrenWithModes(children, modes) : null;
|
|
50
|
+
const viewProps = {
|
|
51
|
+
...rest,
|
|
52
|
+
as
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/_jsx(View, {
|
|
55
|
+
style: [containerStyle, style],
|
|
56
|
+
...viewProps,
|
|
57
|
+
children: processedChildren
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
export default HStack;
|
|
61
|
+
//# sourceMappingURL=HStack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","getVariableByName","useTokens","cloneChildrenWithModes","jsx","_jsx","HStack","children","alignVertical","justifyHorizontal","wrap","reverse","as","modes","propModes","style","rest","globalModes","paddingTop","paddingBottom","paddingLeft","paddingRight","gap","flexWrap","containerStyle","flexDirection","alignItems","justifyContent","processedChildren","viewProps"],"sourceRoot":"../../../../src","sources":["components/HStack/HStack.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAyC,cAAc;AACpE,SAASC,iBAAiB,Q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AAEM,KAAK,CAAC,GACvC,IAAI;EAEV,MAAMgB,SAAS,GAAG;IACd,GAAGb,IAAI;IACPJ;EACJ,CAAC;EAED,oBACIP,IAAA,CAACL,IAAI;IAACe,KAAK,EAAE,CAACS,cAAc,EAAET,KAAK,CAAE;IAAA,GAAKc,SAAS;IAAAtB,QAAA,EAC9CqB;EAAiB,CAChB,CAAC;AAEf,CAAC;AAED,eAAetB,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
|
+
import * as HStackStories from './HStack.stories';
|
|
3
|
+
import HStack from './HStack';
|
|
4
|
+
|
|
5
|
+
<Meta of={HStackStories} />
|
|
6
|
+
|
|
7
|
+
# HStack
|
|
8
|
+
|
|
9
|
+
`HStack` arranges its children in a horizontal line. It uses design tokens for spacing and gap.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Available Collections and Modes
|
|
13
|
+
|
|
14
|
+
This component does not use any design token collections with multiple modes.
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { HStack } from 'jfs-components';
|
|
19
|
+
|
|
20
|
+
<HStack justifyHorizontal="space-between" modes={{ 'hstack/gap': 16 }}>
|
|
21
|
+
<View>Left</View>
|
|
22
|
+
<View>Right</View>
|
|
23
|
+
</HStack>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story of={HStackStories.Default} />
|
|
28
|
+
</Canvas>
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
<Controls of={HStackStories.Default} />
|
|
33
|
+
|
|
34
|
+
## Design Tokens
|
|
35
|
+
|
|
36
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
37
|
+
|
|
38
|
+
- **`hstack/gap`**
|
|
39
|
+
- **`hstack/padding/bottom`**
|
|
40
|
+
- **`hstack/padding/left`**
|
|
41
|
+
- **`hstack/padding/right`**
|
|
42
|
+
- **`hstack/padding/top`**
|
|
43
|
+
|
|
44
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as IconButtonStories from './IconButton.stories';
|
|
3
3
|
import IconButton from './IconButton';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -28,6 +28,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
28
28
|
### Color Mode
|
|
29
29
|
- **Modes:** Light | Dark
|
|
30
30
|
- **Default:** Light
|
|
31
|
+
|
|
32
|
+
### Colors Router
|
|
33
|
+
- **Modes:** POC | Old
|
|
34
|
+
- **Default:** POC
|
|
31
35
|
## Usage
|
|
32
36
|
|
|
33
37
|
<Canvas>
|
|
@@ -52,9 +52,9 @@ function IconCapsule({
|
|
|
52
52
|
const size = getVariableByName('iconCapsule/size', modes) || 42;
|
|
53
53
|
const radius = getVariableByName('iconCapsule/radius', modes) || 9999;
|
|
54
54
|
const backgroundColor = getVariableByName('iconCapsule/background', modes) || '#cfa159';
|
|
55
|
-
const borderColor = getVariableByName('
|
|
56
|
-
const borderSize = getVariableByName('
|
|
57
|
-
const iconColor = getVariableByName('
|
|
55
|
+
const borderColor = getVariableByName('iconCapsule/border/color', modes) || 'rgba(255,255,255,0)';
|
|
56
|
+
const borderSize = getVariableByName('iconCapsule/border/size', modes) || 1;
|
|
57
|
+
const iconColor = getVariableByName('iconCapsule/icon/color', modes) || '#0f0d0a';
|
|
58
58
|
const iconSize = getVariableByName('iconCapsule/icon/size', modes) || 18;
|
|
59
59
|
|
|
60
60
|
// Convert radius to React Native format (if 9999, use size/2 for perfect circle)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","getVariableByName","useTokens","Icon","jsx","_jsx","IconCapsule","iconName","modes","propModes","accessibilityLabel","accessibilityRole","rest","globalModes","size","radius","backgroundColor","borderColor","borderSize","iconColor","iconSize","borderRadius","containerStyle","width","height","borderWidth","overflow","alignItems","justifyContent","defaultAccessibilityLabel","replace","l","toUpperCase","style","children","name","color","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/IconCapsule/IconCapsule.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,OAAOC,IAAI,MAAM,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAC;EACnBC,QAAQ,GAAG,SAAS;EACpBC,KAAK,EAAEC,SAAS,GAAG,CAAC,CAAC;EACrBC,kBAAkB;EAClBC,iBAAiB,GAAG,OAAO;EAC3B,GAAGC;AACa,CAAC,EAAE;EACnB,MAAM;IAAEJ,KAAK,EAAEK;EAAY,CAAC,GAAGX,SAAS,CAAC,CAAC;EAC1C,MAAMM,KAAK,GAAG;IAAE,GAAGK,WAAW;IAAE,GAAGJ;EAAU,CAAC;EAC9C;EACA,MAAMK,IAAI,GAAGb,iBAAiB,CAAC,kBAAkB,EAAEO,KAAK,CAAC,IAAI,EAAE;EAC/D,MAAMO,MAAM,GAAGd,iBAAiB,CAAC,oBAAoB,EAAEO,KAAK,CAAC,IAAI,IAAI;EACrE,MAAMQ,eAAe,GAAGf,iBAAiB,CAAC,wBAAwB,EAAEO,KAAK,CAAC,IAAI,SAAS;EACvF,MAAMS,WAAW,GAAGhB,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"names":["React","View","getVariableByName","useTokens","Icon","jsx","_jsx","IconCapsule","iconName","modes","propModes","accessibilityLabel","accessibilityRole","rest","globalModes","size","radius","backgroundColor","borderColor","borderSize","iconColor","iconSize","borderRadius","containerStyle","width","height","borderWidth","overflow","alignItems","justifyContent","defaultAccessibilityLabel","replace","l","toUpperCase","style","children","name","color","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/IconCapsule/IconCapsule.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,SAAS,QAAQ,sCAAsC;AAChE,OAAOC,IAAI,MAAM,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAAC;EACnBC,QAAQ,GAAG,SAAS;EACpBC,KAAK,EAAEC,SAAS,GAAG,CAAC,CAAC;EACrBC,kBAAkB;EAClBC,iBAAiB,GAAG,OAAO;EAC3B,GAAGC;AACa,CAAC,EAAE;EACnB,MAAM;IAAEJ,KAAK,EAAEK;EAAY,CAAC,GAAGX,SAAS,CAAC,CAAC;EAC1C,MAAMM,KAAK,GAAG;IAAE,GAAGK,WAAW;IAAE,GAAGJ;EAAU,CAAC;EAC9C;EACA,MAAMK,IAAI,GAAGb,iBAAiB,CAAC,kBAAkB,EAAEO,KAAK,CAAC,IAAI,EAAE;EAC/D,MAAMO,MAAM,GAAGd,iBAAiB,CAAC,oBAAoB,EAAEO,KAAK,CAAC,IAAI,IAAI;EACrE,MAAMQ,eAAe,GAAGf,iBAAiB,CAAC,wBAAwB,EAAEO,KAAK,CAAC,IAAI,SAAS;EACvF,MAAMS,WAAW,GAAGhB,iBAAiB,CAAC,0BAA0B,EAAEO,KAAK,CAAC,I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|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as IconCapsuleStories from './IconCapsule.stories';
|
|
3
3
|
import IconCapsule from './IconCapsule';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|
|
@@ -17,6 +17,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
17
17
|
- **Modes:** M | L | S
|
|
18
18
|
- **Default:** M
|
|
19
19
|
|
|
20
|
+
### Emphasis
|
|
21
|
+
- **Modes:** High | Medium | Low
|
|
22
|
+
- **Default:** High
|
|
23
|
+
|
|
20
24
|
### Appearance.Brand
|
|
21
25
|
- **Modes:** Primary | Secondary | Neutral
|
|
22
26
|
- **Default:** Primary
|
|
@@ -24,6 +28,10 @@ This component uses the following design token collections. Each collection supp
|
|
|
24
28
|
### Color Mode
|
|
25
29
|
- **Modes:** Light | Dark
|
|
26
30
|
- **Default:** Light
|
|
31
|
+
|
|
32
|
+
### Colors Router
|
|
33
|
+
- **Modes:** POC | Old
|
|
34
|
+
- **Default:** POC
|
|
27
35
|
## Usage
|
|
28
36
|
|
|
29
37
|
<Canvas>
|
|
@@ -62,11 +70,11 @@ This component uses the following design token collections. Each collection supp
|
|
|
62
70
|
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
63
71
|
|
|
64
72
|
- **`iconCapsule/background`**
|
|
73
|
+
- **`iconCapsule/border/color`**
|
|
74
|
+
- **`iconCapsule/border/size`**
|
|
75
|
+
- **`iconCapsule/icon/color`**
|
|
65
76
|
- **`iconCapsule/icon/size`**
|
|
66
77
|
- **`iconCapsule/radius`**
|
|
67
78
|
- **`iconCapsule/size`**
|
|
68
|
-
- **`iconCapsuleborder/color`**
|
|
69
|
-
- **`iconCapsuleborder/size`**
|
|
70
|
-
- **`iconCapsuleicon/color`**
|
|
71
79
|
|
|
72
80
|
All tokens support mode-based theming through the `modes` prop.
|
|
@@ -1,102 +1,7 @@
|
|
|
1
|
-
import { Meta } from '@storybook/
|
|
1
|
+
import { Meta } from '@storybook/blocks';
|
|
2
2
|
|
|
3
3
|
<Meta title="Introduction" />
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
Welcome to the component library documentation for this React Native project. This Storybook instance provides comprehensive documentation and interactive examples of all components in the application.
|
|
8
|
-
|
|
9
|
-
## What is Storybook?
|
|
10
|
-
|
|
11
|
-
Storybook is a tool for building UI components in isolation. It makes development, testing, and documentation easier by providing a sandbox environment where you can:
|
|
12
|
-
|
|
13
|
-
- **Develop components in isolation** - Build components without worrying about app-specific dependencies
|
|
14
|
-
- **Test edge cases** - Easily test components with different props and states
|
|
15
|
-
- **Document components** - Create living documentation that stays in sync with your code
|
|
16
|
-
- **Share with your team** - Provide a visual reference for designers and developers
|
|
17
|
-
|
|
18
|
-
## Documentation Contract
|
|
19
|
-
|
|
20
|
-
Every component page now follows a consistent template:
|
|
21
|
-
|
|
22
|
-
- **Accessibility** — how to label, hint, and expose roles/states so assistive tech users get the right cues.
|
|
23
|
-
- **Anatomy** — key slots/parts you can compose or override (leading/trailing, slots, tokens).
|
|
24
|
-
- **Usage Constraints** — safe overrides, layout expectations, and behaviors to avoid.
|
|
25
|
-
|
|
26
|
-
Use these sections as a checklist when creating or reviewing stories so guidance stays close to the API.
|
|
27
|
-
|
|
28
|
-
## Performance Panel
|
|
29
|
-
|
|
30
|
-
A lightweight performance panel is enabled for all stories. Open the **Performance** addon in the Storybook toolbar to inspect mount/remount timings and interaction costs. Use it to:
|
|
31
|
-
|
|
32
|
-
- Compare render timing between variants without creating extra stories.
|
|
33
|
-
- Spot regressions when props or modes change.
|
|
34
|
-
- Validate that heavy children (lists, drawers, sheets) still mount within budget.
|
|
35
|
-
|
|
36
|
-
## Getting Started
|
|
37
|
-
|
|
38
|
-
### Running Storybook
|
|
39
|
-
|
|
40
|
-
#### For Web (Development)
|
|
41
|
-
```bash
|
|
42
|
-
yarn storybook-web
|
|
43
|
-
```
|
|
44
|
-
This will start Storybook on `http://localhost:6006`
|
|
45
|
-
|
|
46
|
-
#### For React Native (iOS/Android)
|
|
47
|
-
```bash
|
|
48
|
-
# iOS
|
|
49
|
-
yarn ios
|
|
50
|
-
|
|
51
|
-
# Android
|
|
52
|
-
yarn android
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Building Storybook for Production
|
|
56
|
-
```bash
|
|
57
|
-
yarn build:storybook-web
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Component Organization
|
|
61
|
-
|
|
62
|
-
Components are organized in the `src/components` directory. Each component typically includes:
|
|
63
|
-
|
|
64
|
-
- **Component file** - The main component implementation
|
|
65
|
-
- **Story file** - Interactive examples and test cases
|
|
66
|
-
- **Documentation** - Comprehensive documentation with usage examples
|
|
67
|
-
|
|
68
|
-
## Available Components
|
|
69
|
-
|
|
70
|
-
### Avatar
|
|
71
|
-
- **Avatar** - A flexible avatar component that displays user profile pictures or monogram initials. Supports multiple size modes and is fully integrated with Figma design tokens.
|
|
72
|
-
|
|
73
|
-
### IconCapsule
|
|
74
|
-
- **IconCapsule** - A flexible icon capsule component that displays an icon within a styled circular or rounded container. Supports different icons and appearance modes, fully integrated with Figma design tokens.
|
|
75
|
-
|
|
76
|
-
## Documentation Features
|
|
77
|
-
|
|
78
|
-
This Storybook instance includes:
|
|
79
|
-
|
|
80
|
-
- ✅ **Automatic documentation** - Generated from JSDoc comments and component metadata
|
|
81
|
-
- ✅ **Interactive examples** - Live, editable component examples
|
|
82
|
-
- ✅ **Props documentation** - Automatic props table generation
|
|
83
|
-
- ✅ **MDX support** - Rich documentation with Markdown and JSX
|
|
84
|
-
|
|
85
|
-
## Best Practices
|
|
86
|
-
|
|
87
|
-
When creating new components:
|
|
88
|
-
|
|
89
|
-
1. **Add JSDoc comments** - Document your components with JSDoc for automatic documentation
|
|
90
|
-
2. **Create stories** - Add multiple stories showing different states and use cases
|
|
91
|
-
3. **Use TypeScript/PropTypes** - Define prop types for better documentation
|
|
92
|
-
4. **Write MDX docs** - Create comprehensive documentation pages when needed
|
|
93
|
-
|
|
94
|
-
## Resources
|
|
95
|
-
|
|
96
|
-
- [Storybook Documentation](https://storybook.js.org/)
|
|
97
|
-
- [React Native Storybook](https://github.com/storybookjs/react-native)
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
Happy coding! 🚀
|
|
5
|
+
# Introduction
|
|
102
6
|
|
|
7
|
+
Welcome to the JFS Components Library.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, Story, Canvas,
|
|
1
|
+
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
|
2
2
|
import * as LazyListStories from './LazyList.stories';
|
|
3
3
|
import LazyList from './LazyList';
|
|
4
4
|
import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
|