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.
Files changed (315) hide show
  1. package/lib/commonjs/components/Accordion/Accordion.mdx +1 -1
  2. package/lib/commonjs/components/ActionFooter/ActionFooter.js +2 -14
  3. package/lib/commonjs/components/ActionFooter/ActionFooter.js.map +1 -1
  4. package/lib/commonjs/components/ActionFooter/ActionFooter.mdx +1 -1
  5. package/lib/commonjs/components/ActionTile/ActionTile.mdx +5 -1
  6. package/lib/commonjs/components/AppBar/AppBar.js +100 -238
  7. package/lib/commonjs/components/AppBar/AppBar.js.map +1 -1
  8. package/lib/commonjs/components/AppBar/AppBar.mdx +51 -39
  9. package/lib/commonjs/components/Avatar/Avatar.mdx +9 -1
  10. package/lib/commonjs/components/AvatarGroup/AvatarGroup.mdx +9 -1
  11. package/lib/commonjs/components/Badge/Badge.mdx +1 -1
  12. package/lib/commonjs/components/Balance/Balance.js +77 -0
  13. package/lib/commonjs/components/Balance/Balance.js.map +1 -0
  14. package/lib/commonjs/components/Balance/Balance.mdx +62 -0
  15. package/lib/commonjs/components/BottomNav/BottomNav.mdx +5 -1
  16. package/lib/commonjs/components/BottomNavItem/BottomNavItem.mdx +5 -1
  17. package/lib/commonjs/components/Button/Button.mdx +5 -1
  18. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +64 -0
  19. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js.map +1 -0
  20. package/lib/commonjs/components/ButtonGroup/ButtonGroup.mdx +56 -0
  21. package/lib/commonjs/components/Card/Card.mdx +1 -1
  22. package/lib/commonjs/components/CardFeedback/CardFeedback.mdx +5 -1
  23. package/lib/commonjs/components/ChipGroup/ChipGroup.js +54 -0
  24. package/lib/commonjs/components/ChipGroup/ChipGroup.js.map +1 -0
  25. package/lib/commonjs/components/ChipGroup/ChipGroup.mdx +40 -0
  26. package/lib/commonjs/components/ChipSelect/ChipSelect.js +103 -0
  27. package/lib/commonjs/components/ChipSelect/ChipSelect.js.map +1 -0
  28. package/lib/commonjs/components/ChipSelect/ChipSelect.mdx +80 -0
  29. package/lib/commonjs/components/CtaCard/CtaCard.js +5 -18
  30. package/lib/commonjs/components/CtaCard/CtaCard.js.map +1 -1
  31. package/lib/commonjs/components/CtaCard/CtaCard.mdx +1 -1
  32. package/lib/commonjs/components/Disclaimer/Disclaimer.mdx +5 -1
  33. package/lib/commonjs/components/Divider/Divider.mdx +5 -1
  34. package/lib/commonjs/components/Drawer/Drawer.mdx +9 -1
  35. package/lib/commonjs/components/EmptyState/EmptyState.js +138 -0
  36. package/lib/commonjs/components/EmptyState/EmptyState.js.map +1 -0
  37. package/lib/commonjs/components/EmptyState/EmptyState.mdx +73 -0
  38. package/lib/commonjs/components/FilterBar/FilterBar.mdx +1 -1
  39. package/lib/commonjs/components/HStack/HStack.js +67 -0
  40. package/lib/commonjs/components/HStack/HStack.js.map +1 -0
  41. package/lib/commonjs/components/HStack/HStack.mdx +44 -0
  42. package/lib/commonjs/components/IconButton/IconButton.mdx +5 -1
  43. package/lib/commonjs/components/IconCapsule/IconCapsule.js +3 -3
  44. package/lib/commonjs/components/IconCapsule/IconCapsule.js.map +1 -1
  45. package/lib/commonjs/components/IconCapsule/IconCapsule.mdx +12 -4
  46. package/lib/commonjs/components/Introduction.mdx +3 -98
  47. package/lib/commonjs/components/LazyList/LazyList.mdx +1 -1
  48. package/lib/commonjs/components/ListGroup/ListGroup.js +3 -30
  49. package/lib/commonjs/components/ListGroup/ListGroup.js.map +1 -1
  50. package/lib/commonjs/components/ListGroup/ListGroup.mdx +5 -1
  51. package/lib/commonjs/components/ListItem/ListItem.js +5 -37
  52. package/lib/commonjs/components/ListItem/ListItem.js.map +1 -1
  53. package/lib/commonjs/components/ListItem/ListItem.mdx +5 -1
  54. package/lib/commonjs/components/MediaCard/MediaCard.mdx +5 -1
  55. package/lib/commonjs/components/MerchantProfile/MerchantProfile.mdx +1 -1
  56. package/lib/commonjs/components/MoneyValue/MoneyValue.mdx +6 -2
  57. package/lib/commonjs/components/NavArrow/NavArrow.js +42 -17
  58. package/lib/commonjs/components/NavArrow/NavArrow.js.map +1 -1
  59. package/lib/commonjs/components/NavArrow/NavArrow.mdx +5 -1
  60. package/lib/commonjs/components/PageTitle/PageTitle.mdx +5 -1
  61. package/lib/commonjs/components/Screen/Screen.js +53 -0
  62. package/lib/commonjs/components/Screen/Screen.js.map +1 -0
  63. package/lib/commonjs/components/Screen/Screen.mdx +58 -0
  64. package/lib/commonjs/components/Section/Section.js +3 -25
  65. package/lib/commonjs/components/Section/Section.js.map +1 -1
  66. package/lib/commonjs/components/Section/Section.mdx +5 -1
  67. package/lib/commonjs/components/Stepper/Step.mdx +5 -1
  68. package/lib/commonjs/components/Stepper/StepLabel.mdx +5 -1
  69. package/lib/commonjs/components/Stepper/Stepper.mdx +1 -1
  70. package/lib/commonjs/components/SupportText/SupportText.js +83 -0
  71. package/lib/commonjs/components/SupportText/SupportText.js.map +1 -0
  72. package/lib/commonjs/components/SupportText/SupportText.mdx +48 -0
  73. package/lib/commonjs/components/SupportText/SupportTextIcon.js +47 -0
  74. package/lib/commonjs/components/SupportText/SupportTextIcon.js.map +1 -0
  75. package/lib/commonjs/components/SupportText/SupportTextIcon.mdx +35 -0
  76. package/lib/commonjs/components/SupportText/index.js +21 -0
  77. package/lib/commonjs/components/SupportText/index.js.map +1 -0
  78. package/lib/commonjs/components/TextInput/TextInput.mdx +9 -1
  79. package/lib/commonjs/components/ThreadHero/ThreadHero.mdx +1 -1
  80. package/lib/commonjs/components/Tooltip/Tooltip.mdx +5 -1
  81. package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +1 -1
  82. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +2 -24
  83. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js.map +1 -1
  84. package/lib/commonjs/components/TransactionDetails/TransactionDetails.mdx +1 -1
  85. package/lib/commonjs/components/TransactionStatus/TransactionStatus.mdx +1 -1
  86. package/lib/commonjs/components/UpiHandle/UpiHandle.mdx +5 -1
  87. package/lib/commonjs/components/VStack/VStack.js +73 -0
  88. package/lib/commonjs/components/VStack/VStack.js.map +1 -0
  89. package/lib/commonjs/components/VStack/VStack.mdx +44 -0
  90. package/lib/commonjs/components/index.js +28 -0
  91. package/lib/commonjs/components/index.js.map +1 -1
  92. package/lib/commonjs/design-tokens/JFS Variables-variables-full.json +1 -18633
  93. package/lib/commonjs/design-tokens/figma-variables-resolver.js +3 -9
  94. package/lib/commonjs/design-tokens/figma-variables-resolver.js.map +1 -2
  95. package/lib/commonjs/icons/ic_info.svg +1 -0
  96. package/lib/commonjs/icons/ic_warning.svg +1 -0
  97. package/lib/commonjs/icons/registry.js +2 -2
  98. package/lib/commonjs/icons/registry.js.map +1 -1
  99. package/lib/commonjs/utils/react-utils.js +47 -0
  100. package/lib/commonjs/utils/react-utils.js.map +1 -0
  101. package/lib/module/components/Accordion/Accordion.mdx +1 -1
  102. package/lib/module/components/ActionFooter/ActionFooter.js +2 -14
  103. package/lib/module/components/ActionFooter/ActionFooter.js.map +1 -1
  104. package/lib/module/components/ActionFooter/ActionFooter.mdx +1 -1
  105. package/lib/module/components/ActionTile/ActionTile.mdx +5 -1
  106. package/lib/module/components/AppBar/AppBar.js +100 -238
  107. package/lib/module/components/AppBar/AppBar.js.map +1 -1
  108. package/lib/module/components/AppBar/AppBar.mdx +51 -39
  109. package/lib/module/components/Avatar/Avatar.mdx +9 -1
  110. package/lib/module/components/AvatarGroup/AvatarGroup.mdx +9 -1
  111. package/lib/module/components/Badge/Badge.mdx +1 -1
  112. package/lib/module/components/Balance/Balance.js +72 -0
  113. package/lib/module/components/Balance/Balance.js.map +1 -0
  114. package/lib/module/components/Balance/Balance.mdx +62 -0
  115. package/lib/module/components/BottomNav/BottomNav.mdx +5 -1
  116. package/lib/module/components/BottomNavItem/BottomNavItem.mdx +5 -1
  117. package/lib/module/components/Button/Button.mdx +5 -1
  118. package/lib/module/components/ButtonGroup/ButtonGroup.js +59 -0
  119. package/lib/module/components/ButtonGroup/ButtonGroup.js.map +1 -0
  120. package/lib/module/components/ButtonGroup/ButtonGroup.mdx +56 -0
  121. package/lib/module/components/Card/Card.mdx +1 -1
  122. package/lib/module/components/CardFeedback/CardFeedback.mdx +5 -1
  123. package/lib/module/components/ChipGroup/ChipGroup.js +49 -0
  124. package/lib/module/components/ChipGroup/ChipGroup.js.map +1 -0
  125. package/lib/module/components/ChipGroup/ChipGroup.mdx +40 -0
  126. package/lib/module/components/ChipSelect/ChipSelect.js +98 -0
  127. package/lib/module/components/ChipSelect/ChipSelect.js.map +1 -0
  128. package/lib/module/components/ChipSelect/ChipSelect.mdx +80 -0
  129. package/lib/module/components/CtaCard/CtaCard.js +5 -18
  130. package/lib/module/components/CtaCard/CtaCard.js.map +1 -1
  131. package/lib/module/components/CtaCard/CtaCard.mdx +1 -1
  132. package/lib/module/components/Disclaimer/Disclaimer.mdx +5 -1
  133. package/lib/module/components/Divider/Divider.mdx +5 -1
  134. package/lib/module/components/Drawer/Drawer.mdx +9 -1
  135. package/lib/module/components/EmptyState/EmptyState.js +132 -0
  136. package/lib/module/components/EmptyState/EmptyState.js.map +1 -0
  137. package/lib/module/components/EmptyState/EmptyState.mdx +73 -0
  138. package/lib/module/components/FilterBar/FilterBar.mdx +1 -1
  139. package/lib/module/components/HStack/HStack.js +61 -0
  140. package/lib/module/components/HStack/HStack.js.map +1 -0
  141. package/lib/module/components/HStack/HStack.mdx +44 -0
  142. package/lib/module/components/IconButton/IconButton.mdx +5 -1
  143. package/lib/module/components/IconCapsule/IconCapsule.js +3 -3
  144. package/lib/module/components/IconCapsule/IconCapsule.js.map +1 -1
  145. package/lib/module/components/IconCapsule/IconCapsule.mdx +12 -4
  146. package/lib/module/components/Introduction.mdx +3 -98
  147. package/lib/module/components/LazyList/LazyList.mdx +1 -1
  148. package/lib/module/components/ListGroup/ListGroup.js +1 -30
  149. package/lib/module/components/ListGroup/ListGroup.js.map +1 -1
  150. package/lib/module/components/ListGroup/ListGroup.mdx +5 -1
  151. package/lib/module/components/ListItem/ListItem.js +1 -35
  152. package/lib/module/components/ListItem/ListItem.js.map +1 -1
  153. package/lib/module/components/ListItem/ListItem.mdx +5 -1
  154. package/lib/module/components/MediaCard/MediaCard.mdx +5 -1
  155. package/lib/module/components/MerchantProfile/MerchantProfile.mdx +1 -1
  156. package/lib/module/components/MoneyValue/MoneyValue.mdx +6 -2
  157. package/lib/module/components/NavArrow/NavArrow.js +42 -17
  158. package/lib/module/components/NavArrow/NavArrow.js.map +1 -1
  159. package/lib/module/components/NavArrow/NavArrow.mdx +5 -1
  160. package/lib/module/components/PageTitle/PageTitle.mdx +5 -1
  161. package/lib/module/components/Screen/Screen.js +47 -0
  162. package/lib/module/components/Screen/Screen.js.map +1 -0
  163. package/lib/module/components/Screen/Screen.mdx +58 -0
  164. package/lib/module/components/Section/Section.js +1 -23
  165. package/lib/module/components/Section/Section.js.map +1 -1
  166. package/lib/module/components/Section/Section.mdx +5 -1
  167. package/lib/module/components/Stepper/Step.mdx +5 -1
  168. package/lib/module/components/Stepper/StepLabel.mdx +5 -1
  169. package/lib/module/components/Stepper/Stepper.mdx +1 -1
  170. package/lib/module/components/SupportText/SupportText.js +78 -0
  171. package/lib/module/components/SupportText/SupportText.js.map +1 -0
  172. package/lib/module/components/SupportText/SupportText.mdx +48 -0
  173. package/lib/module/components/SupportText/SupportTextIcon.js +42 -0
  174. package/lib/module/components/SupportText/SupportTextIcon.js.map +1 -0
  175. package/lib/module/components/SupportText/SupportTextIcon.mdx +35 -0
  176. package/lib/module/components/SupportText/index.js +5 -0
  177. package/lib/module/components/SupportText/index.js.map +1 -0
  178. package/lib/module/components/TextInput/TextInput.mdx +9 -1
  179. package/lib/module/components/ThreadHero/ThreadHero.mdx +1 -1
  180. package/lib/module/components/Tooltip/Tooltip.mdx +5 -1
  181. package/lib/module/components/TransactionBubble/TransactionBubble.mdx +1 -1
  182. package/lib/module/components/TransactionDetails/TransactionDetails.js +2 -26
  183. package/lib/module/components/TransactionDetails/TransactionDetails.js.map +1 -1
  184. package/lib/module/components/TransactionDetails/TransactionDetails.mdx +1 -1
  185. package/lib/module/components/TransactionStatus/TransactionStatus.mdx +1 -1
  186. package/lib/module/components/UpiHandle/UpiHandle.mdx +5 -1
  187. package/lib/module/components/VStack/VStack.js +67 -0
  188. package/lib/module/components/VStack/VStack.js.map +1 -0
  189. package/lib/module/components/VStack/VStack.mdx +44 -0
  190. package/lib/module/components/index.js +4 -0
  191. package/lib/module/components/index.js.map +1 -1
  192. package/lib/module/design-tokens/JFS Variables-variables-full.json +1 -18633
  193. package/lib/module/design-tokens/figma-variables-resolver.js +2 -2
  194. package/lib/module/design-tokens/figma-variables-resolver.js.map +0 -1
  195. package/lib/module/icons/ic_info.svg +1 -0
  196. package/lib/module/icons/ic_warning.svg +1 -0
  197. package/lib/module/icons/registry.js +2 -2
  198. package/lib/module/icons/registry.js.map +1 -1
  199. package/lib/module/utils/react-utils.js +43 -0
  200. package/lib/module/utils/react-utils.js.map +1 -0
  201. package/lib/typescript/components/ActionFooter/ActionFooter.d.ts.map +1 -1
  202. package/lib/typescript/components/AppBar/AppBar.d.ts +34 -68
  203. package/lib/typescript/components/AppBar/AppBar.d.ts.map +1 -1
  204. package/lib/typescript/components/Balance/Balance.d.ts +44 -0
  205. package/lib/typescript/components/Balance/Balance.d.ts.map +1 -0
  206. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts +36 -0
  207. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  208. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts +29 -0
  209. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts.map +1 -0
  210. package/lib/typescript/components/ChipSelect/ChipSelect.d.ts +47 -0
  211. package/lib/typescript/components/ChipSelect/ChipSelect.d.ts.map +1 -0
  212. package/lib/typescript/components/CtaCard/CtaCard.d.ts.map +1 -1
  213. package/lib/typescript/components/EmptyState/EmptyState.d.ts +38 -0
  214. package/lib/typescript/components/EmptyState/EmptyState.d.ts.map +1 -0
  215. package/lib/typescript/components/HStack/HStack.d.ts +41 -0
  216. package/lib/typescript/components/HStack/HStack.d.ts.map +1 -0
  217. package/lib/typescript/components/ListGroup/ListGroup.d.ts.map +1 -1
  218. package/lib/typescript/components/ListItem/ListItem.d.ts.map +1 -1
  219. package/lib/typescript/components/NavArrow/NavArrow.d.ts +3 -3
  220. package/lib/typescript/components/NavArrow/NavArrow.d.ts.map +1 -1
  221. package/lib/typescript/components/Screen/Screen.d.ts +23 -0
  222. package/lib/typescript/components/Screen/Screen.d.ts.map +1 -0
  223. package/lib/typescript/components/Section/Section.d.ts.map +1 -1
  224. package/lib/typescript/components/SupportText/SupportText.d.ts +34 -0
  225. package/lib/typescript/components/SupportText/SupportText.d.ts.map +1 -0
  226. package/lib/typescript/components/SupportText/SupportTextIcon.d.ts +10 -0
  227. package/lib/typescript/components/SupportText/SupportTextIcon.d.ts.map +1 -0
  228. package/lib/typescript/components/SupportText/index.d.ts +3 -0
  229. package/lib/typescript/components/SupportText/index.d.ts.map +1 -0
  230. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts.map +1 -1
  231. package/lib/typescript/components/VStack/VStack.d.ts +41 -0
  232. package/lib/typescript/components/VStack/VStack.d.ts.map +1 -0
  233. package/lib/typescript/components/index.d.ts +4 -0
  234. package/lib/typescript/components/index.d.ts.map +1 -1
  235. package/lib/typescript/icons/registry.d.ts +1 -1
  236. package/lib/typescript/icons/registry.d.ts.map +1 -1
  237. package/lib/typescript/utils/react-utils.d.ts +7 -0
  238. package/lib/typescript/utils/react-utils.d.ts.map +1 -0
  239. package/package.json +7 -5
  240. package/src/components/.token-metadata.json +468 -12
  241. package/src/components/Accordion/Accordion.mdx +1 -1
  242. package/src/components/ActionFooter/ActionFooter.mdx +1 -1
  243. package/src/components/ActionFooter/ActionFooter.tsx +3 -12
  244. package/src/components/ActionTile/ActionTile.mdx +5 -1
  245. package/src/components/AppBar/AppBar.mdx +51 -39
  246. package/src/components/AppBar/AppBar.tsx +140 -261
  247. package/src/components/Avatar/Avatar.mdx +9 -1
  248. package/src/components/AvatarGroup/AvatarGroup.mdx +9 -1
  249. package/src/components/Badge/Badge.mdx +1 -1
  250. package/src/components/Balance/Balance.mdx +62 -0
  251. package/src/components/Balance/Balance.tsx +107 -0
  252. package/src/components/BottomNav/BottomNav.mdx +5 -1
  253. package/src/components/BottomNavItem/BottomNavItem.mdx +5 -1
  254. package/src/components/Button/Button.mdx +5 -1
  255. package/src/components/ButtonGroup/ButtonGroup.mdx +56 -0
  256. package/src/components/ButtonGroup/ButtonGroup.tsx +78 -0
  257. package/src/components/Card/Card.mdx +1 -1
  258. package/src/components/CardFeedback/CardFeedback.mdx +5 -1
  259. package/src/components/ChipGroup/ChipGroup.mdx +40 -0
  260. package/src/components/ChipGroup/ChipGroup.tsx +67 -0
  261. package/src/components/ChipSelect/ChipSelect.mdx +80 -0
  262. package/src/components/ChipSelect/ChipSelect.tsx +138 -0
  263. package/src/components/CtaCard/CtaCard.mdx +1 -1
  264. package/src/components/CtaCard/CtaCard.tsx +12 -20
  265. package/src/components/Disclaimer/Disclaimer.mdx +5 -1
  266. package/src/components/Divider/Divider.mdx +5 -1
  267. package/src/components/Drawer/Drawer.mdx +9 -1
  268. package/src/components/EmptyState/EmptyState.mdx +73 -0
  269. package/src/components/EmptyState/EmptyState.tsx +181 -0
  270. package/src/components/FilterBar/FilterBar.mdx +1 -1
  271. package/src/components/HStack/HStack.mdx +44 -0
  272. package/src/components/HStack/HStack.tsx +95 -0
  273. package/src/components/IconButton/IconButton.mdx +5 -1
  274. package/src/components/IconCapsule/IconCapsule.mdx +12 -4
  275. package/src/components/IconCapsule/IconCapsule.tsx +3 -3
  276. package/src/components/Introduction.mdx +3 -98
  277. package/src/components/LazyList/LazyList.mdx +1 -1
  278. package/src/components/ListGroup/ListGroup.mdx +5 -1
  279. package/src/components/ListGroup/ListGroup.tsx +5 -43
  280. package/src/components/ListItem/ListItem.mdx +5 -1
  281. package/src/components/ListItem/ListItem.tsx +15 -60
  282. package/src/components/MediaCard/MediaCard.mdx +5 -1
  283. package/src/components/MerchantProfile/MerchantProfile.mdx +1 -1
  284. package/src/components/MoneyValue/MoneyValue.mdx +6 -2
  285. package/src/components/NavArrow/NavArrow.mdx +5 -1
  286. package/src/components/NavArrow/NavArrow.tsx +48 -16
  287. package/src/components/PageTitle/PageTitle.mdx +5 -1
  288. package/src/components/Screen/Screen.mdx +58 -0
  289. package/src/components/Screen/Screen.tsx +60 -0
  290. package/src/components/Section/Section.mdx +5 -1
  291. package/src/components/Section/Section.tsx +17 -46
  292. package/src/components/Stepper/Step.mdx +5 -1
  293. package/src/components/Stepper/StepLabel.mdx +5 -1
  294. package/src/components/Stepper/Stepper.mdx +1 -1
  295. package/src/components/SupportText/SupportText.mdx +48 -0
  296. package/src/components/SupportText/SupportText.tsx +104 -0
  297. package/src/components/SupportText/SupportTextIcon.mdx +35 -0
  298. package/src/components/SupportText/SupportTextIcon.tsx +45 -0
  299. package/src/components/SupportText/index.ts +2 -0
  300. package/src/components/TextInput/TextInput.mdx +9 -1
  301. package/src/components/ThreadHero/ThreadHero.mdx +1 -1
  302. package/src/components/Tooltip/Tooltip.mdx +5 -1
  303. package/src/components/TransactionBubble/TransactionBubble.mdx +1 -1
  304. package/src/components/TransactionDetails/TransactionDetails.mdx +1 -1
  305. package/src/components/TransactionDetails/TransactionDetails.tsx +1 -38
  306. package/src/components/TransactionStatus/TransactionStatus.mdx +1 -1
  307. package/src/components/UpiHandle/UpiHandle.mdx +5 -1
  308. package/src/components/VStack/VStack.mdx +44 -0
  309. package/src/components/VStack/VStack.tsx +100 -0
  310. package/src/components/index.ts +4 -0
  311. package/src/design-tokens/JFS Variables-variables-full.json +1 -18633
  312. package/src/icons/ic_info.svg +1 -0
  313. package/src/icons/ic_warning.svg +1 -0
  314. package/src/icons/registry.ts +9 -1
  315. package/src/utils/react-utils.ts +51 -0
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
 
