jfs-components 0.0.30 → 0.0.33

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 (102) hide show
  1. package/lib/commonjs/components/AvatarGroup/AvatarGroup.js +2 -1
  2. package/lib/commonjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
  3. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +15 -5
  4. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js.map +1 -1
  5. package/lib/commonjs/components/Carousel/Carousel.js +3 -6
  6. package/lib/commonjs/components/Carousel/Carousel.js.map +1 -1
  7. package/lib/commonjs/components/Carousel/Carousel.mdx +1 -2
  8. package/lib/commonjs/components/ChipGroup/ChipGroup.js +13 -7
  9. package/lib/commonjs/components/ChipGroup/ChipGroup.js.map +1 -1
  10. package/lib/commonjs/components/ListGroup/ListGroup.js +3 -1
  11. package/lib/commonjs/components/ListGroup/ListGroup.js.map +1 -1
  12. package/lib/commonjs/components/RechargeCard/RechargeCard.js +205 -0
  13. package/lib/commonjs/components/RechargeCard/RechargeCard.js.map +1 -0
  14. package/lib/commonjs/components/RechargeCard/RechargeCard.mdx +100 -0
  15. package/lib/commonjs/components/index.js +0 -7
  16. package/lib/commonjs/components/index.js.map +1 -1
  17. package/lib/commonjs/design-tokens/figma-variables-resolver.js +9 -3
  18. package/lib/commonjs/design-tokens/figma-variables-resolver.js.map +2 -1
  19. package/lib/commonjs/icons/ic_alert.svg +3 -0
  20. package/lib/commonjs/icons/ic_error.svg +3 -0
  21. package/lib/commonjs/icons/ic_exclamation.svg +3 -0
  22. package/lib/commonjs/icons/ic_help.svg +3 -0
  23. package/lib/commonjs/icons/ic_message_send.svg +3 -0
  24. package/lib/commonjs/icons/ic_smiley_unhappy.svg +3 -0
  25. package/lib/commonjs/icons/ic_star.svg +3 -0
  26. package/lib/commonjs/icons/registry.js +2 -2
  27. package/lib/commonjs/icons/registry.js.map +1 -1
  28. package/lib/commonjs/utils/react-utils.js +23 -0
  29. package/lib/commonjs/utils/react-utils.js.map +1 -1
  30. package/lib/module/components/AvatarGroup/AvatarGroup.js +2 -1
  31. package/lib/module/components/AvatarGroup/AvatarGroup.js.map +1 -1
  32. package/lib/module/components/ButtonGroup/ButtonGroup.js +15 -5
  33. package/lib/module/components/ButtonGroup/ButtonGroup.js.map +1 -1
  34. package/lib/module/components/Carousel/Carousel.js +3 -6
  35. package/lib/module/components/Carousel/Carousel.js.map +1 -1
  36. package/lib/module/components/Carousel/Carousel.mdx +1 -2
  37. package/lib/module/components/ChipGroup/ChipGroup.js +13 -7
  38. package/lib/module/components/ChipGroup/ChipGroup.js.map +1 -1
  39. package/lib/module/components/ListGroup/ListGroup.js +4 -2
  40. package/lib/module/components/ListGroup/ListGroup.js.map +1 -1
  41. package/lib/module/components/RechargeCard/RechargeCard.js +200 -0
  42. package/lib/module/components/RechargeCard/RechargeCard.js.map +1 -0
  43. package/lib/module/components/RechargeCard/RechargeCard.mdx +100 -0
  44. package/lib/module/components/index.js +0 -1
  45. package/lib/module/components/index.js.map +1 -1
  46. package/lib/module/design-tokens/figma-variables-resolver.js +2 -2
  47. package/lib/module/design-tokens/figma-variables-resolver.js.map +1 -2
  48. package/lib/module/icons/ic_alert.svg +3 -0
  49. package/lib/module/icons/ic_error.svg +3 -0
  50. package/lib/module/icons/ic_exclamation.svg +3 -0
  51. package/lib/module/icons/ic_help.svg +3 -0
  52. package/lib/module/icons/ic_message_send.svg +3 -0
  53. package/lib/module/icons/ic_smiley_unhappy.svg +3 -0
  54. package/lib/module/icons/ic_star.svg +3 -0
  55. package/lib/module/icons/registry.js +2 -2
  56. package/lib/module/icons/registry.js.map +1 -1
  57. package/lib/module/utils/react-utils.js +22 -0
  58. package/lib/module/utils/react-utils.js.map +1 -1
  59. package/lib/typescript/components/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  60. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  61. package/lib/typescript/components/Carousel/Carousel.d.ts +1 -3
  62. package/lib/typescript/components/Carousel/Carousel.d.ts.map +1 -1
  63. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts.map +1 -1
  64. package/lib/typescript/components/ListGroup/ListGroup.d.ts.map +1 -1
  65. package/lib/typescript/components/RechargeCard/RechargeCard.d.ts +51 -0
  66. package/lib/typescript/components/RechargeCard/RechargeCard.d.ts.map +1 -0
  67. package/lib/typescript/components/index.d.ts +0 -1
  68. package/lib/typescript/components/index.d.ts.map +1 -1
  69. package/lib/typescript/icons/registry.d.ts +1 -1
  70. package/lib/typescript/icons/registry.d.ts.map +1 -1
  71. package/lib/typescript/utils/react-utils.d.ts +6 -0
  72. package/lib/typescript/utils/react-utils.d.ts.map +1 -1
  73. package/package.json +1 -1
  74. package/src/components/.token-metadata.json +44 -24
  75. package/src/components/AvatarGroup/AvatarGroup.tsx +2 -1
  76. package/src/components/ButtonGroup/ButtonGroup.tsx +12 -4
  77. package/src/components/Carousel/Carousel.mdx +1 -2
  78. package/src/components/Carousel/Carousel.tsx +16 -20
  79. package/src/components/ChipGroup/ChipGroup.tsx +9 -6
  80. package/src/components/ListGroup/ListGroup.tsx +4 -2
  81. package/src/components/RechargeCard/RechargeCard.mdx +100 -0
  82. package/src/components/RechargeCard/RechargeCard.tsx +239 -0
  83. package/src/components/index.ts +1 -1
  84. package/src/icons/ic_alert.svg +3 -0
  85. package/src/icons/ic_error.svg +3 -0
  86. package/src/icons/ic_exclamation.svg +3 -0
  87. package/src/icons/ic_help.svg +3 -0
  88. package/src/icons/ic_message_send.svg +3 -0
  89. package/src/icons/ic_smiley_unhappy.svg +3 -0
  90. package/src/icons/ic_star.svg +3 -0
  91. package/src/icons/registry.ts +29 -1
  92. package/src/utils/react-utils.ts +23 -0
  93. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +0 -101
  94. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js.map +0 -1
  95. package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +0 -40
  96. package/lib/module/components/TransactionBubble/TransactionBubble.js +0 -96
  97. package/lib/module/components/TransactionBubble/TransactionBubble.js.map +0 -1
  98. package/lib/module/components/TransactionBubble/TransactionBubble.mdx +0 -40
  99. package/lib/typescript/components/TransactionBubble/TransactionBubble.d.ts +0 -24
  100. package/lib/typescript/components/TransactionBubble/TransactionBubble.d.ts.map +0 -1
  101. package/src/components/TransactionBubble/TransactionBubble.mdx +0 -40
  102. package/src/components/TransactionBubble/TransactionBubble.tsx +0 -113
