jfs-components 0.0.56 → 0.0.57

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.
@@ -12,16 +12,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  /**
13
13
  * TransactionBubble — Figma node 1517:1155.
14
14
  *
15
- * Layout (single horizontal row inside a rounded bordered pill):
15
+ * Layout (vertical stack inside a rounded bordered pill):
16
16
  *
17
17
  * ┌──────────────────────────────────────────────┐
18
- * │ Description Status · Date
19
- * │ ₹56
18
+ * │ Description
19
+ * │ ₹56
20
+ * │ [slot / children content] │
21
+ * │ ⚠ Expired · 20 Mar 2025 › │
20
22
  * └──────────────────────────────────────────────┘
21
23
  *
22
- * Left column: description text + MoneyValue, stacked vertically with `transactionBubble/gap`.
23
- * Right column: TransactionStatus + NavArrow, stacked vertically with `transactionBubble/statusWrap/gap`,
24
- * right-aligned.
24
+ * moneyValueWrap: description + MoneyValue, vertical with `transactionBubble/wrap/gap`.
25
+ * slotWrap: children (optional), rendered between moneyValueWrap and statusWrap.
26
+ * statusWrap: TransactionStatus + NavArrow, horizontal row with `transactionBubble/statusWrap/gap`.
27
+ * Container gap between sections: `transactionBubble/gap`.
25
28
  */
26
29
  function TransactionBubble({
27
30
  description = 'Payment to Uber India',
@@ -49,12 +52,13 @@ function TransactionBubble({
49
52
  const backgroundColor = getVariableByName('transactionBubble/background', resolvedModes) || '#ffffff';
50
53
  const borderColor = getVariableByName('transactionBubble/border/color', resolvedModes) || '#e5e5e5';
51
54
  const bubbleGap = Number(getVariableByName('transactionBubble/gap', resolvedModes)) || 8;
52
- const wrapGap = Number(getVariableByName('transactionBubble/wrap/gap', resolvedModes)) || 8;
55
+ const moneyValueWrapGap = Number(getVariableByName('transactionBubble/wrap/gap', resolvedModes)) || 8;
53
56
  const descriptionColor = getVariableByName('transactionBubble/description/color', resolvedModes) || '#24262b';
54
57
  const descriptionFontSize = Number(getVariableByName('transactionBubble/description/fontSize', resolvedModes)) || 14;
55
58
  const descriptionLineHeight = Number(getVariableByName('transactionBubble/description/lineHeight', resolvedModes)) || 17;
56
59
  const descriptionFontFamily = getVariableByName('transactionBubble/description/fontFamily', resolvedModes) || 'JioType Var';
57
60
  const statusWrapGap = Number(getVariableByName('transactionBubble/statusWrap/gap', resolvedModes)) || 4;
61
+ const statusWrapHeight = Number(getVariableByName('transactionBubble/statusWrap/height', resolvedModes)) || 18;
58
62
  const containerStyle = {
59
63
  padding,
60
64
  borderRadius: radius,
@@ -78,11 +82,13 @@ function TransactionBubble({
78
82
  accessibilityLabel: defaultAccessibilityLabel,
79
83
  webAccessibilityProps
80
84
  });
81
- const rightColumn = processedStatusSlot || /*#__PURE__*/_jsxs(View, {
85
+ const statusRow = processedStatusSlot || /*#__PURE__*/_jsxs(View, {
82
86
  style: {
83
- alignItems: 'flex-end',
84
- justifyContent: 'flex-end',
85
- gap: statusWrapGap
87
+ flexDirection: 'row',
88
+ alignItems: 'center',
89
+ justifyContent: 'space-between',
90
+ gap: statusWrapGap,
91
+ height: statusWrapHeight
86
92
  },
87
93
  children: [/*#__PURE__*/_jsx(TransactionStatus, {
88
94
  status: status,
@@ -95,13 +101,11 @@ function TransactionBubble({
95
101
  });
96
102
  const mainContent = /*#__PURE__*/_jsxs(View, {
97
103
  style: {
98
- flexDirection: 'row',
99
- gap: wrapGap
104
+ gap: bubbleGap
100
105
  },
101
106
  children: [/*#__PURE__*/_jsxs(View, {
102
107
  style: {
103
- flex: 1,
104
- gap: bubbleGap
108
+ gap: moneyValueWrapGap
105
109
  },
106
110
  children: [/*#__PURE__*/_jsx(Text, {
107
111
  style: descriptionStyle,
@@ -112,10 +116,10 @@ function TransactionBubble({
112
116
  currency: currency,
113
117
  modes: resolvedModes
114
118
  })]
115
- }), rightColumn]
119
+ }), processedChildren, statusRow]
116
120
  });
117
121
  if (onPress) {
118
- return /*#__PURE__*/_jsxs(Pressable, {
122
+ return /*#__PURE__*/_jsx(Pressable, {
119
123
  onPress: onPress,
120
124
  style: ({
121
125
  pressed
@@ -127,14 +131,14 @@ function TransactionBubble({
127
131
  accessibilityHint: accessibilityHint,
128
132
  ...webProps,
129
133
  ...rest,
130
- children: [mainContent, processedChildren]
134
+ children: mainContent
131
135
  });
132
136
  }
133
- return /*#__PURE__*/_jsxs(View, {
137
+ return /*#__PURE__*/_jsx(View, {
134
138
  style: [containerStyle, style],
135
139
  accessibilityLabel: defaultAccessibilityLabel,
136
140
  accessibilityHint: accessibilityHint,
137
- children: [mainContent, processedChildren]
141
+ children: mainContent
138
142
  });
139
143
  }
140
144
  export default TransactionBubble;