3
- import React, { useState } from '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
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
- import IconButton from '../IconButton/IconButton';
8
- import Avatar from '../Avatar/Avatar';
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".
9
10
 
10
11
  /**
11
12
  * Helper function to recursively clone children and pass modes prop to components that accept it.
12
- * This ensures that all child components in slots receive the modes prop from the parent.
13
13
  */
14
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  function cloneChildrenWithModes(children, modes) {
@@ -24,7 +24,6 @@ function cloneChildrenWithModes(children, modes) {
24
24
 
25
25
  // Clone the child with modes prop if it doesn't already have one
26
26
  // or merge with existing modes if it does
27
- // Merge order: parent modes first, then child's explicit modes override them
28
27
  const existingModes = child.props?.modes;
29
28
  const mergedModes = existingModes ? {
30
29
  ...modes,
@@ -41,41 +40,15 @@ function cloneChildrenWithModes(children, modes) {
41
40
  }, processedChildren);
42
41
  })?.filter(child => child !== null && child !== undefined) ?? [];
43
42
  }
44
-
45
- /**
46
- * AppBar component that mirrors the Figma "AppBar" component.
47
- *
48
- * This component supports:
49
- * - **leading** IconButton (default: back button with ic_chevron_left)
50
- * - **middle** slot for custom content (typically title or search)
51
- * - **actions** slot for custom action buttons (default: two IconButtons)
52
- * - **design-token driven styling** via `getVariableByName` and `modes`
53
- *
54
- * Wherever the Figma layer name contains "Slot", this component exposes a
55
- * dedicated React "slot" prop:
56
- * - Slot "Middle" → `middleSlot`
57
- * - Slot "Actions" → `actionsSlot`
58
- *
59
- * @component
60
- * @param {Object} props
61
- * @param {React.ReactNode} [props.leading] - Optional leading element. Defaults to IconButton with ic_chevron_left.
62
- * @param {React.ReactNode} [props.middleSlot] - Optional custom slot for middle content (Figma Slot "Middle").
63
- * @param {React.ReactNode} [props.actionsSlot] - Optional custom slot for action buttons (Figma Slot "Actions").
64
- * @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
65
- * @param {Function} [props.onLeadingPress] - Callback when leading button is pressed (only used if leading is not provided).
66
- * @param {Object} [props.style] - Optional container style overrides.
67
- * @param {string} [props.accessibilityLabel] - Accessibility label for the app bar
68
- * @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
69
- */
70
-
71
- function AppBar({
72
- leading,
43
+ export default function AppBar({
44
+ type = 'MainPage',
45
+ leadingSlot,
73
46
  middleSlot,
74
47
  actionsSlot,
75
48
  modes: propModes = {},
76
49
  onLeadingPress,
77
50
  style,
78
- accessibilityLabel = "App bar",
51
+ accessibilityLabel,
79
52
  accessibilityHint,
80
53
  ...rest
81
54
  }) {
@@ -86,88 +59,104 @@ function AppBar({
86
59
  ...globalModes,
87
60
  ...propModes
88
61
  };
89
- const [childFocused, setChildFocused] = useState(false);
90
- function injectFocusHandlers(node) {
91
- if (! /*#__PURE__*/React.isValidElement(node)) return node;
92
- const existingOnFocus = node.props?.onFocus;
93
- const existingOnBlur = node.props?.onBlur;
94
- return /*#__PURE__*/React.cloneElement(node, {
95
- ...node.props,
96
- onFocus: e => {
97
- setChildFocused(true);
98
- existingOnFocus?.(e);
99
- },
100
- onBlur: e => {
101
- setChildFocused(false);
102
- existingOnBlur?.(e);
103
- }
104
- });
105
- }
106
- // Resolve container tokens
107
- const paddingHorizontal = getVariableByName('appBarActions/padding/horizontal', modes) ?? 16;
108
- const paddingVertical = getVariableByName('appBarActions/padding/vertical', modes) ?? 10;
109
- const actionsGap = getVariableByName('appBarActions/actions/gap', modes) ?? 8;
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
110
74
  const containerStyle = {
111
75
  flexDirection: 'row',
112
76
  alignItems: 'center',
113
77
  justifyContent: 'space-between',
114
- paddingHorizontal,
115
- paddingVertical,
116
- minHeight: 52
117
- };
118
- const actionsRowStyle = {
119
- flexDirection: 'row',
120
- gap: actionsGap,
121
- alignItems: 'center'
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
122
85
  };
123
86
 
124
- // Default leading: IconButton with back icon
125
- const defaultLeading = leading ?? /*#__PURE__*/_jsx(IconButton, {
126
- iconName: "ic_chevron_left",
127
- modes: modes,
128
- ...(onLeadingPress !== undefined ? {
129
- onPress: onLeadingPress
130
- } : {}),
131
- accessibilityLabel: "Go back",
132
- accessibilityHint: "Navigates to the previous screen"
133
- });
134
-
135
- // Default actions: Two IconButtons
136
- const defaultActions = actionsSlot ?? /*#__PURE__*/_jsxs(View, {
137
- style: actionsRowStyle,
138
- children: [/*#__PURE__*/_jsx(IconButton, {
139
- iconName: "ic_hellojio",
140
- modes: modes,
141
- onPress: () => {},
142
- accessibilityLabel: "Hello Jio",
143
- accessibilityHint: "Opens Hello Jio menu"
144
- }), /*#__PURE__*/_jsx(IconButton, {
145
- iconName: "ic_more_horizontal",
146
- modes: modes,
147
- onPress: () => {},
148
- accessibilityLabel: "More options",
149
- accessibilityHint: "Opens additional options menu"
150
- })]
151
- });
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
+ }
152
129
 
153
- // Clone slot children and pass modes to all children that accept it
154
- const processedMiddleSlot = middleSlot ? cloneChildrenWithModes(React.Children.toArray(middleSlot), modes) : null;
155
- const processedActionsSlot = actionsSlot ? cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes) : defaultActions;
130
+ // --- Process Slots ---
131
+ const processedLeading = leadingSlot ? cloneChildrenWithModes([leadingSlot], modes)[0] : defaultLeading;
132
+ const processedMiddle = middleSlot ? cloneChildrenWithModes(React.Children.toArray(middleSlot), modes) : null;
156
133
 
157
- // Process leading if it's a React element
158
- const processedLeading = /*#__PURE__*/React.isValidElement(leading) ? injectFocusHandlers(cloneChildrenWithModes([leading], modes)[0]) : defaultLeading;
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;
159
145
  return /*#__PURE__*/_jsxs(View, {
160
- style: [containerStyle, childFocused ? {
161
- borderBottomWidth: 2,
162
- borderBottomColor: '#222'
163
- } : null, style],
146
+ style: [containerStyle, style],
164
147
  accessibilityRole: "header",
165
- accessibilityLabel: accessibilityLabel,
166
- ...(accessibilityHint !== undefined ? {
148
+ accessibilityLabel: accessibilityLabel || (isMain ? "Main Header" : "Sub Header"),
149
+ ...(accessibilityHint ? {
167
150
  accessibilityHint
168
151
  } : {}),
169
152
  ...rest,
170
- children: [processedLeading, processedMiddleSlot && /*#__PURE__*/_jsx(View, {
153
+ children: [/*#__PURE__*/_jsx(View, {
154
+ style: {
155
+ flexDirection: 'row',
156
+ alignItems: 'center'
157
+ },
158
+ children: processedLeading
159
+ }), processedMiddle && /*#__PURE__*/_jsx(View, {
171
160
  style: {
172
161
  position: 'absolute',
173
162
  left: 0,
@@ -176,142 +165,15 @@ function AppBar({
176
165
  bottom: 0,
177
166
  alignItems: 'center',
178
167
  justifyContent: 'center',
179
- paddingHorizontal: 21,
180
- pointerEvents: 'box-none'
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.
181
170
  },
182
- accessibilityElementsHidden: true,
183
- importantForAccessibility: "no",
184
- children: processedMiddleSlot
171
+ pointerEvents: "box-none",
172
+ children: processedMiddle
185
173
  }), /*#__PURE__*/_jsx(View, {
186
- style: actionsRowStyle,
187
- children: Array.isArray(processedActionsSlot) ? processedActionsSlot.map(n => injectFocusHandlers(n)) : injectFocusHandlers(processedActionsSlot)
188
- })]
189
- });
190
- }
191
-
192
- /**
193
- * AppBarHome component that mirrors the Figma "AppBar.home" component.
194
- *
195
- * This component supports:
196
- * - **leading** IconButton (default: circular button with customizable icon)
197
- * - **actions** slot for custom action buttons (default: search and notification IconButtons)
198
- * - **avatar** Avatar component on the right
199
- * - **design-token driven styling** via `getVariableByName` and `modes`
200
- *
201
- * Wherever the Figma layer name contains "Slot", this component exposes a
202
- * dedicated React "slot" prop:
203
- * - Slot "Actions" → `actionsSlot`
204
- *
205
- * @component
206
- * @param {Object} props
207
- * @param {React.ReactNode} [props.leading] - Optional leading element. Defaults to IconButton with customizable icon.
208
- * @param {React.ReactNode} [props.actionsSlot] - Optional custom slot for action buttons (Figma Slot "Actions").
209
- * @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
210
- * @param {Function} [props.onLeadingPress] - Callback when leading button is pressed (only used if leading is not provided).
211
- * @param {string} [props.leadingIconName] - Icon name for default leading button (default: 'ic_hellojio').
212
- * @param {Object} [props.avatarProps] - Props to pass to Avatar component.
213
- * @param {Object} [props.style] - Optional container style overrides.
214
- * @param {string} [props.accessibilityLabel] - Accessibility label for the app bar
215
- * @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
216
- */
217
-
218
- function AppBarHome({
219
- leading,
220
- actionsSlot,
221
- modes: propModes = {},
222
- onLeadingPress,
223
- leadingIconName = 'ic_hellojio',
224
- avatarProps,
225
- style,
226
- accessibilityLabel = "Home app bar",
227
- accessibilityHint,
228
- ...rest
229
- }) {
230
- const {
231
- modes: globalModes
232
- } = useTokens();
233
- const modes = {
234
- ...globalModes,
235
- ...propModes
236
- };
237
-
238
- // Resolve container tokens
239
- const paddingHorizontal = getVariableByName('appBarHome/padding/horizontal', modes) ?? 16;
240
- const paddingVertical = getVariableByName('appBarHome/padding/vertical', modes) ?? 16;
241
- const actionsGap = getVariableByName('appBarHome/actions/gap', modes) ?? 0;
242
- const containerStyle = {
243
- flexDirection: 'row',
244
- alignItems: 'center',
245
- justifyContent: 'space-between',
246
- paddingHorizontal,
247
- paddingVertical,
248
- width: '100%'
249
- };
250
- const homeActionsRowStyle = {
251
- flexDirection: 'row',
252
- gap: actionsGap,
253
- alignItems: 'center'
254
- };
255
-
256
- // Default leading: IconButton with customizable icon
257
- // The IconButton already handles its own circular styling, so we just use it directly
258
- const defaultLeading = leading ?? /*#__PURE__*/_jsx(IconButton, {
259
- iconName: leadingIconName,
260
- modes: modes,
261
- ...(onLeadingPress !== undefined ? {
262
- onPress: onLeadingPress
263
- } : {}),
264
- accessibilityLabel: "Home",
265
- accessibilityHint: "Opens home menu"
266
- });
267
-
268
- // Default actions: Search and Notification IconButtons
269
- const defaultActions = actionsSlot ?? /*#__PURE__*/_jsxs(View, {
270
- style: homeActionsRowStyle,
271
- children: [/*#__PURE__*/_jsx(IconButton, {
272
- iconName: "ic_search",
273
- modes: modes,
274
- onPress: () => {},
275
- accessibilityLabel: "Search",
276
- accessibilityHint: "Opens search screen"
277
- }), /*#__PURE__*/_jsx(IconButton, {
278
- iconName: "ic_notification",
279
- modes: modes,
280
- onPress: () => {},
281
- accessibilityLabel: "Notifications",
282
- accessibilityHint: "Opens notifications"
283
- })]
284
- });
285
-
286
- // Clone slot children and pass modes to all children that accept it
287
- const processedActionsSlot = actionsSlot ? cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes) : defaultActions;
288
-
289
- // Process leading if it's a React element
290
- const processedLeading = /*#__PURE__*/React.isValidElement(leading) ? cloneChildrenWithModes([leading], modes)[0] : defaultLeading;
291
-
292
- // Process avatar with modes
293
- const avatarModes = avatarProps?.modes ? {
294
- ...modes,
295
- ...avatarProps.modes
296
- } : modes;
297
- const processedAvatar = /*#__PURE__*/_jsx(Avatar, {
298
- ...(avatarProps ?? {}),
299
- modes: avatarModes
300
- });
301
- return /*#__PURE__*/_jsxs(View, {
302
- style: [containerStyle, style],
303
- accessibilityRole: "header",
304
- accessibilityLabel: accessibilityLabel,
305
- ...(accessibilityHint !== undefined ? {
306
- accessibilityHint
307
- } : {}),
308
- ...rest,
309
- children: [processedLeading, /*#__PURE__*/_jsxs(View, {
310
- style: homeActionsRowStyle,
311
- children: [processedActionsSlot, processedAvatar]
174
+ style: actionsStyle,
175
+ children: processedActions
312
176
  })]
313
177
  });
314
178
  }
315
- export default AppBar;
316
- export { AppBarHome };
317
179
  //# sourceMappingURL=AppBar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","View","getVariableByName","useTokens","IconButton","Avatar","jsx","_jsx","jsxs","_jsxs","cloneChildrenWithModes","children","modes","Children","map","child","isValidElement","childChildren","props","hasChildren","undefined","existingModes","mergedModes","processedChildren","toArray","cloneElement","filter","AppBar","leading","middleSlot","actionsSlot","propModes","onLeadingPress","style","accessibilityLabel","accessibilityHint","rest","globalModes","childFocused","setChildFocused","injectFocusHandlers","node","existingOnFocus","onFocus","existingOnBlur","onBlur","e","paddingHorizontal","paddingVertical","actionsGap","containerStyle","flexDirection","alignItems","justifyContent","minHeight","actionsRowStyle","gap","defaultLeading","iconName","onPress","defaultActions","processedMiddleSlot","processedActionsSlot","processedLeading","borderBottomWidth","borderBottomColor","accessibilityRole","position","left","right","top","bottom","pointerEvents","accessibilityElementsHidden","importantForAccessibility","Array","isArray","n","AppBarHome","leadingIconName","avatarProps","width","homeActionsRowStyle","avatarModes","processedAvatar"],"sourceRoot":"../../../../src","sources":["components/AppBar/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,GAC3C6C,cAAc;;EAElB;EACA,MAAM0B,WAAW,GAAGH,WAAW,EAAEpE,KAAK,GAAG;IAAE,GAAGA,KAAK;IAAE,GAAGoE,WAAW,CAACpE;EAAM,CAAC,GAAGA,KAAK;EACnF,MAAMwE,eAAe,gBACnB7E,IAAA,CAACF,MAAM;IAAA,IACA2E,WAAW,IAAI,CAAC,CAAC;IACtBpE,KAAK,EAAEuE;EAAY,CACpB,CACF;EAED,oBACE1E,KAAA,CAACR,IAAI;IACHgC,KAAK,EAAE,CAACiB,cAAc,EAAEjB,KAAK,CAAE;IAC/BiC,iBAAiB,EAAC,QAAQ;IAC1BhC,kBAAkB,EAAEA,kBAAmB;IAAA,IAClCC,iBAAiB,KAAKf,SAAS,GAAG;MAAEe;IAAkB,CAAC,GAAG,CAAC,CAAC;IAAA,GAC7DC,IAAI;IAAAzB,QAAA,GAEPoD,gBAAgB,eACjBtD,KAAA,CAACR,IAAI;MAACgC,KAAK,EAAEiD,mBAAoB;MAAAvE,QAAA,GAC9BmD,oBAAoB,EACpBsB,eAAe;IAAA,CACZ,CAAC;EAAA,CACH,CAAC;AAEX;AAEA,eAAezD,MAAM;AACrB,SAASmD,UAAU","ignoreList":[]}
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,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EAAEwB,YAAa;IAAA/C,QAAA,EAAED,sBAAsB,CAACV,KAAK,CAACa,QAAQ,CAACW,OAAO,CAACO,WAAW,CAAC,EAAEnB,KAAK;EAAC,CAAO,CAAC,GACtG,IAAI;EAER,oBACEH,KAAA,CAACR,IAAI;IACHiC,KAAK,EAAE,CAACW,cAAc,EAAEX,KAAK,CAAE;IAC/BkB,iBAAiB,EAAC,QAAQ;IAC1BjB,kBAAkB,EAAEA,kBAAkB,KAAKI,MAAM,GAAG,aAAa,GAAG,YAAY,CAAE;IAAA,IAC7EH,iBAAiB,GAAG;MAAEA;IAAkB,CAAC,GAAG,CAAC,CAAC;IAAA,GAC/CC,IAAI;IAAA1B,QAAA,gBAGRJ,IAAA,CAACN,IAAI;MAACiC,KAAK,EAAE;QAAEY,aAAa,EAAE,KAAK;QAAEC,UAAU,EAAE;MAAS,CAAE;MAAApC,QAAA,EACzD6C;IAAgB,CACb,CAAC,EAKNC,eAAe,iBACdlD,IAAA,CAACN,IAAI;MACHiC,KAAK,EAAE;QACL2B,QAAQ,EAAE,UAAU;QACpBC,IAAI,EAAE,CAAC;QACPC,KAAK,EAAE,CAAC;QACRC,GAAG,EAAE,CAAC;QACNC,MAAM,EAAE,CAAC;QACTlB,UAAU,EAAE,QAAQ;QACpBC,cAAc,EAAE,QAAQ;QACxBkB,MAAM,EAAE,CAAC,CAAC,CAAE;QACZ;MACF,CAAE;MACFC,aAAa,EAAC,UAAU;MAAAxD,QAAA,EAEvB8C;IAAe,CACZ,CACP,eAGDlD,IAAA,CAACN,IAAI;MAACiC,KAAK,EAAEwB,YAAa;MAAA/C,QAAA,EACvBiD;IAAgB,CACb,CAAC;EAAA,CACH,CAAC;AAEX","ignoreList":[]}
@@ -1,63 +1,75 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
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
- Helper function to recursively clone children and pass modes prop to components that accept it.
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 does not use any design token collections with multiple modes.
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
- <Canvas>
18
- <Story of={AppBarStories.Default} />
19
- </Canvas>
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
- <AccessibilitySection
23
- items={[
24
- 'Set `accessibilityLabel` and `accessibilityHint` on AppBar/AppBarHome to describe the screen or navigation target.',
25
- 'Give every IconButton in leading/actions slots a readable label; pair with `onLeadingPress` for back/home navigation instead of relying on gestures.',
26
- 'Keep middle slot content informational only—the wrapper is hidden from the accessibility tree to avoid duplicate announcements.',
27
- 'Hide decorative icons from assistive tech by setting `accessibilityElementsHidden`/`importantForAccessibility` on custom elements.',
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
- <AnatomySection>
32
- <ul>
33
- <li><strong>Leading</strong> — default back IconButton; replace with any element (receives merged `modes`).</li>
34
- <li><strong>Middle slot</strong> centered, non-interactive title/search content layered above the bar.</li>
35
- <li><strong>Actions slot</strong> — right-aligned IconButtons; defaults to search and overflow buttons.</li>
36
- <li><strong>AppBarHome</strong> leading IconButton + actions + Avatar arranged on the right.</li>
37
- </ul>
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
- <ArgsTable of={AppBar} />
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
- - **`appBarActions/actions/gap`**
57
- - **`appBarActions/padding/horizontal`**
58
- - **`appBarActions/padding/vertical`**
59
- - **`appBarHome/actions/gap`**
60
- - **`appBarHome/padding/horizontal`**
61
- - **`appBarHome/padding/vertical`**
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, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
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, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
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>
@@ -1,4 +1,4 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
2
  import * as BadgeStories from './Badge.stories';
3
3
  import Badge from './Badge';
4
4