@@ -128,7 +128,7 @@ function MyCarousel() {
128
128
  <UsageConstraintsSection>
129
129
  <ul>
130
130
  <li>Each child of <code>Carousel</code> becomes one slide. Use <code>Carousel.Item</code> for semantic clarity.</li>
131
- <li>When <code>itemWidth</code> is not provided, items expand to fill the container width minus <code>peekOffset</code>.</li>
131
+ <li>When <code>itemWidth</code> is not provided, items expand to fill the container width minus horizontal padding.</li>
132
132
  <li>Auto-play pauses automatically while the user is dragging.</li>
133
133
  <li>The <code>modes</code> prop is forwarded to all children via <code>cloneElement</code>.</li>
134
134
  <li>On web, CSS <code>scroll-snap-type</code> is applied for native-feeling snap behavior.</li>
@@ -153,6 +153,5 @@ This component uses the following design tokens, resolved through `getVariableBy
153
153
  - **`carousel/pagination/dotRadius`**
154
154
  - **`carousel/pagination/dotSize`**
155
155
  - **`carousel/pagination/gap`**
156
- - **`carousel/peekOffset`**
157
156
 
158
157
  All tokens support mode-based theming through the `modes` prop.
@@ -37,9 +37,9 @@ const CarouselContext = createContext<CarouselContextValue>({
37
37
  modes: {},
38
38
  activeIndex: 0,
39
39
  totalItems: 0,
40
- goTo: () => {},
41
- goNext: () => {},
42
- goPrev: () => {},
40
+ goTo: () => { },
41
+ goNext: () => { },
42
+ goPrev: () => { },
43
43
  })
44
44
 
45
45
  // ---------------------------------------------------------------------------
@@ -63,8 +63,7 @@ export interface CarouselProps {
63
63
  gap?: number
64
64
  /** Width of each carousel item. When undefined, items take full container width. */
65
65
  itemWidth?: number
66
- /** Horizontal padding around the carousel track, allowing peek of adjacent items. Defaults to 0. */
67
- peekOffset?: number
66
+
68
67
  /** Called when the active index changes. */
69
68
  onIndexChange?: (index: number) => void
70
69
  /** Style overrides for the outermost container. */
@@ -84,7 +83,7 @@ export function Carousel({
84
83
  loop = true,
85
84
  gap: gapProp,
86
85
  itemWidth: itemWidthProp,
87
- peekOffset: peekOffsetProp,
86
+
88
87
  onIndexChange,
89
88
  style,
90
89
  }: CarouselProps) {
@@ -94,10 +93,7 @@ export function Carousel({
94
93
  )
95
94
  const gap = gapProp ?? tokenGap
96
95
 
97
- const tokenPeekOffset = parseFloat(
98
- getVariableByName('carousel/peekOffset', modes) || '0',
99
- )
100
- const peekOffset = peekOffsetProp ?? tokenPeekOffset
96
+
101
97
 
102
98
  const containerPaddingH = parseFloat(
103
99
  getVariableByName('carousel/padding/horizontal', modes) || '0',
@@ -129,8 +125,8 @@ export function Carousel({
129
125
  if (itemWidthProp != null) return itemWidthProp
130
126
  if (containerWidth === 0) return 0
131
127
  // Full-width minus peekOffset on each side
132
- return containerWidth - peekOffset * 2 - containerPaddingH * 2
133
- }, [itemWidthProp, containerWidth, peekOffset, containerPaddingH])
128
+ return containerWidth - containerPaddingH * 4
129
+ }, [itemWidthProp, containerWidth, containerPaddingH])
134
130
 
135
131
  // Snap interval = item width + gap
136
132
  const snapInterval = effectiveItemWidth + gap
@@ -258,7 +254,7 @@ export function Carousel({
258
254
  }
259
255
 
260
256
  const contentContainerStyle: ViewStyle = {
261
- paddingHorizontal: peekOffset + containerPaddingH,
257
+ paddingHorizontal: containerPaddingH * 2,
262
258
  gap,
263
259
  // Align items to the start so snap works correctly
264
260
  alignItems: 'flex-start',
@@ -280,7 +276,7 @@ export function Carousel({
280
276
  scrollEventThrottle={16}
281
277
  onScrollBeginDrag={handleScrollBeginDrag}
282
278
  onScrollEndDrag={handleScrollEndDrag}
283
-
279
+
284
280
  >
285
281
  {items.map((child, index) => {
286
282
  const itemStyle: ViewStyle = {
@@ -290,12 +286,12 @@ export function Carousel({
290
286
  // Pass modes down to children
291
287
  const childWithModes = React.isValidElement(child)
292
288
  ? React.cloneElement(child as React.ReactElement<any>, {
293
- modes: {
294
- ...((child.props as any)?.modes || {}),
295
- ...modes,
296
- },
297
- style: [itemStyle, (child.props as any)?.style],
298
- })
289
+ modes: {
290
+ ...((child.props as any)?.modes || {}),
291
+ ...modes,
292
+ },
293
+ style: [itemStyle, (child.props as any)?.style],
294
+ })
299
295
  : child
300
296
 
301
297
  return (
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
3
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
4
+ import { flattenChildren } from '../../utils/react-utils';
4
5
 
5
6
  export type ChipGroupProps = {
6
7
  /**
@@ -44,15 +45,17 @@ function ChipGroup({
44
45
  gap: gap,
45
46
  };
46
47
 
48
+ // Flatten children to handle Fragments properly
49
+ const flatChildren = flattenChildren(children);
50
+
47
51
  // Clone children to pass `modes` prop
48
- const childrenWithModes = React.Children.map(children, (child) => {
52
+ const childrenWithModes = React.Children.map(flatChildren, (child) => {
49
53
  if (React.isValidElement(child)) {
50
54
  // Pass merged modes (parent modes + child modes)
51
- // Note: We don't have access to child's existing props here to merge modes perfectly if they were passed directly to child
52
- // But usually we want parent modes to override or augment.
53
- // For now, simpler approach: just pass the parent modes, assuming child will handle merging if it needs to.
54
- // Actually, based on previous ButtonGroup example, we just pass { modes: modes }.
55
- return React.cloneElement(child, { modes: modes } as any);
55
+ const element = child as React.ReactElement<any>;
56
+ const childModes = element.props.modes || {};
57
+ const mergedModes = { ...modes, ...childModes };
58
+ return React.cloneElement(element, { modes: mergedModes });
56
59
  }
57
60
  return child;
58
61
  });
@@ -6,7 +6,7 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
6
6
  * Helper function to recursively clone children and pass modes prop to components that accept it.
7
7
  * This ensures that all child components in slots receive the modes prop from the parent.
8
8
  */
9
- import { cloneChildrenWithModes } from '../../utils/react-utils'
9
+ import { cloneChildrenWithModes, flattenChildren } from '../../utils/react-utils'
10
10
 
11
11
  type ListGroupProps = {
12
12
  label?: string;
@@ -80,8 +80,10 @@ function ListGroup({
80
80
  }
81
81
 
82
82
  // Clone listGroupSlot children and pass modes to all children that accept it
83
+ // We flatten children first so that if a Fragment is passed, the items inside
84
+ // become direct children of the container, allowing `gap` to apply correctly between them.
83
85
  const processedSlot = listGroupSlot
84
- ? cloneChildrenWithModes(React.Children.toArray(listGroupSlot), modes)
86
+ ? cloneChildrenWithModes(flattenChildren(listGroupSlot), modes)
85
87
  : null
86
88
 
87
89
  // Use provided accessibilityLabel or fall back to label
@@ -0,0 +1,100 @@
1
+ import { Meta, Story, Controls } from '@storybook/blocks';
2
+ import * as RechargeCardStories from './RechargeCard.stories';
3
+ import RechargeCard from './RechargeCard';
4
+
5
+ <Meta of={RechargeCardStories} />
6
+
7
+ # RechargeCard
8
+
9
+ RechargeCard component displays a detailed view of a recharge plan.
10
+
11
+ ## Properties
12
+
13
+ | Prop | Type | Default | Description |
14
+ | ---- | ---- | ------- | ----------- |
15
+ | `title` | `string` | `"Unlimited 5G"` | Title of the plan |
16
+ | `price` | `number \| string` | `500` | Price value displayed via MoneyValue |
17
+ | `validity` | `string` | `"365 days"` | Validity duration |
18
+ | `data` | `string` | `"2 GB/Day"` | Data allowance info |
19
+ | `disclaimer` | `string` | `...` | Disclaimer text below specs |
20
+ | `subscriptionContent` | `ReactNode` | `undefined` | Avatar elements to display in subscription slot (wrapped in AvatarGroup) |
21
+ | `actions` | `ReactNode` | `undefined` | Button elements to display in the button group (Button components) |
22
+ | `modes` | `object` | `{}` | Config for design token modes |
23
+
24
+
25
+ ## Available Collections and Modes
26
+
27
+ This component does not use any design token collections with multiple modes.
28
+ ## Usage
29
+
30
+ ```tsx
31
+ import RechargeCard from './RechargeCard';
32
+ import { AvatarGroup, Avatar } from '..';
33
+
34
+ function Example() {
35
+ return (
36
+ <RechargeCard
37
+ title="Unlimited 5G"
38
+ price={500}
39
+ validity="365 days"
40
+ data="2 GB/Day"
41
+ modes={{ "Context3": "Transaction Bubble & Cards" }}
42
+ subscriptionContent={
43
+ <>
44
+ <Avatar style="Image" imageSource="..." />
45
+ <Avatar style="Monogram" monogram="+3" />
46
+ </>
47
+ }
48
+ actions={
49
+ <>
50
+ <Button label="Recharge" onPress={() => console.log('Recharge')} />
51
+ <Button label="Details" onPress={() => console.log('Details')} modes={{ Emphasis: 'Low' }} />
52
+ </>
53
+ }
54
+ />
55
+ );
56
+ }
57
+ ```
58
+
59
+ <Story of={RechargeCardStories.Default} />
60
+
61
+
62
+ ## Design Tokens
63
+
64
+ This component uses the following design tokens, resolved through `getVariableByName`:
65
+
66
+ - **`buttonGroup/padding/gap`**
67
+ - **`buttonGroup/padding/horizontal`**
68
+ - **`buttonGroup/padding/vertical`**
69
+ - **`rechargeCard/background`**
70
+ - **`rechargeCard/disclaimer/color`**
71
+ - **`rechargeCard/disclaimer/fontFamily`**
72
+ - **`rechargeCard/disclaimer/fontSize`**
73
+ - **`rechargeCard/disclaimer/fontWeight`**
74
+ - **`rechargeCard/disclaimer/lineHeight`**
75
+ - **`rechargeCard/gap`**
76
+ - **`rechargeCard/header/gap`**
77
+ - **`rechargeCard/minWidth`**
78
+ - **`rechargeCard/padding/horizontal`**
79
+ - **`rechargeCard/padding/vertical`**
80
+ - **`rechargeCard/radius`**
81
+ - **`rechargeCard/specItem/gap`**
82
+ - **`rechargeCard/specItem/label/color`**
83
+ - **`rechargeCard/specItem/label/fontFamily`**
84
+ - **`rechargeCard/specItem/label/fontSize`**
85
+ - **`rechargeCard/specItem/label/fontWeight`**
86
+ - **`rechargeCard/specItem/label/lineHeight`**
87
+ - **`rechargeCard/specItem/value/color`**
88
+ - **`rechargeCard/specItem/value/fontFamily`**
89
+ - **`rechargeCard/specItem/value/fontSize`**
90
+ - **`rechargeCard/specItem/value/fontWeight`**
91
+ - **`rechargeCard/specItem/value/lineHeight`**
92
+ - **`rechargeCard/specs/gap`**
93
+ - **`rechargeCard/title/color`**
94
+ - **`rechargeCard/title/fontFamily`**
95
+ - **`rechargeCard/title/fontSize`**
96
+ - **`rechargeCard/title/fontWeight`**
97
+ - **`rechargeCard/title/lineHeight`**
98
+
99
+ All tokens support mode-based theming through the `modes` prop.
100
+
@@ -0,0 +1,239 @@
1
+ import React, { isValidElement, cloneElement } from 'react';
2
+ import { View, Text, StyleSheet, type ViewStyle } from 'react-native';
3
+ import ButtonGroup from '../ButtonGroup/ButtonGroup';
4
+ import AvatarGroup from '../AvatarGroup/AvatarGroup';
5
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import MoneyValue from '../MoneyValue/MoneyValue';
7
+ import Button from '../Button/Button';
8
+
9
+
10
+ type RechargeCardProps = {
11
+ /**
12
+ * Title of the card.
13
+ * Default: "Unlimited 5G"
14
+ */
15
+ title?: string;
16
+ /**
17
+ * Value for the MoneyValue component.
18
+ * Default: 500
19
+ */
20
+ price?: number | string;
21
+ /**
22
+ * Validity duration string.
23
+ * Default: "365 days"
24
+ */
25
+ validity?: string;
26
+ /**
27
+ * Data allowance string.
28
+ * Default: "2 GB/Day"
29
+ */
30
+ data?: string;
31
+ /**
32
+ * Disclaimer text.
33
+ * Default is pulled from tokens if not provided, or provided as prop.
34
+ */
35
+ disclaimer?: string;
36
+ /**
37
+ * Avatar elements to be displayed in the subscription slot.
38
+ * Content will be wrapped in an AvatarGroup.
39
+ */
40
+ subscriptionContent?: React.ReactNode;
41
+ /**
42
+ * Actions to be displayed in the button group (e.g. Button components).
43
+ * Buttons should be passed as children to this prop.
44
+ */
45
+ actions?: React.ReactNode;
46
+ /**
47
+ * Mode configuration for design tokens.
48
+ */
49
+ modes?: Record<string, any>;
50
+ style?: ViewStyle;
51
+ };
52
+
53
+ /**
54
+ * RechargeCard component implementation from Figma node 2235:937.
55
+ * Displays a recharge plan with price, validity, data, and subscription details.
56
+ */
57
+ export default function RechargeCard({
58
+ title = "Unlimited 5G",
59
+ price = 500,
60
+ validity = "365 days",
61
+ data = "2 GB/Day",
62
+ disclaimer = "Data only pack (No Voice & No SMS)\nVoice: NA | SMS: NA...",
63
+ subscriptionContent,
64
+ actions,
65
+ modes = {},
66
+ style,
67
+ }: RechargeCardProps) {
68
+ // Container Tokens
69
+ const backgroundColor = getVariableByName('rechargeCard/background', modes) || '#f6f3ff';
70
+ const paddingHorizontal = parseInt(getVariableByName('rechargeCard/padding/horizontal', modes) || 16, 10);
71
+ const paddingVertical = parseInt(getVariableByName('rechargeCard/padding/vertical', modes) || 20, 10);
72
+ const gap = parseInt(getVariableByName('rechargeCard/gap', modes) || 20, 10);
73
+ const radius = parseInt(getVariableByName('rechargeCard/radius', modes) || 20, 10);
74
+ const minWidth = parseInt(getVariableByName('rechargeCard/minWidth', modes) || 328, 10);
75
+
76
+ // Header Tokens
77
+ const headerGap = parseInt(getVariableByName('rechargeCard/header/gap', modes) || 4, 10);
78
+ const titleColor = getVariableByName('rechargeCard/title/color', modes) || '#13002d';
79
+ const titleFontSize = parseInt(getVariableByName('rechargeCard/title/fontSize', modes) || 12, 10);
80
+ const titleFontFamily = getVariableByName('rechargeCard/title/fontFamily', modes) || 'JioType Var';
81
+ const titleLineHeight = parseInt(getVariableByName('rechargeCard/title/lineHeight', modes) || 14, 10);
82
+ const titleFontWeight = getVariableByName('rechargeCard/title/fontWeight', modes) || '700';
83
+
84
+ // Specs Tokens
85
+ const specsGap = parseInt(getVariableByName('rechargeCard/specs/gap', modes) || 0, 10);
86
+ const specItemGap = parseInt(getVariableByName('rechargeCard/specItem/gap', modes) || 4, 10);
87
+
88
+ // Spec Label Tokens
89
+ const specLabelColor = getVariableByName('rechargeCard/specItem/label/color', modes) || '#13002d';
90
+ const specLabelFontSize = parseInt(getVariableByName('rechargeCard/specItem/label/fontSize', modes) || 12, 10);
91
+ const specLabelFontFamily = getVariableByName('rechargeCard/specItem/label/fontFamily', modes) || 'JioType Var';
92
+ const specLabelLineHeight = parseInt(getVariableByName('rechargeCard/specItem/label/lineHeight', modes) || 14, 10);
93
+ const specLabelFontWeight = getVariableByName('rechargeCard/specItem/label/fontWeight', modes) || '500';
94
+
95
+ // Spec Value Tokens
96
+ const specValueColor = getVariableByName('rechargeCard/specItem/value/color', modes) || '#310064';
97
+ const specValueFontSize = parseInt(getVariableByName('rechargeCard/specItem/value/fontSize', modes) || 14, 10);
98
+ const specValueFontFamily = getVariableByName('rechargeCard/specItem/value/fontFamily', modes) || 'JioType Var';
99
+ const specValueLineHeight = parseInt(getVariableByName('rechargeCard/specItem/value/lineHeight', modes) || 17, 10);
100
+ const specValueFontWeight = getVariableByName('rechargeCard/specItem/value/fontWeight', modes) || '500';
101
+
102
+ // Disclaimer Tokens
103
+ const disclaimerColor = getVariableByName('rechargeCard/disclaimer/color', modes) || '#22004a';
104
+ const disclaimerFontSize = parseInt(getVariableByName('rechargeCard/disclaimer/fontSize', modes) || 10, 10);
105
+ const disclaimerFontFamily = getVariableByName('rechargeCard/disclaimer/fontFamily', modes) || 'JioType Var';
106
+ const disclaimerLineHeight = parseInt(getVariableByName('rechargeCard/disclaimer/lineHeight', modes) || 13, 10);
107
+ const disclaimerFontWeight = getVariableByName('rechargeCard/disclaimer/fontWeight', modes) || '400';
108
+
109
+ // Button Group Tokens
110
+ // Handled by ButtonGroup component directly
111
+
112
+ // Helpers
113
+ const resolveFontWeight = (weight: string | number) => typeof weight === 'number' ? weight.toString() : weight;
114
+
115
+ // Pass modes to subscription children (e.g. AvatarGroup)
116
+ // Now encapsulated, so we just pass children to AvatarGroup
117
+ const hasSubscriptions = React.Children.count(subscriptionContent) > 0;
118
+
119
+
120
+ return (
121
+ <View style={[{
122
+ backgroundColor,
123
+ paddingHorizontal,
124
+ paddingVertical,
125
+ gap,
126
+ borderRadius: radius,
127
+ minWidth,
128
+ alignItems: 'flex-start',
129
+ }, style]}>
130
+ {/* Header */}
131
+ <View style={{ gap: headerGap, alignItems: 'flex-start' }}>
132
+ <Text style={{
133
+ color: titleColor,
134
+ fontSize: titleFontSize,
135
+ fontFamily: titleFontFamily,
136
+ lineHeight: titleLineHeight,
137
+ fontWeight: resolveFontWeight(titleFontWeight) as any,
138
+ }}>
139
+ {title}
140
+ </Text>
141
+ <MoneyValue
142
+ value={price}
143
+ currency="₹"
144
+ modes={modes}
145
+ />
146
+ </View>
147
+
148
+ {/* Specs */}
149
+ <View style={{ flexDirection: 'row', gap: specsGap, width: '100%' }}>
150
+ {/* Validity */}
151
+ <View style={{ flex: 1, gap: specItemGap }}>
152
+ <Text style={{
153
+ color: specLabelColor,
154
+ fontSize: specLabelFontSize,
155
+ fontFamily: specLabelFontFamily,
156
+ lineHeight: specLabelLineHeight,
157
+ fontWeight: resolveFontWeight(specLabelFontWeight) as any,
158
+ }}>
159
+ Validity
160
+ </Text>
161
+ <Text style={{
162
+ color: specValueColor,
163
+ fontSize: specValueFontSize,
164
+ fontFamily: specValueFontFamily,
165
+ lineHeight: specValueLineHeight,
166
+ fontWeight: resolveFontWeight(specValueFontWeight) as any,
167
+ }}>
168
+ {validity}
169
+ </Text>
170
+ </View>
171
+
172
+ {/* Data */}
173
+ <View style={{ flex: 1, gap: specItemGap }}>
174
+ <Text style={{
175
+ color: specLabelColor,
176
+ fontSize: specLabelFontSize,
177
+ fontFamily: specLabelFontFamily,
178
+ lineHeight: specLabelLineHeight,
179
+ fontWeight: resolveFontWeight(specLabelFontWeight) as any,
180
+ }}>
181
+ Data
182
+ </Text>
183
+ <Text style={{
184
+ color: specValueColor,
185
+ fontSize: specValueFontSize,
186
+ fontFamily: specValueFontFamily,
187
+ lineHeight: specValueLineHeight,
188
+ fontWeight: resolveFontWeight(specValueFontWeight) as any,
189
+ }}>
190
+ {data}
191
+ </Text>
192
+ </View>
193
+
194
+ {/* Subscriptions */}
195
+ {hasSubscriptions && (
196
+ <View style={{ flex: 1, gap: specItemGap }}>
197
+ <Text style={{
198
+ color: specLabelColor,
199
+ fontSize: specLabelFontSize,
200
+ fontFamily: specLabelFontFamily,
201
+ lineHeight: specLabelLineHeight,
202
+ fontWeight: resolveFontWeight(specLabelFontWeight) as any,
203
+ }}>
204
+ Subscriptions
205
+ </Text>
206
+ <AvatarGroup
207
+ modes={{ ...modes, "Avatar Size": "S" }}
208
+ >
209
+ {subscriptionContent}
210
+ </AvatarGroup>
211
+ </View>
212
+ )}
213
+ </View>
214
+
215
+ {/* Disclaimer */}
216
+ <Text style={{
217
+ color: disclaimerColor,
218
+ fontSize: disclaimerFontSize,
219
+ fontFamily: disclaimerFontFamily,
220
+ lineHeight: disclaimerLineHeight,
221
+ fontWeight: resolveFontWeight(disclaimerFontWeight) as any,
222
+ }}>
223
+ {disclaimer}
224
+ </Text>
225
+
226
+ {/* Button Group */}
227
+ <ButtonGroup
228
+ modes={{
229
+ ...modes,
230
+ "Appearance.Brand": "Secondary",
231
+ "Button / Size": "S",
232
+ "Emphasis": "High"
233
+ }}
234
+ >
235
+ {actions}
236
+ </ButtonGroup>
237
+ </View>
238
+ );
239
+ }
@@ -32,7 +32,7 @@ export { StepLabel } from './Stepper/StepLabel';
32
32
  export { default as TextInput } from './TextInput/TextInput';
33
33
  export { default as ThreadHero, type ThreadHeroProps } from './ThreadHero/ThreadHero';
34
34
  export { Tooltip } from './Tooltip/Tooltip';
35
- export { default as TransactionBubble } from './TransactionBubble/TransactionBubble';
35
+
36
36
  export { default as TransactionDetails } from './TransactionDetails/TransactionDetails';
37
37
  export { default as TransactionStatus } from './TransactionStatus/TransactionStatus';
38
38
  export { default as UpiHandle } from './UpiHandle/UpiHandle';
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M21.7401 18.0002L13.7401 4.00022C13.5657 3.69243 13.3127 3.43641 13.0071 3.25829C12.7014 3.08017 12.3539 2.98633 12.0001 2.98633C11.6464 2.98633 11.2989 3.08017 10.9932 3.25829C10.6875 3.43641 10.4346 3.69243 10.2601 4.00022L2.26015 18.0002C2.08427 18.3048 1.99184 18.6505 1.99219 19.0022C1.99254 19.354 2.08565 19.6994 2.26213 20.0037C2.4386 20.308 2.69221 20.5603 2.99736 20.7353C3.3025 20.9102 3.6484 21.0016 4.00015 21.0002H20.0001C20.3519 21.0016 20.6978 20.9102 21.0029 20.7353C21.3081 20.5603 21.5617 20.308 21.7382 20.0037C21.9146 19.6994 22.0078 19.354 22.0081 19.0022C22.0084 18.6505 21.916 18.3048 21.7401 18.0002ZM11.0001 7.00022C11.0001 6.73501 11.1055 6.48065 11.293 6.29312C11.4806 6.10558 11.7349 6.00022 12.0001 6.00022C12.2654 6.00022 12.5197 6.10558 12.7073 6.29312C12.8948 6.48065 13.0001 6.73501 13.0001 7.00022V13.0002C13.0001 13.2654 12.8948 13.5198 12.7073 13.7073C12.5197 13.8949 12.2654 14.0002 12.0001 14.0002C11.7349 14.0002 11.4806 13.8949 11.293 13.7073C11.1055 13.5198 11.0001 13.2654 11.0001 13.0002V7.00022ZM12.0001 19.0002C11.7035 19.0002 11.4135 18.9123 11.1668 18.7474C10.9201 18.5826 10.7279 18.3483 10.6143 18.0742C10.5008 17.8002 10.4711 17.4986 10.529 17.2076C10.5868 16.9166 10.7297 16.6493 10.9395 16.4396C11.1493 16.2298 11.4165 16.0869 11.7075 16.029C11.9985 15.9712 12.3001 16.0009 12.5742 16.1144C12.8483 16.2279 13.0825 16.4202 13.2474 16.6669C13.4122 16.9135 13.5001 17.2036 13.5001 17.5002C13.5001 17.898 13.3421 18.2796 13.0608 18.5609C12.7795 18.8422 12.398 19.0002 12.0001 19.0002Z" fill="#141414"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM15.71 14.29C15.8037 14.383 15.8781 14.4936 15.9289 14.6154C15.9797 14.7373 16.0058 14.868 16.0058 15C16.0058 15.132 15.9797 15.2627 15.9289 15.3846C15.8781 15.5064 15.8037 15.617 15.71 15.71C15.617 15.8037 15.5064 15.8781 15.3846 15.9289C15.2627 15.9797 15.132 16.0058 15 16.0058C14.868 16.0058 14.7373 15.9797 14.6154 15.9289C14.4936 15.8781 14.383 15.8037 14.29 15.71L12 13.41L9.71 15.71C9.61704 15.8037 9.50644 15.8781 9.38458 15.9289C9.26272 15.9797 9.13202 16.0058 9 16.0058C8.86799 16.0058 8.73729 15.9797 8.61543 15.9289C8.49357 15.8781 8.38297 15.8037 8.29 15.71C8.19628 15.617 8.12188 15.5064 8.07111 15.3846C8.02034 15.2627 7.99421 15.132 7.99421 15C7.99421 14.868 8.02034 14.7373 8.07111 14.6154C8.12188 14.4936 8.19628 14.383 8.29 14.29L10.59 12L8.29 9.71C8.1017 9.5217 7.99591 9.2663 7.99591 9C7.99591 8.7337 8.1017 8.4783 8.29 8.29C8.47831 8.1017 8.7337 7.99591 9 7.99591C9.26631 7.99591 9.5217 8.1017 9.71 8.29L12 10.59L14.29 8.29C14.4783 8.1017 14.7337 7.99591 15 7.99591C15.2663 7.99591 15.5217 8.1017 15.71 8.29C15.8983 8.4783 16.0041 8.7337 16.0041 9C16.0041 9.2663 15.8983 9.5217 15.71 9.71L13.41 12L15.71 14.29Z" fill="#141414"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17ZM12 19C11.7033 19 11.4133 19.088 11.1666 19.2528C10.92 19.4176 10.7277 19.6519 10.6142 19.926C10.5006 20.2001 10.4709 20.5017 10.5288 20.7926C10.5867 21.0836 10.7296 21.3509 10.9393 21.5607C11.1491 21.7704 11.4164 21.9133 11.7074 21.9712C11.9983 22.0291 12.2999 21.9993 12.574 21.8858C12.8481 21.7723 13.0824 21.58 13.2472 21.3334C13.412 21.0867 13.5 20.7967 13.5 20.5C13.5 20.1022 13.342 19.7206 13.0607 19.4393C12.7794 19.158 12.3978 19 12 19Z" fill="#141414"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12.0947 1.61719C6.30473 1.61719 1.59473 6.32719 1.59473 12.1172C1.59473 17.9072 6.30473 22.6172 12.0947 22.6172C17.8847 22.6172 22.5947 17.9072 22.5947 12.1172C22.5947 6.32719 17.8847 1.61719 12.0947 1.61719ZM12.7797 15.9947C12.7797 16.3972 12.4547 16.7272 12.0572 16.7272H12.0022C11.6047 16.7272 11.2797 16.3997 11.2797 15.9947V15.9597C11.2797 15.5572 11.6047 15.2272 12.0022 15.2272H12.0572C12.4547 15.2272 12.7797 15.5547 12.7797 15.9597V15.9947ZM14.0597 11.7822C13.7197 12.1622 13.3122 12.4872 13.0197 12.9072C12.8672 13.1272 12.8572 13.0922 12.7622 13.3497C12.6847 13.5597 12.7322 13.8497 12.6222 14.0547C12.4447 14.3847 12.0772 14.4822 11.7272 14.3347C11.3172 14.1597 11.2547 13.7472 11.2822 13.3497C11.3122 12.8972 11.3822 12.7047 11.6072 12.3022C11.8222 11.9197 12.1397 11.6122 12.4422 11.3022C12.9522 10.7797 13.7222 9.86719 12.8897 9.23469C12.1572 8.67719 11.1622 9.08969 10.9647 9.94969C10.8747 10.3422 10.7447 10.6822 10.3522 10.8122C10.0597 10.9097 9.74723 10.8397 9.56473 10.5897C9.08473 9.93219 9.70223 8.75469 10.1897 8.26969C11.4372 7.02719 13.9297 7.33219 14.6047 9.03719C14.6022 9.03219 14.5997 9.02469 14.5972 9.01969C14.5797 8.97969 14.5722 8.95469 14.5697 8.94719C14.5722 8.95719 14.5847 8.98719 14.5972 9.01969C14.5997 9.02719 14.6022 9.02969 14.6047 9.03719C14.6247 9.08969 14.6347 9.11469 14.6372 9.12219C14.6322 9.10969 14.6197 9.07469 14.6047 9.03969C14.9997 10.0272 14.7522 11.0097 14.0597 11.7822Z" fill="#141414"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.00019 19.0002C8.86858 19.0009 8.73812 18.9757 8.61628 18.926C8.49444 18.8762 8.38363 18.8029 8.29018 18.7102L3.29019 13.7102C3.10188 13.5219 2.99609 13.2665 2.99609 13.0002C2.99609 12.7339 3.10188 12.4785 3.29019 12.2902C3.47849 12.1019 3.73388 11.9961 4.00019 11.9961C4.26649 11.9961 4.52188 12.1019 4.71019 12.2902L9.00019 16.5902L19.2902 6.29019C19.4785 6.10188 19.7339 5.99609 20.0002 5.99609C20.2665 5.99609 20.5219 6.10188 20.7102 6.29019C20.8985 6.47849 21.0043 6.73388 21.0043 7.00019C21.0043 7.26649 20.8985 7.52188 20.7102 7.71019L9.71019 18.7102C9.61674 18.8029 9.50593 18.8762 9.38409 18.926C9.26225 18.9757 9.13179 19.0009 9.00019 19.0002Z" fill="#141414"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM15.5 8C15.7967 8 16.0867 8.08797 16.3334 8.2528C16.58 8.41762 16.7723 8.65189 16.8858 8.92597C16.9994 9.20006 17.0291 9.50166 16.9712 9.79264C16.9133 10.0836 16.7704 10.3509 16.5607 10.5607C16.3509 10.7704 16.0836 10.9133 15.7926 10.9712C15.5017 11.0291 15.2001 10.9994 14.926 10.8858C14.6519 10.7723 14.4176 10.58 14.2528 10.3334C14.088 10.0867 14 9.79667 14 9.5C14 9.10218 14.158 8.72064 14.4393 8.43934C14.7206 8.15804 15.1022 8 15.5 8ZM8.5 8C8.79668 8 9.08669 8.08797 9.33336 8.2528C9.58003 8.41762 9.77229 8.65189 9.88582 8.92597C9.99936 9.20006 10.0291 9.50166 9.97118 9.79264C9.9133 10.0836 9.77044 10.3509 9.56066 10.5607C9.35089 10.7704 9.08361 10.9133 8.79264 10.9712C8.50167 11.0291 8.20007 10.9994 7.92598 10.8858C7.65189 10.7723 7.41762 10.58 7.2528 10.3334C7.08798 10.0867 7 9.79667 7 9.5C7 9.10218 7.15804 8.72064 7.43934 8.43934C7.72065 8.15804 8.10218 8 8.5 8ZM16.76 16.85C16.6038 16.9468 16.4238 16.9987 16.24 17C16.0701 17.0003 15.9028 16.9574 15.7541 16.8751C15.6054 16.7929 15.4801 16.6741 15.39 16.53C15.0302 15.9556 14.5304 15.482 13.9374 15.1537C13.3445 14.8254 12.6778 14.6532 12 14.6532C11.3222 14.6532 10.6555 14.8254 10.0626 15.1537C9.4696 15.482 8.96977 15.9556 8.61 16.53C8.54551 16.6512 8.45674 16.7579 8.34922 16.8433C8.2417 16.9287 8.11774 16.9911 7.98506 17.0265C7.85238 17.0619 7.71383 17.0696 7.57804 17.0492C7.44225 17.0287 7.31214 16.9805 7.1958 16.9075C7.07947 16.8345 6.97941 16.7384 6.90186 16.6251C6.82431 16.5117 6.77094 16.3836 6.74506 16.2488C6.71919 16.1139 6.72137 15.9752 6.75147 15.8412C6.78156 15.7072 6.83894 15.5808 6.92 15.47C7.46016 14.6106 8.20952 13.9022 9.09798 13.4112C9.98643 12.9203 10.9849 12.6627 12 12.6627C13.0151 12.6627 14.0136 12.9203 14.902 13.4112C15.7905 13.9022 16.5399 14.6106 17.08 15.47C17.1498 15.5816 17.1969 15.7058 17.2187 15.8356C17.2404 15.9654 17.2362 16.0982 17.2065 16.2264C17.1768 16.3546 17.122 16.4757 17.0454 16.5827C16.9688 16.6897 16.8718 16.7806 16.76 16.85Z" fill="#141414"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M21.3697 9.60947C21.2557 9.27681 21.0563 8.98217 20.7904 8.75405C20.5246 8.52594 20.2017 8.38337 19.8504 8.32635L15.6155 7.68003L13.7164 3.59303C13.5645 3.26988 13.3176 2.99424 13.0137 2.79464C12.7099 2.60455 12.3586 2.5 11.9977 2.5C11.6369 2.5 11.2856 2.60455 10.9817 2.79464C10.6779 2.98474 10.431 3.26037 10.2791 3.59303L8.37999 7.68003L4.10708 8.32635C3.76524 8.38337 3.43291 8.52594 3.16704 8.75405C2.90117 8.98217 2.70176 9.27681 2.58782 9.60947C2.48337 9.93263 2.47387 10.2843 2.54984 10.617C2.6258 10.9496 2.79672 11.2633 3.0341 11.5104L6.15808 14.723L5.41744 19.2757C5.36047 19.6274 5.40794 19.9885 5.54088 20.3117C5.67381 20.6349 5.9017 20.92 6.19606 21.1291C6.50941 21.3667 6.89872 21.4998 7.29752 21.5093C7.62986 21.5093 7.9527 21.4332 8.24706 21.2717L12.0357 19.1806L15.8244 21.2717C16.1092 21.4332 16.4416 21.5188 16.7739 21.5093C17.1727 21.5093 17.5525 21.3857 17.8754 21.1576C18.1602 20.9485 18.3881 20.6729 18.5305 20.3402C18.6635 20.0171 18.711 19.6559 18.654 19.3042L17.9133 14.7515L21.0373 11.5389C21.2652 11.2823 21.4076 10.9591 21.4741 10.617C21.5311 10.2748 21.4931 9.92312 21.3697 9.60947Z" fill="#141414"/>
3
+ </svg>