jfs-components 0.0.74 → 0.0.78

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 (146) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/lib/commonjs/components/Accordion/Accordion.js +55 -55
  3. package/lib/commonjs/components/ActionFooter/ActionFooter.js +193 -82
  4. package/lib/commonjs/components/Avatar/Avatar.js +20 -0
  5. package/lib/commonjs/components/Badge/Badge.js +23 -0
  6. package/lib/commonjs/components/Button/Button.js +37 -0
  7. package/lib/commonjs/components/Checkbox/Checkbox.js +21 -9
  8. package/lib/commonjs/components/DropdownInput/DropdownInput.js +30 -16
  9. package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +167 -0
  10. package/lib/commonjs/components/FormField/FormField.js +14 -1
  11. package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +355 -0
  12. package/lib/commonjs/components/IconButton/IconButton.js +20 -0
  13. package/lib/commonjs/components/Image/Image.js +26 -1
  14. package/lib/commonjs/components/ListItem/ListItem.js +25 -10
  15. package/lib/commonjs/components/LottiePlayer/LottiePlayer.js +116 -0
  16. package/lib/commonjs/components/LottiePlayer/LottiePlayer.web.js +82 -0
  17. package/lib/commonjs/components/LottiePlayer/loadNativeLottieView.js +74 -0
  18. package/lib/commonjs/components/LottiePlayer/loadWebLottieView.js +50 -0
  19. package/lib/commonjs/components/MessageField/MessageField.js +318 -0
  20. package/lib/commonjs/components/NavArrow/NavArrow.js +58 -17
  21. package/lib/commonjs/components/PageHero/PageHero.js +41 -5
  22. package/lib/commonjs/components/RechargeCard/RechargeCard.js +32 -17
  23. package/lib/commonjs/components/Stepper/Step.js +47 -60
  24. package/lib/commonjs/components/Stepper/StepLabel.js +40 -10
  25. package/lib/commonjs/components/Stepper/Stepper.js +15 -17
  26. package/lib/commonjs/components/SuggestiveSearch/SuggestiveSearch.js +487 -0
  27. package/lib/commonjs/components/Text/Text.js +31 -1
  28. package/lib/commonjs/components/TextInput/TextInput.js +16 -1
  29. package/lib/commonjs/components/Title/Title.js +10 -2
  30. package/lib/commonjs/components/index.js +35 -0
  31. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  32. package/lib/commonjs/icons/Icon.js +16 -0
  33. package/lib/commonjs/icons/registry.js +1 -1
  34. package/lib/commonjs/index.js +12 -0
  35. package/lib/commonjs/skeleton/Skeleton.js +234 -0
  36. package/lib/commonjs/skeleton/SkeletonGroup.js +140 -0
  37. package/lib/commonjs/skeleton/index.js +58 -0
  38. package/lib/commonjs/skeleton/shimmer-tokens.js +189 -0
  39. package/lib/commonjs/skeleton/useReducedMotion.js +64 -0
  40. package/lib/module/components/Accordion/Accordion.js +56 -56
  41. package/lib/module/components/ActionFooter/ActionFooter.js +193 -83
  42. package/lib/module/components/Avatar/Avatar.js +19 -0
  43. package/lib/module/components/Badge/Badge.js +23 -0
  44. package/lib/module/components/Button/Button.js +37 -0
  45. package/lib/module/components/Checkbox/Checkbox.js +22 -10
  46. package/lib/module/components/DropdownInput/DropdownInput.js +30 -16
  47. package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +161 -0
  48. package/lib/module/components/FormField/FormField.js +16 -3
  49. package/lib/module/components/FullscreenModal/FullscreenModal.js +350 -0
  50. package/lib/module/components/IconButton/IconButton.js +20 -0
  51. package/lib/module/components/Image/Image.js +25 -1
  52. package/lib/module/components/ListItem/ListItem.js +25 -10
  53. package/lib/module/components/LottiePlayer/LottiePlayer.js +111 -0
  54. package/lib/module/components/LottiePlayer/LottiePlayer.web.js +77 -0
  55. package/lib/module/components/LottiePlayer/loadNativeLottieView.js +69 -0
  56. package/lib/module/components/LottiePlayer/loadWebLottieView.js +45 -0
  57. package/lib/module/components/MessageField/MessageField.js +313 -0
  58. package/lib/module/components/NavArrow/NavArrow.js +59 -18
  59. package/lib/module/components/PageHero/PageHero.js +41 -5
  60. package/lib/module/components/RechargeCard/RechargeCard.js +33 -17
  61. package/lib/module/components/Stepper/Step.js +48 -61
  62. package/lib/module/components/Stepper/StepLabel.js +40 -10
  63. package/lib/module/components/Stepper/Stepper.js +15 -17
  64. package/lib/module/components/SuggestiveSearch/SuggestiveSearch.js +481 -0
  65. package/lib/module/components/Text/Text.js +31 -1
  66. package/lib/module/components/TextInput/TextInput.js +17 -2
  67. package/lib/module/components/Title/Title.js +10 -2
  68. package/lib/module/components/index.js +5 -0
  69. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  70. package/lib/module/icons/Icon.js +16 -0
  71. package/lib/module/icons/registry.js +1 -1
  72. package/lib/module/index.js +2 -1
  73. package/lib/module/skeleton/Skeleton.js +229 -0
  74. package/lib/module/skeleton/SkeletonGroup.js +133 -0
  75. package/lib/module/skeleton/index.js +6 -0
  76. package/lib/module/skeleton/shimmer-tokens.js +181 -0
  77. package/lib/module/skeleton/useReducedMotion.js +61 -0
  78. package/lib/typescript/src/components/Accordion/Accordion.d.ts +14 -20
  79. package/lib/typescript/src/components/ActionFooter/ActionFooter.d.ts +26 -21
  80. package/lib/typescript/src/components/Avatar/Avatar.d.ts +7 -1
  81. package/lib/typescript/src/components/Badge/Badge.d.ts +7 -1
  82. package/lib/typescript/src/components/Button/Button.d.ts +8 -1
  83. package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +63 -0
  84. package/lib/typescript/src/components/FullscreenModal/FullscreenModal.d.ts +99 -0
  85. package/lib/typescript/src/components/IconButton/IconButton.d.ts +7 -1
  86. package/lib/typescript/src/components/Image/Image.d.ts +8 -1
  87. package/lib/typescript/src/components/LottiePlayer/LottiePlayer.d.ts +85 -0
  88. package/lib/typescript/src/components/LottiePlayer/LottiePlayer.web.d.ts +28 -0
  89. package/lib/typescript/src/components/LottiePlayer/loadNativeLottieView.d.ts +11 -0
  90. package/lib/typescript/src/components/LottiePlayer/loadWebLottieView.d.ts +11 -0
  91. package/lib/typescript/src/components/MessageField/MessageField.d.ts +81 -0
  92. package/lib/typescript/src/components/NavArrow/NavArrow.d.ts +10 -5
  93. package/lib/typescript/src/components/PageHero/PageHero.d.ts +31 -5
  94. package/lib/typescript/src/components/Stepper/Step.d.ts +4 -1
  95. package/lib/typescript/src/components/Stepper/StepLabel.d.ts +4 -1
  96. package/lib/typescript/src/components/Stepper/Stepper.d.ts +3 -1
  97. package/lib/typescript/src/components/SuggestiveSearch/SuggestiveSearch.d.ts +123 -0
  98. package/lib/typescript/src/components/Text/Text.d.ts +20 -1
  99. package/lib/typescript/src/components/index.d.ts +8 -3
  100. package/lib/typescript/src/icons/Icon.d.ts +7 -1
  101. package/lib/typescript/src/icons/registry.d.ts +1 -1
  102. package/lib/typescript/src/index.d.ts +1 -0
  103. package/lib/typescript/src/skeleton/Skeleton.d.ts +60 -0
  104. package/lib/typescript/src/skeleton/SkeletonGroup.d.ts +78 -0
  105. package/lib/typescript/src/skeleton/index.d.ts +5 -0
  106. package/lib/typescript/src/skeleton/shimmer-tokens.d.ts +160 -0
  107. package/lib/typescript/src/skeleton/useReducedMotion.d.ts +15 -0
  108. package/package.json +11 -1
  109. package/src/components/Accordion/Accordion.tsx +113 -73
  110. package/src/components/ActionFooter/ActionFooter.tsx +210 -92
  111. package/src/components/Avatar/Avatar.tsx +26 -0
  112. package/src/components/Badge/Badge.tsx +27 -0
  113. package/src/components/Button/Button.tsx +40 -0
  114. package/src/components/Checkbox/Checkbox.tsx +22 -9
  115. package/src/components/DropdownInput/DropdownInput.tsx +67 -39
  116. package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +237 -0
  117. package/src/components/FormField/FormField.tsx +19 -3
  118. package/src/components/FullscreenModal/FullscreenModal.tsx +414 -0
  119. package/src/components/IconButton/IconButton.tsx +27 -0
  120. package/src/components/Image/Image.tsx +25 -0
  121. package/src/components/ListItem/ListItem.tsx +21 -10
  122. package/src/components/LottiePlayer/LottiePlayer.tsx +145 -0
  123. package/src/components/LottiePlayer/LottiePlayer.web.tsx +94 -0
  124. package/src/components/LottiePlayer/loadNativeLottieView.tsx +87 -0
  125. package/src/components/LottiePlayer/loadWebLottieView.tsx +64 -0
  126. package/src/components/MessageField/MessageField.tsx +543 -0
  127. package/src/components/NavArrow/NavArrow.tsx +81 -17
  128. package/src/components/PageHero/PageHero.tsx +61 -4
  129. package/src/components/RechargeCard/RechargeCard.tsx +32 -24
  130. package/src/components/Stepper/Step.tsx +52 -51
  131. package/src/components/Stepper/StepLabel.tsx +46 -9
  132. package/src/components/Stepper/Stepper.tsx +20 -15
  133. package/src/components/SuggestiveSearch/SuggestiveSearch.tsx +756 -0
  134. package/src/components/Text/Text.tsx +54 -0
  135. package/src/components/TextInput/TextInput.tsx +14 -1
  136. package/src/components/Title/Title.tsx +13 -2
  137. package/src/components/index.ts +8 -3
  138. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  139. package/src/icons/Icon.tsx +17 -0
  140. package/src/icons/registry.ts +1 -1
  141. package/src/index.ts +1 -0
  142. package/src/skeleton/Skeleton.tsx +298 -0
  143. package/src/skeleton/SkeletonGroup.tsx +193 -0
  144. package/src/skeleton/index.ts +10 -0
  145. package/src/skeleton/shimmer-tokens.ts +221 -0
  146. package/src/skeleton/useReducedMotion.ts +72 -0
