jfs-components 0.0.3 → 0.0.5

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 (128) hide show
  1. package/lib/commonjs/Containers.js +16 -7
  2. package/lib/commonjs/Containers.js.map +1 -1
  3. package/lib/commonjs/components/Accordion/Accordion.js +217 -0
  4. package/lib/commonjs/components/Accordion/Accordion.js.map +1 -0
  5. package/lib/commonjs/components/Accordion/Accordion.mdx +123 -0
  6. package/lib/commonjs/components/ActionFooter/ActionFooter.mdx +1 -0
  7. package/lib/commonjs/components/ActionTile/ActionTile.js +93 -0
  8. package/lib/commonjs/components/ActionTile/ActionTile.js.map +1 -0
  9. package/lib/commonjs/components/ActionTile/ActionTile.mdx +54 -0
  10. package/lib/commonjs/components/ActionTile/index.js +14 -0
  11. package/lib/commonjs/components/ActionTile/index.js.map +1 -0
  12. package/lib/commonjs/components/CtaCard/CtaCard.js +122 -0
  13. package/lib/commonjs/components/CtaCard/CtaCard.js.map +1 -0
  14. package/lib/commonjs/components/CtaCard/CtaCard.mdx +65 -0
  15. package/lib/commonjs/components/CtaCard/index.js +14 -0
  16. package/lib/commonjs/components/CtaCard/index.js.map +1 -0
  17. package/lib/commonjs/components/Introduction.mdx +0 -1
  18. package/lib/commonjs/components/ThreadHero/ThreadHero.js +114 -0
  19. package/lib/commonjs/components/ThreadHero/ThreadHero.js.map +1 -0
  20. package/lib/commonjs/components/ThreadHero/ThreadHero.mdx +69 -0
  21. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +101 -0
  22. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js.map +1 -0
  23. package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +40 -0
  24. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +177 -0
  25. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js.map +1 -0
  26. package/lib/commonjs/components/TransactionDetails/TransactionDetails.mdx +98 -0
  27. package/lib/commonjs/components/TransactionStatus/TransactionStatus.js +82 -0
  28. package/lib/commonjs/components/TransactionStatus/TransactionStatus.js.map +1 -0
  29. package/lib/commonjs/components/TransactionStatus/TransactionStatus.mdx +41 -0
  30. package/lib/commonjs/components/index.js +35 -0
  31. package/lib/commonjs/components/index.js.map +1 -1
  32. package/lib/commonjs/design-tokens/JFSThemeProvider.js +64 -0
  33. package/lib/commonjs/design-tokens/JFSThemeProvider.js.map +1 -0
  34. package/lib/commonjs/design-tokens/figma-variables-resolver.js +3 -9
  35. package/lib/commonjs/design-tokens/index.js +11 -0
  36. package/lib/commonjs/design-tokens/index.js.map +1 -1
  37. package/lib/commonjs/icons/registry.js +1 -1
  38. package/lib/module/Containers.js +15 -7
  39. package/lib/module/Containers.js.map +1 -1
  40. package/lib/module/components/Accordion/Accordion.js +212 -0
  41. package/lib/module/components/Accordion/Accordion.js.map +1 -0
  42. package/lib/module/components/Accordion/Accordion.mdx +123 -0
  43. package/lib/module/components/ActionFooter/ActionFooter.mdx +1 -0
  44. package/lib/module/components/ActionTile/ActionTile.js +88 -0
  45. package/lib/module/components/ActionTile/ActionTile.js.map +1 -0
  46. package/lib/module/components/ActionTile/ActionTile.mdx +54 -0
  47. package/lib/module/components/ActionTile/index.js +4 -0
  48. package/lib/module/components/ActionTile/index.js.map +1 -0
  49. package/lib/module/components/CtaCard/CtaCard.js +117 -0
  50. package/lib/module/components/CtaCard/CtaCard.js.map +1 -0
  51. package/lib/module/components/CtaCard/CtaCard.mdx +65 -0
  52. package/lib/module/components/CtaCard/index.js +4 -0
  53. package/lib/module/components/CtaCard/index.js.map +1 -0
  54. package/lib/module/components/Introduction.mdx +0 -1
  55. package/lib/module/components/ThreadHero/ThreadHero.js +109 -0
  56. package/lib/module/components/ThreadHero/ThreadHero.js.map +1 -0
  57. package/lib/module/components/ThreadHero/ThreadHero.mdx +69 -0
  58. package/lib/module/components/TransactionBubble/TransactionBubble.js +96 -0
  59. package/lib/module/components/TransactionBubble/TransactionBubble.js.map +1 -0
  60. package/lib/module/components/TransactionBubble/TransactionBubble.mdx +40 -0
  61. package/lib/module/components/TransactionDetails/TransactionDetails.js +174 -0
  62. package/lib/module/components/TransactionDetails/TransactionDetails.js.map +1 -0
  63. package/lib/module/components/TransactionDetails/TransactionDetails.mdx +98 -0
  64. package/lib/module/components/TransactionStatus/TransactionStatus.js +77 -0
  65. package/lib/module/components/TransactionStatus/TransactionStatus.js.map +1 -0
  66. package/lib/module/components/TransactionStatus/TransactionStatus.mdx +41 -0
  67. package/lib/module/components/index.js +5 -0
  68. package/lib/module/components/index.js.map +1 -1
  69. package/lib/module/design-tokens/JFSThemeProvider.js +57 -0
  70. package/lib/module/design-tokens/JFSThemeProvider.js.map +1 -0
  71. package/lib/module/design-tokens/index.js +1 -0
  72. package/lib/module/design-tokens/index.js.map +1 -1
  73. package/lib/module/icons/registry.js +1 -1
  74. package/lib/typescript/Containers.d.ts +2 -1
  75. package/lib/typescript/Containers.d.ts.map +1 -1
  76. package/lib/typescript/components/Accordion/Accordion.d.ts +58 -0
  77. package/lib/typescript/components/Accordion/Accordion.d.ts.map +1 -0
  78. package/lib/typescript/components/ActionTile/ActionTile.d.ts +26 -0
  79. package/lib/typescript/components/ActionTile/ActionTile.d.ts.map +1 -0
  80. package/lib/typescript/components/ActionTile/index.d.ts +2 -0
  81. package/lib/typescript/components/ActionTile/index.d.ts.map +1 -0
  82. package/lib/typescript/components/CtaCard/CtaCard.d.ts +61 -0
  83. package/lib/typescript/components/CtaCard/CtaCard.d.ts.map +1 -0
  84. package/lib/typescript/components/CtaCard/index.d.ts +2 -0
  85. package/lib/typescript/components/CtaCard/index.d.ts.map +1 -0
  86. package/lib/typescript/components/ThreadHero/ThreadHero.d.ts +21 -0
  87. package/lib/typescript/components/ThreadHero/ThreadHero.d.ts.map +1 -0
  88. package/lib/typescript/components/TransactionBubble/TransactionBubble.d.ts +24 -0
  89. package/lib/typescript/components/TransactionBubble/TransactionBubble.d.ts.map +1 -0
  90. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts +57 -0
  91. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts.map +1 -0
  92. package/lib/typescript/components/TransactionStatus/TransactionStatus.d.ts +16 -0
  93. package/lib/typescript/components/TransactionStatus/TransactionStatus.d.ts.map +1 -0
  94. package/lib/typescript/components/index.d.ts +5 -0
  95. package/lib/typescript/components/index.d.ts.map +1 -1
  96. package/lib/typescript/design-tokens/JFSThemeProvider.d.ts +44 -0
  97. package/lib/typescript/design-tokens/JFSThemeProvider.d.ts.map +1 -0
  98. package/lib/typescript/design-tokens/index.d.ts +1 -0
  99. package/lib/typescript/design-tokens/index.d.ts.map +1 -1
  100. package/lib/typescript/icons/registry.d.ts +1 -1
  101. package/package.json +3 -4
  102. package/src/Containers.tsx +15 -0
  103. package/src/components/.token-metadata.json +161 -0
  104. package/src/components/Accordion/Accordion.mdx +123 -0
  105. package/src/components/Accordion/Accordion.tsx +279 -0
  106. package/src/components/ActionFooter/ActionFooter.mdx +1 -0
  107. package/src/components/ActionTile/ActionTile.mdx +54 -0
  108. package/src/components/ActionTile/ActionTile.tsx +100 -0
  109. package/src/components/ActionTile/index.ts +1 -0
  110. package/src/components/CtaCard/CtaCard.mdx +65 -0
  111. package/src/components/CtaCard/CtaCard.tsx +185 -0
  112. package/src/components/CtaCard/index.ts +1 -0
  113. package/src/components/Divider/Divider.tsx +1 -0
  114. package/src/components/Introduction.mdx +0 -1
  115. package/src/components/NavArrow/NavArrow.tsx +1 -0
  116. package/src/components/ThreadHero/ThreadHero.mdx +69 -0
  117. package/src/components/ThreadHero/ThreadHero.tsx +124 -0
  118. package/src/components/TransactionBubble/TransactionBubble.mdx +40 -0
  119. package/src/components/TransactionBubble/TransactionBubble.tsx +113 -0
  120. package/src/components/TransactionDetails/TransactionDetails.mdx +98 -0
  121. package/src/components/TransactionDetails/TransactionDetails.tsx +236 -0
  122. package/src/components/TransactionStatus/TransactionStatus.mdx +41 -0
  123. package/src/components/TransactionStatus/TransactionStatus.tsx +94 -0
  124. package/src/components/index.ts +5 -0
  125. package/src/design-tokens/JFSThemeProvider.tsx +79 -0
  126. package/src/design-tokens/index.ts +1 -0
  127. package/src/icons/registry.ts +1 -1
  128. package/src/Containers.ts +0 -8
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
11
+ var _Button = _interopRequireDefault(require("../Button/Button"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /**
15
+ * CtaCard component that maps directly to the Figma design using design tokens.
16
+ *
17
+ * @component
18
+ */
19
+ function CtaCard({
20
+ title = "Lets create your UPI ID",
21
+ body = "Send and receive money securely.",
22
+ iconName = "ic_upi_number",
23
+ buttonLabel = "Get started",
24
+ onPressButton,
25
+ modes = {},
26
+ iconSlot,
27
+ titleSlot,
28
+ bodySlot,
29
+ buttonSlot,
30
+ style
31
+ }) {
32
+ // --- Token Resolution ---
33
+ // Container
34
+ const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/background', modes) || '#0078ad';
35
+ const radius = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/radius', modes) || 16;
36
+ const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/padding/horizontal', modes) || 20;
37
+ const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/padding/vertical', modes) || 23;
38
+ const gap = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/gap', modes) || 16;
39
+
40
+ // Content Wrap
41
+ const contentGap = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/content/gap', modes) || 8;
42
+
43
+ // Title Text
44
+ const titleColor = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/title/color', modes) || '#ffffff';
45
+ const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/title/fontFamily', modes) || 'JioType Var';
46
+ const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/title/fontSize', modes) || 23;
47
+ const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/title/lineHeight', modes) || 23;
48
+
49
+ // Body Text
50
+ const bodyColor = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/body/color', modes) || '#ffffff';
51
+ const bodyFontFamily = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/body/fontFamily', modes) || 'JioType Var';
52
+ const bodyFontSize = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/body/fontSize', modes) || 14;
53
+ const bodyLineHeight = (0, _figmaVariablesResolver.getVariableByName)('ctaCard/body/lineHeight', modes) || 17;
54
+
55
+ // --- Styles ---
56
+ const containerStyle = {
57
+ backgroundColor,
58
+ borderRadius: radius,
59
+ paddingHorizontal,
60
+ paddingVertical,
61
+ gap,
62
+ alignItems: 'flex-start',
63
+ width: '100%',
64
+ // Adjust based on layout needs, usually cards take full width available
65
+ overflow: 'hidden'
66
+ };
67
+ const contentWrapStyle = {
68
+ gap: contentGap,
69
+ alignItems: 'flex-start',
70
+ width: '100%'
71
+ };
72
+ const titleStyle = {
73
+ color: titleColor,
74
+ fontFamily: titleFontFamily,
75
+ fontSize: titleFontSize,
76
+ lineHeight: titleLineHeight,
77
+ fontWeight: '900' // "Black" in Figma often maps to 900
78
+ };
79
+ const bodyStyle = {
80
+ color: bodyColor,
81
+ fontFamily: bodyFontFamily,
82
+ fontSize: bodyFontSize,
83
+ lineHeight: bodyLineHeight,
84
+ fontWeight: '400' // Regular
85
+ };
86
+
87
+ // --- Slot Helper ---
88
+ // Helper to clone element with modes if no modes are already present on it (standard in this library)
89
+ const renderSlot = slot => {
90
+ if (/*#__PURE__*/_react.default.isValidElement(slot)) {
91
+ return /*#__PURE__*/_react.default.cloneElement(slot, {
92
+ modes: {
93
+ ...modes,
94
+ ...slot.props.modes
95
+ }
96
+ });
97
+ }
98
+ return slot;
99
+ };
100
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
101
+ style: [containerStyle, style],
102
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
103
+ style: contentWrapStyle,
104
+ children: [iconSlot ? renderSlot(iconSlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
105
+ iconName: iconName,
106
+ modes: modes
107
+ }), titleSlot ? renderSlot(titleSlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
108
+ style: titleStyle,
109
+ children: title
110
+ }), bodySlot ? renderSlot(bodySlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
111
+ style: bodyStyle,
112
+ children: body
113
+ })]
114
+ }), buttonSlot ? renderSlot(buttonSlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
115
+ label: buttonLabel,
116
+ onPress: onPressButton,
117
+ modes: modes
118
+ })]
119
+ });
120
+ }
121
+ var _default = exports.default = CtaCard;
122
+ //# sourceMappingURL=CtaCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_IconCapsule","_Button","_jsxRuntime","e","__esModule","default","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","iconSlot","titleSlot","bodySlot","buttonSlot","style","backgroundColor","getVariableByName","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","renderSlot","slot","React","isValidElement","cloneElement","props","jsxs","View","children","jsx","Text","label","onPress","_default","exports"],"sourceRoot":"../../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,UAAU,GACP8B,UAAU,CAAC9B,UAAU,CAAC,gBAEtB,IAAAd,WAAA,CAAAqD,GAAA,EAACtD,OAAA,CAAAI,OAAM;MACHoD,KAAK,EAAE/C,WAAY;MACnBgD,OAAO,EAAE/C,aAAc;MACvBC,KAAK,EAAEA;IAAM,CAChB,CACJ;EAAA,CACC,CAAC;AAEf;AAAC,IAAA+C,QAAA,GAAAC,OAAA,CAAAvD,OAAA,GAEcC,OAAO","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
2
+ import * as CtaCardStories from './CtaCard.stories';
3
+ import CtaCard from './CtaCard';
4
+
5
+ <Meta of={CtaCardStories} />
6
+
7
+ # CtaCard
8
+
9
+ `CtaCard` is a component used to display a Call-to-Action with an icon, title, body text, and a button.
10
+ It is designed to be flexible, allowing content to be passed via props or fully customized via slots.
11
+
12
+
13
+ ## Available Collections and Modes
14
+
15
+ This component does not use any design token collections with multiple modes.
16
+ ## Usage
17
+
18
+ ```tsx
19
+ import { CtaCard } from 'jfs-components'; // Adjust import based on your package structure
20
+
21
+ // Basic Usage
22
+ <CtaCard
23
+ title="Lets create your UPI ID"
24
+ body="Send and receive money securely."
25
+ iconName="ic_upi_number"
26
+ buttonLabel="Get started"
27
+ onPressButton={() => console.log('Pressed')}
28
+ />
29
+
30
+ // Using Slots
31
+ <CtaCard
32
+ titleSlot={<CustomTitle />}
33
+ buttonSlot={<CustomButton />}
34
+ />
35
+ ```
36
+
37
+ <Canvas>
38
+ <Story of={CtaCardStories.Default} />
39
+ </Canvas>
40
+
41
+ ## Props
42
+
43
+ <ArgsTable of={CtaCard} />
44
+
45
+
46
+ ## Design Tokens
47
+
48
+ This component uses the following design tokens, resolved through `getVariableByName`:
49
+
50
+ - **`ctaCard/background`**
51
+ - **`ctaCard/body/color`**
52
+ - **`ctaCard/body/fontFamily`**
53
+ - **`ctaCard/body/fontSize`**
54
+ - **`ctaCard/body/lineHeight`**
55
+ - **`ctaCard/content/gap`**
56
+ - **`ctaCard/gap`**
57
+ - **`ctaCard/padding/horizontal`**
58
+ - **`ctaCard/padding/vertical`**
59
+ - **`ctaCard/radius`**
60
+ - **`ctaCard/title/color`**
61
+ - **`ctaCard/title/fontFamily`**
62
+ - **`ctaCard/title/fontSize`**
63
+ - **`ctaCard/title/lineHeight`**
64
+
65
+ All tokens support mode-based theming through the `modes` prop.
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _CtaCard.default;
10
+ }
11
+ });
12
+ var _CtaCard = _interopRequireDefault(require("./CtaCard"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CtaCard","_interopRequireDefault","require","e","__esModule","default"],"sourceRoot":"../../../../src","sources":["components/CtaCard/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -95,7 +95,6 @@ When creating new components:
95
95
 
96
96
  - [Storybook Documentation](https://storybook.js.org/)
97
97
  - [React Native Storybook](https://github.com/storybookjs/react-native)
98
- - [Styled Components](https://styled-components.com/)
99
98
 
100
99
  ---
101
100
 
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = ThreadHero;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ /**
13
+ * ThreadHero component displaying a central identity with avatar, title, subtitle, and caption.
14
+ */
15
+ function ThreadHero({
16
+ title = 'Subhash Rajan',
17
+ subtitle = 'Banking name: SHIVASHANKAR RAJAN',
18
+ caption,
19
+ renderAvatar,
20
+ modes = {},
21
+ style
22
+ }) {
23
+ // Container Gaps
24
+ const containerGap = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/gap', modes)) || 8;
25
+ const detailsGap = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/details/gap', modes)) || 2;
26
+
27
+ // Title Styles
28
+ const titleColor = (0, _figmaVariablesResolver.getVariableByName)('threadHero/title/color', modes) || '#191b1e';
29
+ const titleFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/title/fontSize', modes)) || 16;
30
+ const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('threadHero/title/fontFamily', modes) || 'System';
31
+ const titleLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/title/lineHeight', modes)) || 20;
32
+ const titleFontWeight = (0, _figmaVariablesResolver.getVariableByName)('threadHero/title/fontWeight', modes) || '600';
33
+
34
+ // Subtitle Styles
35
+ const subtitleColor = (0, _figmaVariablesResolver.getVariableByName)('threadHero/subtitle/color', modes) || '#5d5d61';
36
+ const subtitleFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/subtitle/fontSize', modes)) || 12;
37
+ const subtitleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('threadHero/subtitle/fontFamily', modes) || 'System';
38
+ const subtitleLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/subtitle/lineHeight', modes)) || 18;
39
+ const subtitleFontWeight = (0, _figmaVariablesResolver.getVariableByName)('threadHero/subtitle/fontWeight', modes) || '500';
40
+
41
+ // Caption Styles
42
+ const captionColor = (0, _figmaVariablesResolver.getVariableByName)('threadHero/caption/color', modes) || '#5d5d61';
43
+ const captionFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/caption/fontSize', modes)) || 12;
44
+ const captionFontFamily = (0, _figmaVariablesResolver.getVariableByName)('threadHero/caption/fontFamily', modes) || 'System';
45
+ const captionLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('threadHero/caption/lineHeight', modes)) || 18;
46
+ const captionFontWeight = (0, _figmaVariablesResolver.getVariableByName)('threadHero/caption/fontWeight', modes) || '500';
47
+
48
+ // Styles
49
+ const containerStyle = {
50
+ flexDirection: 'column',
51
+ alignItems: 'center',
52
+ gap: containerGap,
53
+ ...style
54
+ };
55
+ const detailsStyle = {
56
+ flexDirection: 'column',
57
+ alignItems: 'center',
58
+ gap: detailsGap,
59
+ width: '100%'
60
+ };
61
+ const titleStyle = {
62
+ color: titleColor,
63
+ fontSize: titleFontSize,
64
+ fontFamily: titleFontFamily,
65
+ lineHeight: titleLineHeight,
66
+ fontWeight: titleFontWeight,
67
+ textAlign: 'center',
68
+ minWidth: '100%'
69
+ };
70
+ const subtitleStyle = {
71
+ color: subtitleColor,
72
+ fontSize: subtitleFontSize,
73
+ fontFamily: subtitleFontFamily,
74
+ lineHeight: subtitleLineHeight,
75
+ fontWeight: subtitleFontWeight,
76
+ textAlign: 'center',
77
+ minWidth: '100%'
78
+ };
79
+ const captionStyle = {
80
+ color: captionColor,
81
+ fontSize: captionFontSize,
82
+ fontFamily: captionFontFamily,
83
+ lineHeight: captionLineHeight,
84
+ fontWeight: captionFontWeight,
85
+ textAlign: 'center',
86
+ width: '100%'
87
+ };
88
+
89
+ // Process Avatar Slot to inject modes
90
+ const avatarContent = /*#__PURE__*/(0, _react.isValidElement)(renderAvatar) ? /*#__PURE__*/(0, _react.cloneElement)(renderAvatar, {
91
+ modes
92
+ }) : renderAvatar;
93
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
94
+ style: containerStyle,
95
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
96
+ style: detailsStyle,
97
+ children: [avatarContent, title ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
98
+ style: titleStyle,
99
+ children: title
100
+ }) : null, subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
101
+ style: subtitleStyle,
102
+ numberOfLines: 1,
103
+ ellipsizeMode: "tail",
104
+ children: subtitle
105
+ }) : null]
106
+ }), caption ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
107
+ style: captionStyle,
108
+ numberOfLines: 1,
109
+ ellipsizeMode: "tail",
110
+ children: caption
111
+ }) : null]
112
+ });
113
+ }
114
+ //# sourceMappingURL=ThreadHero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_figmaVariablesResolver","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ThreadHero","title","subtitle","caption","renderAvatar","modes","style","containerGap","Number","getVariableByName","detailsGap","titleColor","titleFontSize","titleFontFamily","titleLineHeight","titleFontWeight","subtitleColor","subtitleFontSize","subtitleFontFamily","subtitleLineHeight","subtitleFontWeight","captionColor","captionFontSize","captionFontFamily","captionLineHeight","captionFontWeight","containerStyle","flexDirection","alignItems","gap","detailsStyle","width","titleStyle","color","fontSize","fontFamily","lineHeight","fontWeight","textAlign","minWidth","subtitleStyle","captionStyle","avatarContent","isValidElement","cloneElement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C,YAAa;MAACS,aAAa,EAAE,CAAE;MAACC,aAAa,EAAC,MAAM;MAAAJ,QAAA,EAC5D5C;IAAO,CACN,CAAC,GACP,IAAI;EAAA,CACN,CAAC;AAEf","ignoreList":[]}
@@ -0,0 +1,69 @@
1
+ import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
2
+ import * as ThreadHeroStories from './ThreadHero.stories';
3
+ import ThreadHero from './ThreadHero';
4
+
5
+ <Meta of={ThreadHeroStories} />
6
+
7
+ # ThreadHero
8
+
9
+ The `ThreadHero` component displays a central user identity with an avatar, title, subtitle, and an optional caption.
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 ThreadHero from './ThreadHero';
19
+ import Avatar from '../Avatar/Avatar';
20
+
21
+ <ThreadHero
22
+ title="Subhash Rajan"
23
+ subtitle="Banking name: SHIVASHANKAR RAJAN"
24
+ caption="+91 00000 00000"
25
+ renderAvatar={<Avatar size="small" initials="SR" />}
26
+ />
27
+ ```
28
+
29
+ ## Props
30
+
31
+ <ArgsTable of={ThreadHero} />
32
+
33
+ ## Stories
34
+
35
+ ### Default
36
+
37
+ <Canvas>
38
+ <Story of={ThreadHeroStories.Default} />
39
+ </Canvas>
40
+
41
+ ### Without Caption
42
+
43
+ <Canvas>
44
+ <Story of={ThreadHeroStories.WithoutCaption} />
45
+ </Canvas>
46
+
47
+ ## Design Tokens
48
+
49
+ This component uses the following design tokens, resolved through `getVariableByName`:
50
+
51
+ - **`threadHero/caption/color`**
52
+ - **`threadHero/caption/fontFamily`**
53
+ - **`threadHero/caption/fontSize`**
54
+ - **`threadHero/caption/fontWeight`**
55
+ - **`threadHero/caption/lineHeight`**
56
+ - **`threadHero/details/gap`**
57
+ - **`threadHero/gap`**
58
+ - **`threadHero/subtitle/color`**
59
+ - **`threadHero/subtitle/fontFamily`**
60
+ - **`threadHero/subtitle/fontSize`**
61
+ - **`threadHero/subtitle/fontWeight`**
62
+ - **`threadHero/subtitle/lineHeight`**
63
+ - **`threadHero/title/color`**
64
+ - **`threadHero/title/fontFamily`**
65
+ - **`threadHero/title/fontSize`**
66
+ - **`threadHero/title/fontWeight`**
67
+ - **`threadHero/title/lineHeight`**
68
+
69
+ All tokens support mode-based theming through the `modes` prop.
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = TransactionBubble;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _MoneyValue = _interopRequireDefault(require("../MoneyValue/MoneyValue"));
11
+ var _NavArrow = _interopRequireDefault(require("../NavArrow/NavArrow"));
12
+ var _TransactionStatus = _interopRequireDefault(require("../TransactionStatus/TransactionStatus"));
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ /**
16
+ * TransactionBubble component displaying transaction details in a bubble card.
17
+ *
18
+ * @component
19
+ */
20
+ function TransactionBubble({
21
+ description = 'Payment to Uber India',
22
+ amount = '56',
23
+ currency = '₹',
24
+ status = 'Expired',
25
+ statusDate = '20 Mar 2025',
26
+ modes = {},
27
+ style
28
+ }) {
29
+ // --- Container Tokens ---
30
+ const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('transactionBubble/background', modes) || '#ffffff';
31
+ const borderColor = (0, _figmaVariablesResolver.getVariableByName)('transactionBubble/border/color', modes) || '#e5e5e5';
32
+ const borderWidth = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/border/size', modes)) || 1;
33
+ const borderRadius = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/radius', modes)) || 23;
34
+ const padding = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/padding', modes)) || 16;
35
+ const gap = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/gap', modes)) || 8;
36
+
37
+ // --- Description Tokens ---
38
+ const descColor = (0, _figmaVariablesResolver.getVariableByName)('transactionBubble/description/color', modes) || '#24262b';
39
+ const descFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/description/fontSize', modes)) || 14;
40
+ const descLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/description/lineHeight', modes)) || 17;
41
+ const descFontFamily = (0, _figmaVariablesResolver.getVariableByName)('transactionBubble/description/fontFamily', modes) || 'System';
42
+
43
+ // --- Status Row Tokens ---
44
+ // Status wrapping gap from TransactionBubble definition for the row container
45
+ const statusHeight = Number((0, _figmaVariablesResolver.getVariableByName)('transactionBubble/statusWrap/height', modes)) || 18;
46
+ const containerStyle = {
47
+ backgroundColor,
48
+ borderColor,
49
+ borderWidth,
50
+ borderRadius,
51
+ padding,
52
+ gap,
53
+ alignItems: 'flex-start',
54
+ width: 231,
55
+ // Fixed width from design or prop? Design shows w-[231px]. We can make it auto or fixed. Let's respect style prop.
56
+ ...style
57
+ };
58
+ const descriptionStyle = {
59
+ color: descColor,
60
+ fontSize: descFontSize,
61
+ lineHeight: descLineHeight,
62
+ fontFamily: descFontFamily,
63
+ fontWeight: '500' // Hardcoded in design as 'Medium' -> 500
64
+ };
65
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
66
+ style: containerStyle,
67
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
68
+ style: {
69
+ gap: 8,
70
+ width: '100%'
71
+ },
72
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
73
+ style: descriptionStyle,
74
+ numberOfLines: 1,
75
+ ellipsizeMode: "tail",
76
+ children: description
77
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MoneyValue.default, {
78
+ value: amount,
79
+ currency: currency,
80
+ modes: modes
81
+ })]
82
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
83
+ style: {
84
+ flexDirection: 'row',
85
+ alignItems: 'center',
86
+ justifyContent: 'space-between',
87
+ width: '100%',
88
+ height: statusHeight // Enforce height from design
89
+ },
90
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TransactionStatus.default, {
91
+ status: status,
92
+ date: statusDate,
93
+ modes: modes
94
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavArrow.default, {
95
+ direction: "Forward",
96
+ modes: modes
97
+ })]
98
+ })]
99
+ });
100
+ }
101
+ //# sourceMappingURL=TransactionBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_MoneyValue","_NavArrow","_TransactionStatus","_jsxRuntime","e","__esModule","default","TransactionBubble","description","amount","currency","status","statusDate","modes","style","backgroundColor","getVariableByName","borderColor","borderWidth","Number","borderRadius","padding","gap","descColor","descFontSize","descLineHeight","descFontFamily","statusHeight","containerStyle","alignItems","width","descriptionStyle","color","fontSize","lineHeight","fontFamily","fontWeight","jsxs","View","children","jsx","Text","numberOfLines","ellipsizeMode","value","flexDirection","justifyContent","height","date","direction"],"sourceRoot":"../../../../src","sources":["components/TransactionBubble/TransactionBubble.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,kBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAsE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmBtE;AACA;AACA;AACA;AACA;AACe,SAASG,iBAAiBA,CAAC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QACbiB,MAAM,EAAEpB,YAAY,CAAE;MAC1B,CAAE;MAAAY,QAAA,gBACE,IAAApC,WAAA,CAAAqC,GAAA,EAACtC,kBAAA,CAAAI,OAAiB;QACdK,MAAM,EAAEA,MAAO;QACfqC,IAAI,EAAEpC,UAAW;QACjBC,KAAK,EAAEA;MAAM,CAChB,CAAC,eAEF,IAAAV,WAAA,CAAAqC,GAAA,EAACvC,SAAA,CAAAK,OAAQ;QACL2C,SAAS,EAAC,SAAS;QACnBpC,KAAK,EAAEA;MAAM,CAChB,CAAC;IAAA,CACA,CAAC;EAAA,CACL,CAAC;AAEf","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
2
+ import * as TransactionBubbleStories from './TransactionBubble.stories';
3
+ import TransactionBubble from './TransactionBubble';
4
+
5
+ <Meta of={TransactionBubbleStories} />
6
+
7
+ # TransactionBubble
8
+
9
+ TransactionBubble component with design-token-driven styling.
10
+
11
+ ## Available Collections and Modes
12
+
13
+ This component does not use any design token collections with multiple modes.
14
+ ## Usage
15
+
16
+ <Canvas>
17
+ <Story of={TransactionBubbleStories.Default} />
18
+ </Canvas>
19
+
20
+ ## Props
21
+
22
+ <ArgsTable of={TransactionBubble} />
23
+
24
+ ## Design Tokens
25
+
26
+ This component uses the following design tokens, resolved through `getVariableByName`:
27
+
28
+ - **`transactionBubble/background`**
29
+ - **`transactionBubble/border/color`**
30
+ - **`transactionBubble/border/size`**
31
+ - **`transactionBubble/description/color`**
32
+ - **`transactionBubble/description/fontFamily`**
33
+ - **`transactionBubble/description/fontSize`**
34
+ - **`transactionBubble/description/lineHeight`**
35
+ - **`transactionBubble/gap`**
36
+ - **`transactionBubble/padding`**
37
+ - **`transactionBubble/radius`**
38
+ - **`transactionBubble/statusWrap/height`**
39
+
40
+ All tokens support mode-based theming through the `modes` prop.