jfs-components 0.0.3 → 0.0.4

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 (100) hide show
  1. package/lib/commonjs/components/Accordion/Accordion.js +217 -0
  2. package/lib/commonjs/components/Accordion/Accordion.js.map +1 -0
  3. package/lib/commonjs/components/Accordion/Accordion.mdx +122 -0
  4. package/lib/commonjs/components/ActionTile/ActionTile.js +93 -0
  5. package/lib/commonjs/components/ActionTile/ActionTile.js.map +1 -0
  6. package/lib/commonjs/components/ActionTile/ActionTile.mdx +54 -0
  7. package/lib/commonjs/components/ActionTile/index.js +14 -0
  8. package/lib/commonjs/components/ActionTile/index.js.map +1 -0
  9. package/lib/commonjs/components/CtaCard/CtaCard.js +122 -0
  10. package/lib/commonjs/components/CtaCard/CtaCard.js.map +1 -0
  11. package/lib/commonjs/components/CtaCard/CtaCard.mdx +66 -0
  12. package/lib/commonjs/components/CtaCard/index.js +14 -0
  13. package/lib/commonjs/components/CtaCard/index.js.map +1 -0
  14. package/lib/commonjs/components/ThreadHero/ThreadHero.js +114 -0
  15. package/lib/commonjs/components/ThreadHero/ThreadHero.js.map +1 -0
  16. package/lib/commonjs/components/ThreadHero/ThreadHero.mdx +69 -0
  17. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +101 -0
  18. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js.map +1 -0
  19. package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +40 -0
  20. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +177 -0
  21. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js.map +1 -0
  22. package/lib/commonjs/components/TransactionDetails/TransactionDetails.mdx +98 -0
  23. package/lib/commonjs/components/TransactionStatus/TransactionStatus.js +82 -0
  24. package/lib/commonjs/components/TransactionStatus/TransactionStatus.js.map +1 -0
  25. package/lib/commonjs/components/TransactionStatus/TransactionStatus.mdx +41 -0
  26. package/lib/commonjs/components/index.js +35 -0
  27. package/lib/commonjs/components/index.js.map +1 -1
  28. package/lib/commonjs/design-tokens/figma-variables-resolver.js +3 -9
  29. package/lib/commonjs/icons/registry.js +1 -1
  30. package/lib/module/components/Accordion/Accordion.js +212 -0
  31. package/lib/module/components/Accordion/Accordion.js.map +1 -0
  32. package/lib/module/components/Accordion/Accordion.mdx +122 -0
  33. package/lib/module/components/ActionTile/ActionTile.js +88 -0
  34. package/lib/module/components/ActionTile/ActionTile.js.map +1 -0
  35. package/lib/module/components/ActionTile/ActionTile.mdx +54 -0
  36. package/lib/module/components/ActionTile/index.js +4 -0
  37. package/lib/module/components/ActionTile/index.js.map +1 -0
  38. package/lib/module/components/CtaCard/CtaCard.js +117 -0
  39. package/lib/module/components/CtaCard/CtaCard.js.map +1 -0
  40. package/lib/module/components/CtaCard/CtaCard.mdx +66 -0
  41. package/lib/module/components/CtaCard/index.js +4 -0
  42. package/lib/module/components/CtaCard/index.js.map +1 -0
  43. package/lib/module/components/ThreadHero/ThreadHero.js +109 -0
  44. package/lib/module/components/ThreadHero/ThreadHero.js.map +1 -0
  45. package/lib/module/components/ThreadHero/ThreadHero.mdx +69 -0
  46. package/lib/module/components/TransactionBubble/TransactionBubble.js +96 -0
  47. package/lib/module/components/TransactionBubble/TransactionBubble.js.map +1 -0
  48. package/lib/module/components/TransactionBubble/TransactionBubble.mdx +40 -0
  49. package/lib/module/components/TransactionDetails/TransactionDetails.js +174 -0
  50. package/lib/module/components/TransactionDetails/TransactionDetails.js.map +1 -0
  51. package/lib/module/components/TransactionDetails/TransactionDetails.mdx +98 -0
  52. package/lib/module/components/TransactionStatus/TransactionStatus.js +77 -0
  53. package/lib/module/components/TransactionStatus/TransactionStatus.js.map +1 -0
  54. package/lib/module/components/TransactionStatus/TransactionStatus.mdx +41 -0
  55. package/lib/module/components/index.js +5 -0
  56. package/lib/module/components/index.js.map +1 -1
  57. package/lib/module/design-tokens/figma-variables-resolver.js +2 -2
  58. package/lib/module/design-tokens/figma-variables-resolver.js.map +2 -1
  59. package/lib/module/icons/registry.js +1 -1
  60. package/lib/typescript/components/Accordion/Accordion.d.ts +58 -0
  61. package/lib/typescript/components/Accordion/Accordion.d.ts.map +1 -0
  62. package/lib/typescript/components/ActionTile/ActionTile.d.ts +26 -0
  63. package/lib/typescript/components/ActionTile/ActionTile.d.ts.map +1 -0
  64. package/lib/typescript/components/ActionTile/index.d.ts +2 -0
  65. package/lib/typescript/components/ActionTile/index.d.ts.map +1 -0
  66. package/lib/typescript/components/CtaCard/CtaCard.d.ts +61 -0
  67. package/lib/typescript/components/CtaCard/CtaCard.d.ts.map +1 -0
  68. package/lib/typescript/components/CtaCard/index.d.ts +2 -0
  69. package/lib/typescript/components/CtaCard/index.d.ts.map +1 -0
  70. package/lib/typescript/components/ThreadHero/ThreadHero.d.ts +21 -0
  71. package/lib/typescript/components/ThreadHero/ThreadHero.d.ts.map +1 -0
  72. package/lib/typescript/components/TransactionBubble/TransactionBubble.d.ts +24 -0
  73. package/lib/typescript/components/TransactionBubble/TransactionBubble.d.ts.map +1 -0
  74. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts +57 -0
  75. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts.map +1 -0
  76. package/lib/typescript/components/TransactionStatus/TransactionStatus.d.ts +16 -0
  77. package/lib/typescript/components/TransactionStatus/TransactionStatus.d.ts.map +1 -0
  78. package/lib/typescript/components/index.d.ts +5 -0
  79. package/lib/typescript/components/index.d.ts.map +1 -1
  80. package/lib/typescript/icons/registry.d.ts +1 -1
  81. package/package.json +5 -2
  82. package/src/components/.token-metadata.json +161 -0
  83. package/src/components/Accordion/Accordion.mdx +122 -0
  84. package/src/components/Accordion/Accordion.tsx +279 -0
  85. package/src/components/ActionTile/ActionTile.mdx +54 -0
  86. package/src/components/ActionTile/ActionTile.tsx +100 -0
  87. package/src/components/ActionTile/index.ts +1 -0
  88. package/src/components/CtaCard/CtaCard.mdx +66 -0
  89. package/src/components/CtaCard/CtaCard.tsx +185 -0
  90. package/src/components/CtaCard/index.ts +1 -0
  91. package/src/components/ThreadHero/ThreadHero.mdx +69 -0
  92. package/src/components/ThreadHero/ThreadHero.tsx +124 -0
  93. package/src/components/TransactionBubble/TransactionBubble.mdx +40 -0
  94. package/src/components/TransactionBubble/TransactionBubble.tsx +113 -0
  95. package/src/components/TransactionDetails/TransactionDetails.mdx +98 -0
  96. package/src/components/TransactionDetails/TransactionDetails.tsx +236 -0
  97. package/src/components/TransactionStatus/TransactionStatus.mdx +41 -0
  98. package/src/components/TransactionStatus/TransactionStatus.tsx +94 -0
  99. package/src/components/index.ts +5 -0
  100. package/src/icons/registry.ts +1 -1