@@ -7,7 +7,23 @@ import AvatarGroup from '../AvatarGroup/AvatarGroup';
7
7
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
8
8
  import { EMPTY_MODES } from '../../utils/react-utils';
9
9
  import MoneyValue from '../MoneyValue/MoneyValue';
10
+
11
+ // Defaults applied to the inner ButtonGroup so the card matches Figma out of
12
+ // the box. They are spread *before* the caller's `modes` so any consumer can
13
+ // override an individual key (e.g. swap the size to "M").
10
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const DEFAULT_BUTTON_GROUP_MODES = {
16
+ AppearanceBrand: 'Secondary',
17
+ 'Button / Size': 'S',
18
+ Emphasis: 'High'
19
+ };
20
+
21
+ // Defaults applied to the inner MoneyValue so the price renders at the
22
+ // 36 px / 900-weight scale defined for cards in Figma. Same merge rule as
23
+ // the button group — consumer `modes` override these.
24
+ const DEFAULT_MONEY_VALUE_MODES = {
25
+ Context3: 'Balance & Cards'
26
+ };
11
27
  /**
12
28
  * RechargeCard component implementation from Figma node 2235:937.
13
29
  * Displays a recharge plan with price, validity, data, and subscription details.
@@ -23,17 +39,19 @@ export default function RechargeCard({
23
39
  modes = EMPTY_MODES,
24
40
  style
25
41
  }) {
26
- // Container Tokens
27
- const backgroundColor = getVariableByName('rechargeCard/background', modes) || '#f6f3ff';
42
+ // Container Tokens (defaults mirror Figma node 2235:937).
43
+ const backgroundColor = getVariableByName('rechargeCard/background', modes) || '#ffffff';
28
44
  const paddingHorizontal = parseInt(getVariableByName('rechargeCard/padding/horizontal', modes) || 16, 10);
29
45
  const paddingVertical = parseInt(getVariableByName('rechargeCard/padding/vertical', modes) || 20, 10);
30
46
  const gap = parseInt(getVariableByName('rechargeCard/gap', modes) || 20, 10);
31
47
  const radius = parseInt(getVariableByName('rechargeCard/radius', modes) || 20, 10);
32
- const minWidth = parseInt(getVariableByName('rechargeCard/minWidth', modes) || 328, 10);
48
+ const minWidth = parseInt(getVariableByName('rechargeCard/minWidth', modes) || 312, 10);
49
+ const strokeWidth = parseInt(getVariableByName('rechargeCard/strokeWidth', modes) || 1, 10);
50
+ const strokeColor = getVariableByName('rechargeCard/stroke/color', modes) || '#ebebed';
33
51
 
34
52
  // Header Tokens
35
53
  const headerGap = parseInt(getVariableByName('rechargeCard/header/gap', modes) || 4, 10);
36
- const titleColor = getVariableByName('rechargeCard/title/color', modes) || '#13002d';
54
+ const titleColor = getVariableByName('rechargeCard/title/color', modes) || '#000000';
37
55
  const titleFontSize = parseInt(getVariableByName('rechargeCard/title/fontSize', modes) || 12, 10);
38
56
  const titleFontFamily = getVariableByName('rechargeCard/title/fontFamily', modes) || 'JioType Var';
39
57
  const titleLineHeight = parseInt(getVariableByName('rechargeCard/title/lineHeight', modes) || 14, 10);
@@ -44,30 +62,25 @@ export default function RechargeCard({
44
62
  const specItemGap = parseInt(getVariableByName('rechargeCard/specItem/gap', modes) || 4, 10);
45
63
 
46
64
  // Spec Label Tokens
47
- const specLabelColor = getVariableByName('rechargeCard/specItem/label/color', modes) || '#13002d';
65
+ const specLabelColor = getVariableByName('rechargeCard/specItem/label/color', modes) || '#000000';
48
66
  const specLabelFontSize = parseInt(getVariableByName('rechargeCard/specItem/label/fontSize', modes) || 12, 10);
49
67
  const specLabelFontFamily = getVariableByName('rechargeCard/specItem/label/fontFamily', modes) || 'JioType Var';
50
68
  const specLabelLineHeight = parseInt(getVariableByName('rechargeCard/specItem/label/lineHeight', modes) || 14, 10);
51
69
  const specLabelFontWeight = getVariableByName('rechargeCard/specItem/label/fontWeight', modes) || '500';
52
70
 
53
71
  // Spec Value Tokens
54
- const specValueColor = getVariableByName('rechargeCard/specItem/value/color', modes) || '#310064';
72
+ const specValueColor = getVariableByName('rechargeCard/specItem/value/color', modes) || '#000000';
55
73
  const specValueFontSize = parseInt(getVariableByName('rechargeCard/specItem/value/fontSize', modes) || 14, 10);
56
74
  const specValueFontFamily = getVariableByName('rechargeCard/specItem/value/fontFamily', modes) || 'JioType Var';
57
75
  const specValueLineHeight = parseInt(getVariableByName('rechargeCard/specItem/value/lineHeight', modes) || 17, 10);
58
76
  const specValueFontWeight = getVariableByName('rechargeCard/specItem/value/fontWeight', modes) || '500';
59
77
 
60
78
  // Disclaimer Tokens
61
- const disclaimerColor = getVariableByName('rechargeCard/disclaimer/color', modes) || '#22004a';
79
+ const disclaimerColor = getVariableByName('rechargeCard/disclaimer/color', modes) || '#000000';
62
80
  const disclaimerFontSize = parseInt(getVariableByName('rechargeCard/disclaimer/fontSize', modes) || 10, 10);
63
81
  const disclaimerFontFamily = getVariableByName('rechargeCard/disclaimer/fontFamily', modes) || 'JioType Var';
64
82
  const disclaimerLineHeight = parseInt(getVariableByName('rechargeCard/disclaimer/lineHeight', modes) || 13, 10);
65
83
  const disclaimerFontWeight = getVariableByName('rechargeCard/disclaimer/fontWeight', modes) || '400';
66
-
67
- // Button Group Tokens
68
- // Handled by ButtonGroup component directly
69
-
70
- // Helpers
71
84
  const resolveFontWeight = weight => typeof weight === 'number' ? weight.toString() : weight;
72
85
 
73
86
  // Pass modes to subscription children (e.g. AvatarGroup)
@@ -80,6 +93,8 @@ export default function RechargeCard({
80
93
  paddingVertical,
81
94
  gap,
82
95
  borderRadius: radius,
96
+ borderWidth: strokeWidth,
97
+ borderColor: strokeColor,
83
98
  minWidth,
84
99
  alignItems: 'flex-start'
85
100
  }, style],
@@ -100,7 +115,10 @@ export default function RechargeCard({
100
115
  }), /*#__PURE__*/_jsx(MoneyValue, {
101
116
  value: price,
102
117
  currency: "\u20B9",
103
- modes: modes
118
+ modes: {
119
+ ...DEFAULT_MONEY_VALUE_MODES,
120
+ ...modes
121
+ }
104
122
  })]
105
123
  }), /*#__PURE__*/_jsxs(View, {
106
124
  style: {
@@ -189,10 +207,8 @@ export default function RechargeCard({
189
207
  children: disclaimer
190
208
  }), /*#__PURE__*/_jsx(ButtonGroup, {
191
209
  modes: {
192
- ...modes,
193
- "Appearance.Brand": "Secondary",
194
- "Button / Size": "S",
195
- "Emphasis": "High"
210
+ ...DEFAULT_BUTTON_GROUP_MODES,
211
+ ...modes
196
212
  },
197
213
  children: actions
198
214
  })]
@@ -5,56 +5,52 @@ import { View, Text } from 'react-native';
5
5
  import Svg, { Path } from 'react-native-svg';
6
6
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
7
7
  import { StepLabel } from './StepLabel';
8
- import { EMPTY_MODES } from '../../utils/react-utils';
8
+ import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
9
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  export function Step({
11
11
  children,
12
12
  modes = EMPTY_MODES,
13
13
  style,
14
14
  index = 0,
15
+ showLine = true,
15
16
  connectorStyle,
16
17
  title,
17
18
  supportingText,
19
+ metaText,
18
20
  subtitle = true,
21
+ meta = true,
19
22
  status = 'number'
20
23
  }) {
21
- // Container styles
22
24
  const minHeight = Number(getVariableByName('steperItem/minHeight', modes)) || 52;
23
- const gap = Number(getVariableByName('steperItem/gap', modes)) || 8;
24
-
25
- // Indicator dimensions and styles
26
- const indicatorSize = Number(getVariableByName('stepIndicator/size', modes)) || 24;
25
+ const gap = Number(getVariableByName('steperItem/gap', modes)) || 16;
26
+ const indicatorSize = Number(getVariableByName('stepIndicator/size', modes)) || 36;
27
27
  const indicatorRadius = Number(getVariableByName('stepIndicator/radius', modes)) || 9999;
28
- const indicatorBg = getVariableByName('stepIndicator/background', modes) || '#5c00b5';
29
- const indicatorBorderColor = getVariableByName('stepIndicator/border/color', modes) || '#5c00b5';
28
+ const indicatorBg = getVariableByName('stepIndicator/background', modes) || '#5d00b5';
29
+ const indicatorBorderColor = getVariableByName('stepIndicator/border/color', modes) || '#5d00b5';
30
30
  const indicatorBorderSize = Number(getVariableByName('stepIndicator/border/size', modes)) || 1;
31
31
  const iconColor = getVariableByName('stepIndicator/icon/color', modes) || '#ffffff';
32
-
33
- // Label styles (for number)
32
+ const stepStatusSize = Number(getVariableByName('stepStatus/size', modes)) || 18;
34
33
  const labelFontSize = Number(getVariableByName('stepIndicator/label/fontSize', modes)) || 12;
35
34
  const labelFontFamily = getVariableByName('stepIndicator/label/fontFamily', modes) || undefined;
36
35
  const labelLineHeight = Number(getVariableByName('stepIndicator/label/lineHeight', modes)) || 14;
37
36
  const labelFontWeight = getVariableByName('stepIndicator/label/fontWeight', modes) || '500';
38
-
39
- // Vertical line styles
40
37
  const lineSize = Number(getVariableByName('steperItem/lineSize', modes)) || 2;
41
- const lineColor = getVariableByName('steperItem/line', modes) || '#5c00b5';
38
+ const lineColor = getVariableByName('steperItem/line', modes) || '#5d00b5';
42
39
  const badgeWrapGap = Number(getVariableByName('steperItem/badgeWrap/gap', modes)) || 2;
43
40
  const containerStyle = {
44
41
  flexDirection: 'row',
45
42
  minHeight,
43
+ gap,
46
44
  ...style
47
45
  };
48
-
49
- // FIX: This wrapper should NOT expand. It should be exact width of the indicator.
50
46
  const indicatorWrapperStyle = {
51
47
  flexDirection: 'column',
52
48
  alignItems: 'center',
53
49
  width: indicatorSize,
54
50
  flexGrow: 0,
55
- // Do NOT grow
56
51
  flexShrink: 0,
57
- gap: badgeWrapGap
52
+ gap: badgeWrapGap,
53
+ alignSelf: 'stretch'
58
54
  };
59
55
  const indicatorStyle = {
60
56
  width: indicatorSize,
@@ -67,6 +63,12 @@ export function Step({
67
63
  justifyContent: 'center',
68
64
  overflow: 'hidden'
69
65
  };
66
+ const stepStatusContainerStyle = {
67
+ width: stepStatusSize,
68
+ height: stepStatusSize,
69
+ alignItems: 'center',
70
+ justifyContent: 'center'
71
+ };
70
72
  const labelStyle = {
71
73
  color: iconColor,
72
74
  fontSize: labelFontSize,
@@ -75,24 +77,19 @@ export function Step({
75
77
  lineHeight: labelLineHeight,
76
78
  textAlign: 'center'
77
79
  };
78
-
79
- // Combine base line style with injected connectorStyle
80
80
  const lineStyle = {
81
81
  width: lineSize,
82
82
  backgroundColor: lineColor,
83
83
  flexGrow: 1,
84
- // Line should take up remaining vertical space in this column
85
- ...connectorStyle // Allow overriding display, color, etc.
84
+ minHeight: 1,
85
+ ...connectorStyle
86
86
  };
87
-
88
- // Helper for icons
89
87
  const renderIcon = () => {
90
88
  switch (status) {
91
89
  case 'complete':
92
- // Checkmark
93
90
  return /*#__PURE__*/_jsx(Svg, {
94
- width: 12,
95
- height: 12,
91
+ width: stepStatusSize,
92
+ height: stepStatusSize,
96
93
  viewBox: "0 0 24 24",
97
94
  fill: "none",
98
95
  children: /*#__PURE__*/_jsx(Path, {
@@ -104,10 +101,9 @@ export function Step({
104
101
  })
105
102
  });
106
103
  case 'error':
107
- // X mark
108
104
  return /*#__PURE__*/_jsx(Svg, {
109
- width: 12,
110
- height: 12,
105
+ width: stepStatusSize,
106
+ height: stepStatusSize,
111
107
  viewBox: "0 0 24 24",
112
108
  fill: "none",
113
109
  children: /*#__PURE__*/_jsx(Path, {
@@ -119,10 +115,9 @@ export function Step({
119
115
  })
120
116
  });
121
117
  case 'warning':
122
- // Exclamation / Triangle
123
118
  return /*#__PURE__*/_jsx(Svg, {
124
- width: 12,
125
- height: 12,
119
+ width: stepStatusSize,
120
+ height: stepStatusSize,
126
121
  viewBox: "0 0 24 24",
127
122
  fill: "none",
128
123
  children: /*#__PURE__*/_jsx(Path, {
@@ -141,46 +136,38 @@ export function Step({
141
136
  });
142
137
  }
143
138
  };
144
-
145
- // Clone children to pass modes if they are StepLabel
146
- const childrenWithProps = React.Children.map(children, child => {
147
- if (/*#__PURE__*/React.isValidElement(child)) {
148
- return /*#__PURE__*/React.cloneElement(child, {
149
- modes
150
- });
151
- }
152
- return child;
153
- });
154
-
155
- // Determine if we have content to pad
156
- // Default padding bottom to 16 if line is shown, but also respect connectorStyle display
157
- // If display is none, we probably don't want the padding bottom either.
158
- const isLineHidden = connectorStyle?.display === 'none';
159
- const contentPaddingBottom = isLineHidden ? 0 : 16;
139
+ const hasSlotChildren = React.Children.count(children) > 0;
160
140
  return /*#__PURE__*/_jsxs(View, {
161
141
  style: containerStyle,
162
142
  children: [/*#__PURE__*/_jsxs(View, {
163
143
  style: indicatorWrapperStyle,
164
144
  children: [/*#__PURE__*/_jsx(View, {
165
145
  style: indicatorStyle,
166
- children: renderIcon()
167
- }), /*#__PURE__*/_jsx(View, {
146
+ children: /*#__PURE__*/_jsx(View, {
147
+ style: stepStatusContainerStyle,
148
+ children: renderIcon()
149
+ })
150
+ }), showLine ? /*#__PURE__*/_jsx(View, {
168
151
  style: lineStyle
169
- })]
170
- }), /*#__PURE__*/_jsx(View, {
171
- style: {
172
- width: gap
173
- }
152
+ }) : null]
174
153
  }), /*#__PURE__*/_jsx(View, {
175
154
  style: {
176
- flex: 1,
177
- paddingBottom: contentPaddingBottom
155
+ flex: 1
178
156
  },
179
- children: title ? /*#__PURE__*/_jsx(StepLabel, {
180
- title: title,
181
- supportingText: subtitle ? supportingText || undefined : undefined,
157
+ children: hasSlotChildren ? cloneChildrenWithModes(children, modes) : /*#__PURE__*/_jsx(StepLabel, {
158
+ ...(title !== undefined ? {
159
+ title
160
+ } : {}),
161
+ ...(supportingText !== undefined ? {
162
+ supportingText
163
+ } : {}),
164
+ ...(metaText !== undefined ? {
165
+ metaText
166
+ } : {}),
167
+ subtitle: subtitle,
168
+ meta: meta,
182
169
  modes: modes
183
- }) : childrenWithProps
170
+ })
184
171
  })]
185
172
  });
186
173
  }
@@ -8,24 +8,42 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  export function StepLabel({
9
9
  title = 'Stepper Item',
10
10
  supportingText,
11
+ metaText,
12
+ subtitle = true,
13
+ meta = true,
11
14
  modes = EMPTY_MODES,
12
15
  style
13
16
  }) {
14
- // Title styles
15
17
  const titleColor = getVariableByName('steperItem/title/color', modes) || '#0d0d0f';
16
18
  const titleFontSize = Number(getVariableByName('steperItem/title/fontSize', modes)) || 14;
17
19
  const titleFontFamily = getVariableByName('steperItem/title/fontFamily', modes) || undefined;
18
20
  const titleLineHeight = Number(getVariableByName('steperItem/title/lineHeight', modes)) || 18;
19
21
  const titleFontWeight = getVariableByName('steperItem/title/fontWeight', modes) || '700';
20
22
 
21
- // Subtitle styles
22
- const subtitleColor = getVariableByName('steperItem/subtitle/color', modes) || '#3d4047';
23
- const subtitleFontSize = Number(getVariableByName('steperItem/subtitle/fontSize', modes)) || 12;
24
- const subtitleFontFamily = getVariableByName('steperItem/subtitle/fontFamily', modes) || undefined;
25
- const subtitleLineHeight = Number(getVariableByName('steperItem/subtitle/lineHeight', modes)) || 16;
26
- const subtitleFontWeight = getVariableByName('steperItem/subtitle/fontWeight', modes) || '400';
27
-
28
- // Layout gap
23
+ // The Subtitle (supportingText) and Meta both default to the "Neutral"
24
+ // AppearanceBrand. A caller-supplied `AppearanceBrand` still wins (it is
25
+ // spread after the default), so each remains overridable. The Title keeps
26
+ // its own appearance resolution.
27
+ const subtitleModes = {
28
+ AppearanceBrand: 'Neutral',
29
+ ...modes
30
+ };
31
+ const metaModes = {
32
+ AppearanceBrand: 'Neutral',
33
+ ...modes
34
+ };
35
+ const subtitleColor = getVariableByName('steperItem/subtitle/color', subtitleModes) || '#3d4047';
36
+ const subtitleFontSize = Number(getVariableByName('steperItem/subtitle/fontSize', subtitleModes)) || 12;
37
+ const subtitleFontFamily = getVariableByName('steperItem/subtitle/fontFamily', subtitleModes) || undefined;
38
+ const subtitleLineHeight = Number(getVariableByName('steperItem/subtitle/lineHeight', subtitleModes)) || 16;
39
+ const subtitleFontWeight = getVariableByName('steperItem/subtitle/fontWeight', subtitleModes) || '400';
40
+ const metaColor = getVariableByName('steperItem/meta/color', metaModes) || '#f7ab21';
41
+ const metaFontSize = Number(getVariableByName('steperItem/meta/fontSize', metaModes)) || 10;
42
+ // The Figma variable is authored as "fontFamily Copy" (with a space + suffix).
43
+ // Match the literal Figma name to avoid a missing-variable warning.
44
+ const metaFontFamily = getVariableByName('steperItem/meta/fontFamily Copy', metaModes) || undefined;
45
+ const metaLineHeight = Number(getVariableByName('steperItem/meta/lineHeight', metaModes)) || 12;
46
+ const metaFontWeight = getVariableByName('steperItem/meta/fontWeight', metaModes) || '700';
29
47
  const textGap = Number(getVariableByName('steperItem/textWrap/gap', modes)) || 2;
30
48
  const titleStyle = {
31
49
  color: titleColor,
@@ -41,6 +59,15 @@ export function StepLabel({
41
59
  fontWeight: subtitleFontWeight,
42
60
  lineHeight: subtitleLineHeight
43
61
  };
62
+ const metaStyle = {
63
+ color: metaColor,
64
+ fontSize: metaFontSize,
65
+ fontFamily: metaFontFamily,
66
+ fontWeight: metaFontWeight,
67
+ lineHeight: metaLineHeight
68
+ };
69
+ const showSubtitle = subtitle && !!supportingText;
70
+ const showMeta = meta && !!metaText;
44
71
  return /*#__PURE__*/_jsxs(View, {
45
72
  style: [{
46
73
  gap: textGap,
@@ -49,9 +76,12 @@ export function StepLabel({
49
76
  children: [/*#__PURE__*/_jsx(Text, {
50
77
  style: titleStyle,
51
78
  children: title
52
- }), supportingText ? /*#__PURE__*/_jsx(Text, {
79
+ }), showSubtitle ? /*#__PURE__*/_jsx(Text, {
53
80
  style: subtitleStyle,
54
81
  children: supportingText
82
+ }) : null, showMeta ? /*#__PURE__*/_jsx(Text, {
83
+ style: metaStyle,
84
+ children: metaText
55
85
  }) : null]
56
86
  });
57
87
  }
@@ -13,7 +13,6 @@ export default function Stepper({
13
13
  modes = EMPTY_MODES,
14
14
  style
15
15
  }) {
16
- // Stepper container styles
17
16
  const paddingHorizontal = Number(getVariableByName('stepper/padding/horizontal', modes)) || 8;
18
17
  const paddingVertical = Number(getVariableByName('stepper/padding/vertical', modes)) || 0;
19
18
  const gap = Number(getVariableByName('stepper/gap', modes)) || 2;
@@ -23,25 +22,24 @@ export default function Stepper({
23
22
  gap,
24
23
  ...style
25
24
  };
26
-
27
- // Inject index and connectorStyle logic into Step children
28
25
  const steps = React.Children.toArray(children);
29
- const childrenWithProps = steps.map((child, index) => {
30
- if (/*#__PURE__*/React.isValidElement(child)) {
31
- const isLast = index === steps.length - 1;
32
- return /*#__PURE__*/React.cloneElement(child, {
33
- index,
34
- modes,
35
- // Pass modes down
36
- connectorStyle: isLast ? {
37
- display: 'none'
38
- } : undefined
39
- });
40
- }
41
- return child;
26
+ const stepsWithProps = steps.map((child, stepIndex) => {
27
+ if (! /*#__PURE__*/React.isValidElement(child)) return child;
28
+ const isLast = stepIndex === steps.length - 1;
29
+ const childProps = child.props || {};
30
+ const childModes = childProps.modes ? {
31
+ ...modes,
32
+ ...childProps.modes
33
+ } : modes;
34
+ return /*#__PURE__*/React.cloneElement(child, {
35
+ ...childProps,
36
+ index: childProps.index ?? stepIndex,
37
+ modes: childModes,
38
+ showLine: childProps.showLine !== undefined ? childProps.showLine : !isLast
39
+ });
42
40
  });
43
41
  return /*#__PURE__*/_jsx(View, {
44
42
  style: containerStyle,
45
- children: childrenWithProps
43
+ children: stepsWithProps
46
44
  });
47
45
  }