@@ -0,0 +1,66 @@
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.
66
+
@@ -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":[]}
@@ -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","jsxs","View","children","jsx","Text","numberOfLines","ellipsizeMode"],"sourceRoot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,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;EACtCC,WAAW,GAAG,uBAAuB;EACrCC,MAAM,GAAG,I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AAY,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.
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * Helper function to recursively clone children and pass modes prop to components that accept it.
14
+ */function cloneChildrenWithModes(children, modes) {
15
+ const result = _react.default.Children.map(children, child => {
16
+ if (! /*#__PURE__*/_react.default.isValidElement(child)) {
17
+ return child;
18
+ }
19
+ const childChildren = child.props?.children;
20
+ const hasChildren = childChildren !== undefined && childChildren !== null;
21
+ const existingModes = child.props?.modes;
22
+ const mergedModes = existingModes ? {
23
+ ...modes,
24
+ ...existingModes
25
+ } : modes;
26
+ const processedChildren = hasChildren ? cloneChildrenWithModes(_react.default.Children.toArray(childChildren), modes) : undefined;
27
+ return /*#__PURE__*/_react.default.cloneElement(child, {
28
+ ...child.props,
29
+ modes: mergedModes
30
+ }, processedChildren);
31
+ });
32
+ return result || [];
33
+ }
34
+
35
+ // ===== Item Subcomponent =====
36
+
37
+ /**
38
+ * Item component that displays a label-value pair, used within TransactionDetails.
39
+ * Access via `TransactionDetails.Item`.
40
+ *
41
+ * @component
42
+ * @param {Object} props
43
+ * @param {string} [props.label='Label'] - The label text displayed above the value.
44
+ * @param {string} [props.value='Value'] - The value text displayed below the label.
45
+ * @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for design tokens.
46
+ * @param {Object} [props.style] - Optional container style overrides.
47
+ * @param {Object} [props.labelStyle] - Optional label text style overrides.
48
+ * @param {Object} [props.valueStyle] - Optional value text style overrides.
49
+ * @param {string} [props.accessibilityLabel] - Accessibility label for screen readers.
50
+ */
51
+ function Item({
52
+ label = 'Label',
53
+ value = 'Value',
54
+ modes = {},
55
+ style,
56
+ labelStyle,
57
+ valueStyle,
58
+ accessibilityLabel,
59
+ ...rest
60
+ }) {
61
+ // Resolve design tokens for Item
62
+ const gap = (0, _figmaVariablesResolver.getVariableByName)('detailItem/gap', modes) ?? 4;
63
+
64
+ // Label typography tokens
65
+ const labelColor = (0, _figmaVariablesResolver.getVariableByName)('detailItem/label/color', modes) || '#0c0d10';
66
+ const labelFontSize = (0, _figmaVariablesResolver.getVariableByName)('detailItem/label/fontSize', modes) || 14;
67
+ const labelFontFamily = (0, _figmaVariablesResolver.getVariableByName)('detailItem/label/fontFamily', modes) || 'System';
68
+ const labelLineHeight = (0, _figmaVariablesResolver.getVariableByName)('detailItem/label/lineHeight', modes) || 17;
69
+ const labelFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('detailItem/label/fontWeight', modes) || 500;
70
+ const labelFontWeight = typeof labelFontWeightRaw === 'number' ? labelFontWeightRaw.toString() : labelFontWeightRaw;
71
+
72
+ // Value typography tokens
73
+ const valueColor = (0, _figmaVariablesResolver.getVariableByName)('detailItem/value/color', modes) || '#24262b';
74
+ const valueFontSize = (0, _figmaVariablesResolver.getVariableByName)('detailItem/value/fontSize', modes) || 14;
75
+ const valueFontFamily = (0, _figmaVariablesResolver.getVariableByName)('detailItem/value/fontFamily', modes) || 'System';
76
+ const valueLineHeight = (0, _figmaVariablesResolver.getVariableByName)('detailItem/value/lineHeight', modes) || 17;
77
+ const valueFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('detailItem/value/fontWeight', modes) || 'Medium';
78
+ const valueFontWeight = typeof valueFontWeightRaw === 'number' ? valueFontWeightRaw.toString() : valueFontWeightRaw === 'Medium' ? '500' : valueFontWeightRaw;
79
+ const containerStyle = {
80
+ flexDirection: 'column',
81
+ alignItems: 'flex-start',
82
+ justifyContent: 'center',
83
+ gap
84
+ };
85
+ const labelTextStyle = {
86
+ color: labelColor,
87
+ fontSize: labelFontSize,
88
+ fontFamily: labelFontFamily,
89
+ lineHeight: labelLineHeight,
90
+ fontWeight: labelFontWeight
91
+ };
92
+ const valueTextStyle = {
93
+ color: valueColor,
94
+ fontSize: valueFontSize,
95
+ fontFamily: valueFontFamily,
96
+ lineHeight: valueLineHeight,
97
+ fontWeight: valueFontWeight
98
+ };
99
+ const defaultAccessibilityLabel = accessibilityLabel || `${label}: ${value}`;
100
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
101
+ style: [containerStyle, style],
102
+ accessibilityRole: "text",
103
+ accessibilityLabel: defaultAccessibilityLabel,
104
+ ...rest,
105
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
106
+ style: [labelTextStyle, labelStyle],
107
+ accessibilityElementsHidden: true,
108
+ importantForAccessibility: "no",
109
+ children: label
110
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
111
+ style: [valueTextStyle, valueStyle],
112
+ accessibilityElementsHidden: true,
113
+ importantForAccessibility: "no",
114
+ children: value
115
+ })]
116
+ });
117
+ }
118
+
119
+ // ===== TransactionDetails Component =====
120
+
121
+ /**
122
+ * TransactionDetails component that displays a list of transaction detail items.
123
+ *
124
+ * This component serves as a container for TransactionDetails.Item children, applying consistent
125
+ * spacing and padding as defined by Figma design tokens.
126
+ *
127
+ * @component
128
+ * @param {Object} props
129
+ * @param {React.ReactNode} [props.children] - TransactionDetails.Item children to render.
130
+ * @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for design tokens.
131
+ * @param {Object} [props.style] - Optional container style overrides.
132
+ * @param {string} [props.accessibilityLabel] - Accessibility label for screen readers.
133
+ *
134
+ * @example
135
+ * ```tsx
136
+ * <TransactionDetails modes={{ 'Color Mode': 'Light' }}>
137
+ * <TransactionDetails.Item label="UPI transaction ID" value="101674916166" />
138
+ * <TransactionDetails.Item label="From" value="JioFinance • shivashankar@okjio" />
139
+ * <TransactionDetails.Item label="To" value="JioFinance • shivashankar@okjio" />
140
+ * <TransactionDetails.Item label="Payment method" value="UPI" />
141
+ * </TransactionDetails>
142
+ * ```
143
+ */
144
+ function TransactionDetails({
145
+ children,
146
+ modes = {},
147
+ style,
148
+ accessibilityLabel,
149
+ ...rest
150
+ }) {
151
+ // Resolve design tokens for TransactionDetails
152
+ const gap = (0, _figmaVariablesResolver.getVariableByName)('transationDetails/gap', modes) ?? 16;
153
+ const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('transationDetails/padding/horizontal', modes) ?? 0;
154
+ const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('transationDetails/padding/vertical', modes) ?? 0;
155
+ const containerStyle = {
156
+ flexDirection: 'column',
157
+ alignItems: 'flex-start',
158
+ gap,
159
+ paddingHorizontal,
160
+ paddingVertical
161
+ };
162
+
163
+ // Process children to pass modes prop
164
+ const processedChildren = children ? cloneChildrenWithModes(_react.default.Children.toArray(children), modes) : null;
165
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
166
+ style: [containerStyle, style],
167
+ accessibilityRole: "summary",
168
+ accessibilityLabel: accessibilityLabel || 'Transaction details',
169
+ ...rest,
170
+ children: processedChildren
171
+ });
172
+ }
173
+
174
+ // Attach Item as a static property for compound component pattern
175
+ TransactionDetails.Item = Item;
176
+ var _default = exports.default = TransactionDetails;
177
+ //# sourceMappingURL=TransactionDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_jsxRuntime","e","__esModule","default","cloneChildrenWithModes","children","modes","result","React","Children","map","child","isValidElement","childChildren","props","hasChildren","undefined","existingModes","mergedModes","processedChildren","toArray","cloneElement","Item","label","value","style","labelStyle","valueStyle","accessibilityLabel","rest","gap","getVariableByName","labelColor","labelFontSize","labelFontFamily","labelLineHeight","labelFontWeightRaw","labelFontWeight","toString","valueColor","valueFontSize","valueFontFamily","valueLineHeight","valueFontWeightRaw","valueFontWeight","containerStyle","flexDirection","alignItems","justifyContent","labelTextStyle","color","fontSize","fontFamily","lineHeight","fontWeight","valueTextStyle","defaultAccessibilityLabel","jsxs","View","accessibilityRole","jsx","Text","accessibilityElementsHidden","importantForAccessibility","TransactionDetails","paddingHorizontal","paddingVertical","_default","exports"],"sourceRoot":"../../../../src","sources":["components/TransactionDetails/TransactionDetails.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AAAgF,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhF;AACA;AACA,GACA,SAASG,sBAAsBA,CAC7BC,QAAyB,EACzBC,KAA0B,EACP;EACnB,MAAMC,MAAM,GAAGC,cAAK,CAACC,QAAQ,CAACC,GAAG,CAACL,QAAQ,EAAGM,KAAK,IAAK;IACrD,IAAI,eAACH,cAAK,CAACI,cAAc,CAACD,KAAK,CAAC,EAAE;MAChC,OAAOA,KAAK;IACd;IAEA,MAAME,aAAa,GAAIF,KAAK,CAACG,KAAK,EAAUT,QAAQ;IACpD,MAAMU,WAAW,GAAGF,aAAa,KAAKG,SAAS,IAAIH,aAAa,KAAK,IAAI;IAEzE,MAAMI,aAAa,GAAIN,KAAK,CAACG,KAAK,EAAUR,KAAK;IACjD,MAAMY,WAAW,GAAGD,aAAa,GAC7B;MAAE,GAAGX,KAAK;MAAE,GAAGW;IAAc,CAAC,GAC9BX,KAAK;IAET,MAAMa,iBAA8C,GAAGJ,WAAW,GAC9DX,sBAAsB,CACpBI,cAAK,CAACC,QAAQ,CAACW,OAAO,CAACP,aAAa,CAAC,EACrCP,KACF,CAAC,GACDU,SAAS;IAEb,oBAAOR,cAAK,CAACa,YAAY,CACvBV,KAAK,EACL;MACE,GAAIA,KAAK,CAACG,KAAa;MACvBR,KAAK,EAAEY;IACT,CAAC,EACDC,iBACF,CAAC;EACH,CAAC,CAAC;EACF,OAAOZ,MAAM,IAAI,EAAE;AACrB;;AAEA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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