jfs-components 0.0.72 → 0.0.74

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 (158) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/lib/commonjs/components/AccordionCheckbox/AccordionCheckbox.js +239 -0
  3. package/lib/commonjs/components/AccountCard/AccountCard.js +247 -0
  4. package/lib/commonjs/components/AppBar/AppBar.js +17 -11
  5. package/lib/commonjs/components/BrandChip/BrandChip.js +149 -0
  6. package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +229 -0
  7. package/lib/commonjs/components/CardInsight/CardInsight.js +166 -0
  8. package/lib/commonjs/components/CheckboxGroup/CheckboxGroup.js +67 -0
  9. package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +140 -0
  10. package/lib/commonjs/components/CircularProgressBar/CircularProgressBar.js +56 -9
  11. package/lib/commonjs/components/CoverageBarComparison/CoverageBarComparison.js +272 -0
  12. package/lib/commonjs/components/CoverageRing/CoverageRing.js +141 -0
  13. package/lib/commonjs/components/DonutChart/DonutChart.js +309 -0
  14. package/lib/commonjs/components/DonutChartSummary/DonutChartSummary.js +155 -0
  15. package/lib/commonjs/components/Dropdown/Dropdown.js +214 -0
  16. package/lib/commonjs/components/DropdownInput/DropdownInput.js +542 -0
  17. package/lib/commonjs/components/FormField/FormField.js +328 -178
  18. package/lib/commonjs/components/LinearMeter/LinearMeter.js +9 -28
  19. package/lib/commonjs/components/LinearProgress/LinearProgress.js +68 -0
  20. package/lib/commonjs/components/LottieIntroBlock/LottieIntroBlock.js +150 -0
  21. package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +95 -0
  22. package/lib/commonjs/components/MonthlyStatusGrid/MonthlyStatusGrid.js +286 -0
  23. package/lib/commonjs/components/OTP/OTP.js +381 -37
  24. package/lib/commonjs/components/PageHero/PageHero.js +153 -0
  25. package/lib/commonjs/components/PoweredByLabel/PoweredByLabel.js +135 -0
  26. package/lib/commonjs/components/PoweredByLabel/finvu.png +0 -0
  27. package/lib/commonjs/components/ProductOverview/ProductOverview.js +147 -0
  28. package/lib/commonjs/components/RangeTrack/RangeTrack.js +269 -0
  29. package/lib/commonjs/components/SavingsGoalSummary/SavingsGoalSummary.js +181 -0
  30. package/lib/commonjs/components/SegmentedTrack/SegmentedTrack.js +171 -0
  31. package/lib/commonjs/components/StatGroup/StatGroup.js +128 -0
  32. package/lib/commonjs/components/StatItem/StatItem.js +65 -35
  33. package/lib/commonjs/components/StrengthIndicator/StrengthIndicator.js +157 -0
  34. package/lib/commonjs/components/SummaryTile/SummaryTile.js +150 -0
  35. package/lib/commonjs/components/Text/Text.js +9 -2
  36. package/lib/commonjs/components/Tooltip/Tooltip.js +34 -27
  37. package/lib/commonjs/components/index.js +231 -1
  38. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  39. package/lib/commonjs/icons/registry.js +1 -1
  40. package/lib/commonjs/utils/index.js +7 -0
  41. package/lib/commonjs/utils/number-utils.js +57 -0
  42. package/lib/module/components/AccordionCheckbox/AccordionCheckbox.js +233 -0
  43. package/lib/module/components/AccountCard/AccountCard.js +241 -0
  44. package/lib/module/components/AppBar/AppBar.js +17 -11
  45. package/lib/module/components/BrandChip/BrandChip.js +143 -0
  46. package/lib/module/components/CardBankAccount/CardBankAccount.js +223 -0
  47. package/lib/module/components/CardInsight/CardInsight.js +161 -0
  48. package/lib/module/components/CheckboxGroup/CheckboxGroup.js +62 -0
  49. package/lib/module/components/CheckboxItem/CheckboxItem.js +134 -0
  50. package/lib/module/components/CircularProgressBar/CircularProgressBar.js +56 -9
  51. package/lib/module/components/CoverageBarComparison/CoverageBarComparison.js +266 -0
  52. package/lib/module/components/CoverageRing/CoverageRing.js +136 -0
  53. package/lib/module/components/DonutChart/DonutChart.js +303 -0
  54. package/lib/module/components/DonutChartSummary/DonutChartSummary.js +150 -0
  55. package/lib/module/components/Dropdown/Dropdown.js +206 -0
  56. package/lib/module/components/DropdownInput/DropdownInput.js +536 -0
  57. package/lib/module/components/FormField/FormField.js +330 -180
  58. package/lib/module/components/LinearMeter/LinearMeter.js +9 -28
  59. package/lib/module/components/LinearProgress/LinearProgress.js +63 -0
  60. package/lib/module/components/LottieIntroBlock/LottieIntroBlock.js +144 -0
  61. package/lib/module/components/MetricLegendItem/MetricLegendItem.js +90 -0
  62. package/lib/module/components/MonthlyStatusGrid/MonthlyStatusGrid.js +281 -0
  63. package/lib/module/components/OTP/OTP.js +381 -38
  64. package/lib/module/components/PageHero/PageHero.js +147 -0
  65. package/lib/module/components/PoweredByLabel/PoweredByLabel.js +130 -0
  66. package/lib/module/components/PoweredByLabel/finvu.png +0 -0
  67. package/lib/module/components/ProductOverview/ProductOverview.js +142 -0
  68. package/lib/module/components/RangeTrack/RangeTrack.js +263 -0
  69. package/lib/module/components/SavingsGoalSummary/SavingsGoalSummary.js +175 -0
  70. package/lib/module/components/SegmentedTrack/SegmentedTrack.js +166 -0
  71. package/lib/module/components/StatGroup/StatGroup.js +123 -0
  72. package/lib/module/components/StatItem/StatItem.js +66 -36
  73. package/lib/module/components/StrengthIndicator/StrengthIndicator.js +152 -0
  74. package/lib/module/components/SummaryTile/SummaryTile.js +145 -0
  75. package/lib/module/components/Text/Text.js +9 -2
  76. package/lib/module/components/Tooltip/Tooltip.js +34 -27
  77. package/lib/module/components/index.js +28 -2
  78. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  79. package/lib/module/icons/registry.js +1 -1
  80. package/lib/module/utils/index.js +2 -1
  81. package/lib/module/utils/number-utils.js +53 -0
  82. package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +71 -0
  83. package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +81 -0
  84. package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +43 -0
  85. package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +86 -0
  86. package/lib/typescript/src/components/CardInsight/CardInsight.d.ts +48 -0
  87. package/lib/typescript/src/components/CheckboxGroup/CheckboxGroup.d.ts +41 -0
  88. package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +72 -0
  89. package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +11 -1
  90. package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +105 -0
  91. package/lib/typescript/src/components/CoverageRing/CoverageRing.d.ts +90 -0
  92. package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +117 -0
  93. package/lib/typescript/src/components/DonutChartSummary/DonutChartSummary.d.ts +103 -0
  94. package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +62 -0
  95. package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +107 -0
  96. package/lib/typescript/src/components/FormField/FormField.d.ts +76 -19
  97. package/lib/typescript/src/components/LinearProgress/LinearProgress.d.ts +17 -0
  98. package/lib/typescript/src/components/LottieIntroBlock/LottieIntroBlock.d.ts +58 -0
  99. package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +37 -0
  100. package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +119 -0
  101. package/lib/typescript/src/components/OTP/OTP.d.ts +88 -2
  102. package/lib/typescript/src/components/PageHero/PageHero.d.ts +53 -0
  103. package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +70 -0
  104. package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +39 -0
  105. package/lib/typescript/src/components/RangeTrack/RangeTrack.d.ts +173 -0
  106. package/lib/typescript/src/components/SavingsGoalSummary/SavingsGoalSummary.d.ts +95 -0
  107. package/lib/typescript/src/components/SegmentedTrack/SegmentedTrack.d.ts +108 -0
  108. package/lib/typescript/src/components/StatGroup/StatGroup.d.ts +45 -0
  109. package/lib/typescript/src/components/StatItem/StatItem.d.ts +24 -7
  110. package/lib/typescript/src/components/StrengthIndicator/StrengthIndicator.d.ts +58 -0
  111. package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +60 -0
  112. package/lib/typescript/src/components/Text/Text.d.ts +12 -2
  113. package/lib/typescript/src/components/Tooltip/Tooltip.d.ts +13 -2
  114. package/lib/typescript/src/components/index.d.ts +29 -3
  115. package/lib/typescript/src/icons/registry.d.ts +1 -1
  116. package/lib/typescript/src/utils/index.d.ts +1 -0
  117. package/lib/typescript/src/utils/number-utils.d.ts +29 -0
  118. package/package.json +1 -3
  119. package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +323 -0
  120. package/src/components/AccountCard/AccountCard.tsx +376 -0
  121. package/src/components/AppBar/AppBar.tsx +25 -14
  122. package/src/components/BrandChip/BrandChip.tsx +235 -0
  123. package/src/components/CardBankAccount/CardBankAccount.tsx +321 -0
  124. package/src/components/CardInsight/CardInsight.tsx +239 -0
  125. package/src/components/CheckboxGroup/CheckboxGroup.tsx +86 -0
  126. package/src/components/CheckboxItem/CheckboxItem.tsx +209 -0
  127. package/src/components/CircularProgressBar/CircularProgressBar.tsx +74 -9
  128. package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +378 -0
  129. package/src/components/CoverageRing/CoverageRing.tsx +225 -0
  130. package/src/components/DonutChart/DonutChart.tsx +503 -0
  131. package/src/components/DonutChartSummary/DonutChartSummary.tsx +256 -0
  132. package/src/components/Dropdown/Dropdown.tsx +331 -0
  133. package/src/components/DropdownInput/DropdownInput.tsx +819 -0
  134. package/src/components/FormField/FormField.tsx +542 -215
  135. package/src/components/LinearMeter/LinearMeter.tsx +9 -39
  136. package/src/components/LinearProgress/LinearProgress.tsx +92 -0
  137. package/src/components/LottieIntroBlock/LottieIntroBlock.tsx +202 -0
  138. package/src/components/MetricLegendItem/MetricLegendItem.tsx +167 -0
  139. package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +438 -0
  140. package/src/components/OTP/OTP.tsx +476 -29
  141. package/src/components/PageHero/PageHero.tsx +200 -0
  142. package/src/components/PoweredByLabel/PoweredByLabel.tsx +221 -0
  143. package/src/components/PoweredByLabel/finvu.png +0 -0
  144. package/src/components/ProductOverview/ProductOverview.tsx +236 -0
  145. package/src/components/RangeTrack/RangeTrack.tsx +394 -0
  146. package/src/components/SavingsGoalSummary/SavingsGoalSummary.tsx +269 -0
  147. package/src/components/SegmentedTrack/SegmentedTrack.tsx +268 -0
  148. package/src/components/StatGroup/StatGroup.tsx +169 -0
  149. package/src/components/StatItem/StatItem.tsx +117 -40
  150. package/src/components/StrengthIndicator/StrengthIndicator.tsx +205 -0
  151. package/src/components/SummaryTile/SummaryTile.tsx +251 -0
  152. package/src/components/Text/Text.tsx +24 -3
  153. package/src/components/Tooltip/Tooltip.tsx +50 -25
  154. package/src/components/index.ts +47 -3
  155. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  156. package/src/icons/registry.ts +1 -1
  157. package/src/utils/index.ts +1 -0
  158. package/src/utils/number-utils.ts +60 -0
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ export type MetricLegendItemProps = {
4
+ /** The label text on the left (after the indicator). */
5
+ label?: React.ReactNode;
6
+ /**
7
+ * The value text shown on the right. When `undefined` or `null`, the
8
+ * value slot is hidden — matching the Figma `data` boolean toggle.
9
+ */
10
+ value?: React.ReactNode;
11
+ /**
12
+ * Override the indicator dot color. Falls back to the
13
+ * `metricLegendItem/indicator/bg` design token.
14
+ */
15
+ indicatorColor?: string;
16
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
17
+ modes?: Record<string, any>;
18
+ /** Override container styles. */
19
+ style?: StyleProp<ViewStyle>;
20
+ /** Override the indicator (dot) styles. */
21
+ indicatorStyle?: StyleProp<ViewStyle>;
22
+ /** Override the label text styles. */
23
+ labelStyle?: StyleProp<TextStyle>;
24
+ /** Override the value text styles. */
25
+ valueStyle?: StyleProp<TextStyle>;
26
+ };
27
+ /**
28
+ * MetricLegendItem renders a horizontal row consisting of a small colored
29
+ * indicator dot, a label and an optional value. It is used in chart legends
30
+ * and similar metric callouts.
31
+ *
32
+ * @component
33
+ * @param {MetricLegendItemProps} props
34
+ */
35
+ declare function MetricLegendItem({ label, value, indicatorColor, modes, style, indicatorStyle, labelStyle, valueStyle, }: MetricLegendItemProps): import("react/jsx-runtime").JSX.Element;
36
+ export default MetricLegendItem;
37
+ //# sourceMappingURL=MetricLegendItem.d.ts.map
@@ -0,0 +1,119 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ /**
4
+ * The three semantic states a calendar glyph can be in. Maps 1:1 to the
5
+ * Figma `Calendar Glyph State` collection modes (`Idle`, `notSaved`,
6
+ * `saved`) and drives both the glyph fill/foreground tokens and the
7
+ * matching legend dot.
8
+ */
9
+ export type MonthlyStatus = 'Idle' | 'notSaved' | 'saved';
10
+ /** One month entry in the grid. */
11
+ export type MonthlyStatusGridMonth = {
12
+ /** Stable React key. */
13
+ key?: React.Key;
14
+ /**
15
+ * Text rendered inside the glyph (e.g. `'Jan'`). When omitted, defaults
16
+ * to a 3-letter English month name based on the entry's index.
17
+ */
18
+ label?: React.ReactNode;
19
+ /**
20
+ * Semantic status. Drives the glyph background/foreground colors and the
21
+ * legend dot via the Figma `Calendar Glyph State` collection.
22
+ */
23
+ status: MonthlyStatus;
24
+ /**
25
+ * Per-month design token mode overrides. Merged on top of the parent
26
+ * `modes` and the per-month `Calendar Glyph State` derived from `status`.
27
+ */
28
+ modes?: Record<string, any>;
29
+ /** Per-month accessibility label. */
30
+ accessibilityLabel?: string;
31
+ };
32
+ export type MonthlyStatusGridProps = {
33
+ /**
34
+ * The months to render. Layout flows left-to-right, top-to-bottom into
35
+ * `columns` per row. Defaults to 12 `Idle` months (Jan…Dec) so the
36
+ * component renders something meaningful with no props.
37
+ */
38
+ months?: MonthlyStatusGridMonth[];
39
+ /**
40
+ * Number of glyphs per row. Default `4` (matching the Figma reference of
41
+ * 12 months × 4 columns = 3 rows).
42
+ */
43
+ columns?: number;
44
+ /**
45
+ * Override the legend labels. Pass `false` to hide the legend entirely.
46
+ * Missing keys fall back to the defaults: `No data`, `Not saved`,
47
+ * `Saved`.
48
+ */
49
+ legend?: false | Partial<Record<MonthlyStatus, React.ReactNode>>;
50
+ /**
51
+ * Restrict which legend entries are shown and in what order. Defaults to
52
+ * all three statuses in `[Idle, notSaved, saved]` order — matching the
53
+ * Figma reference.
54
+ */
55
+ legendStatuses?: MonthlyStatus[];
56
+ /** Design token modes (e.g. `{ 'Color Mode': 'Light' }`). */
57
+ modes?: Record<string, any>;
58
+ /** Container style override. */
59
+ style?: StyleProp<ViewStyle>;
60
+ /** Style applied to the months section (the rows wrapper). */
61
+ monthsStyle?: StyleProp<ViewStyle>;
62
+ /** Style applied to each row of glyphs. */
63
+ rowStyle?: StyleProp<ViewStyle>;
64
+ /** Style applied to every calendar glyph. */
65
+ glyphStyle?: StyleProp<ViewStyle>;
66
+ /** Style applied to the glyph label text. */
67
+ labelStyle?: StyleProp<TextStyle>;
68
+ /** Style applied to the legend row. */
69
+ legendStyle?: StyleProp<ViewStyle>;
70
+ /** Accessibility label for the entire component. */
71
+ accessibilityLabel?: string;
72
+ };
73
+ export type CalendarGlyphProps = {
74
+ /** Text rendered inside the glyph (e.g. `'Jan'`). */
75
+ label?: React.ReactNode;
76
+ /**
77
+ * Semantic status — drives the glyph fill/foreground via the Figma
78
+ * `Calendar Glyph State` collection.
79
+ */
80
+ status?: MonthlyStatus;
81
+ /** Design token mode overrides. */
82
+ modes?: Record<string, any>;
83
+ /** Container style override. */
84
+ style?: StyleProp<ViewStyle>;
85
+ /** Label text style override. */
86
+ labelStyle?: StyleProp<TextStyle>;
87
+ /** Accessibility label. Defaults to `"{label}, {status}"`. */
88
+ accessibilityLabel?: string;
89
+ };
90
+ /**
91
+ * Single calendar-month glyph: a small pill with a status-driven background
92
+ * and foreground, and a centered month label. Exposed for callers who want
93
+ * to compose glyphs themselves; most consumers should use
94
+ * {@link MonthlyStatusGrid} instead, which keeps the count, layout and
95
+ * legend in sync automatically.
96
+ */
97
+ declare function CalendarGlyph({ label, status, modes: propModes, style, labelStyle, accessibilityLabel, }: CalendarGlyphProps): import("react/jsx-runtime").JSX.Element;
98
+ /**
99
+ * `MonthlyStatusGrid` shows a year (or any contiguous range of months) as a
100
+ * grid of small pill-shaped calendar glyphs, each colored by its semantic
101
+ * status (`Idle` = "No data", `notSaved` = "Not saved", `saved` = "Saved").
102
+ * A legend below the grid explains the colors.
103
+ *
104
+ * Cohesiveness guarantees:
105
+ * - The number of glyphs is **always** `months.length`. There is no way to
106
+ * render a glyph that has no underlying status.
107
+ * - The legend dot color for a status is resolved through the **same**
108
+ * `calendarGlyph/background` token + `Calendar Glyph State` mode as the
109
+ * glyph itself, so the visual mapping cannot drift.
110
+ *
111
+ * The chart is rendered with plain RN primitives (`View` + `Text`); SVG is
112
+ * unnecessary here because the glyph shape is a simple rounded rectangle.
113
+ *
114
+ * @component
115
+ */
116
+ declare function MonthlyStatusGrid({ months, columns, legend, legendStatuses, modes: propModes, style, monthsStyle, rowStyle, glyphStyle, labelStyle, legendStyle, accessibilityLabel, }: MonthlyStatusGridProps): import("react/jsx-runtime").JSX.Element;
117
+ export { CalendarGlyph };
118
+ export default MonthlyStatusGrid;
119
+ //# sourceMappingURL=MonthlyStatusGrid.d.ts.map
@@ -1,6 +1,71 @@
1
1
  import React from 'react';
2
2
  import { type ViewStyle, type StyleProp } from 'react-native';
3
3
  import { type SupportTextProps } from '../SupportText/SupportText';
4
+ export type OtpResendState = 'counting' | 'ready' | 'sending';
5
+ export type UseOtpResendOptions = {
6
+ /** Countdown length in seconds. Defaults to 30. */
7
+ durationSeconds?: number | undefined;
8
+ /** Called when the user requests a resend. May return a Promise; while pending, state is 'sending'. */
9
+ onResend?: (() => void | Promise<void>) | undefined;
10
+ /** Whether the countdown should auto-start on mount. Defaults to true. */
11
+ autoStart?: boolean | undefined;
12
+ };
13
+ export type UseOtpResendReturn = {
14
+ state: OtpResendState;
15
+ /** Seconds remaining in the current countdown (0 when not counting). */
16
+ secondsLeft: number;
17
+ /** True while state === 'ready'. */
18
+ canResend: boolean;
19
+ /** True while state === 'sending'. */
20
+ isSending: boolean;
21
+ /**
22
+ * Trigger a resend. No-op unless state === 'ready'. Awaits onResend()
23
+ * before restarting the countdown. Re-throws any onResend rejection
24
+ * so callers can surface the failure (state returns to 'ready').
25
+ */
26
+ resend: () => Promise<void>;
27
+ /** Manually start (or restart) the countdown. */
28
+ restart: (durationSeconds?: number) => void;
29
+ /** Stop the countdown and move to 'ready' (without invoking onResend). */
30
+ skip: () => void;
31
+ };
32
+ /**
33
+ * Headless hook that drives an OTP resend countdown.
34
+ *
35
+ * The hook is intentionally UI-agnostic: it returns just enough state
36
+ * (`state`, `secondsLeft`, plus `resend()` / `restart()` / `skip()`) so
37
+ * consumers can render their own button, support text, etc. The bundled
38
+ * `OTPResend` component is the canonical UI on top of this hook.
39
+ */
40
+ export declare function useOtpResend({ durationSeconds, onResend, autoStart, }?: UseOtpResendOptions): UseOtpResendReturn;
41
+ export type OTPResendConfig = {
42
+ /** Countdown length in seconds. Defaults to 30. */
43
+ durationSeconds?: number;
44
+ /** Called when the user taps the resend button. May return a Promise. */
45
+ onResend?: () => void | Promise<void>;
46
+ /** Whether the countdown should auto-start on mount. Defaults to true. */
47
+ autoStart?: boolean;
48
+ /** Format the countdown line. Defaults to (s) => `Resend OTP in ${s}s`. */
49
+ formatCountdown?: (secondsLeft: number) => string;
50
+ /** Label shown in the 'sending' state. Defaults to "Sending…". */
51
+ sendingLabel?: string;
52
+ /** Label shown when ready to resend. Defaults to "Resend". */
53
+ resendLabel?: string;
54
+ /** SupportText status applied while counting. Defaults to "Loading" (clock icon). */
55
+ countdownStatus?: SupportTextProps['status'];
56
+ /**
57
+ * Mode overrides for the resend Button (in the 'ready' state). Merged
58
+ * on top of the component default of `{ AppearanceBrand: 'Neutral',
59
+ * 'Button / Size': 'S', Emphasis: 'Low' }`. Use this to swap to a
60
+ * different brand/size/emphasis without touching the rest of the UI.
61
+ */
62
+ resendButtonModes?: Record<string, any>;
63
+ };
64
+ export type OTPResendProps = OTPResendConfig & {
65
+ modes?: Record<string, any>;
66
+ style?: StyleProp<ViewStyle>;
67
+ };
68
+ export declare function OTPResend({ durationSeconds, onResend, autoStart, formatCountdown, sendingLabel, resendLabel, countdownStatus, resendButtonModes, modes: propModes, style, }: OTPResendProps): import("react/jsx-runtime").JSX.Element;
4
69
  export type OTPProps = {
5
70
  /** Number of OTP digits. Defaults to 6. */
6
71
  length?: number;
@@ -16,7 +81,7 @@ export type OTPProps = {
16
81
  onComplete?: (value: string) => void;
17
82
  /** Whether the OTP input is disabled. */
18
83
  isDisabled?: boolean;
19
- /** Whether the OTP input is in an invalid/error state. */
84
+ /** Whether the OTP input is in an invalid/error state. Drives underline colour and (optionally) the error message. */
20
85
  isInvalid?: boolean;
21
86
  /** Regex pattern to filter allowed characters. Defaults to digits only. */
22
87
  allowedPattern?: RegExp;
@@ -30,7 +95,28 @@ export type OTPProps = {
30
95
  supportText?: React.ReactNode;
31
96
  /** SupportText status when using the string shorthand. */
32
97
  supportTextStatus?: SupportTextProps['status'];
98
+ /**
99
+ * Convenience: shown beneath the slots **only** while `isInvalid` is true.
100
+ * Renders with status="Error" automatically. When omitted, the regular
101
+ * `supportText` is shown instead (with status promoted to Error).
102
+ */
103
+ errorMessage?: string;
104
+ /**
105
+ * When provided, replaces the support area with a managed countdown that
106
+ * decays into a "Resend" button. Hidden while `isInvalid` is true so the
107
+ * error message can take precedence.
108
+ */
109
+ resend?: OTPResendConfig;
110
+ /**
111
+ * Enable native one-time-code auto-fill on the underlying TextInput.
112
+ * On iOS this surfaces the SMS code in the QuickType bar above the
113
+ * keyboard (system-managed; no library required). On Android this sets
114
+ * `autoComplete="one-time-code"`, which the OS can auto-fill from
115
+ * notifications when the host app is wired up to the SMS Retriever or
116
+ * SMS User Consent APIs. Defaults to true.
117
+ */
118
+ enableSmsAutofill?: boolean;
33
119
  };
34
- declare function OTP({ length, value: controlledValue, defaultValue, onChange, onValueChange, onComplete, isDisabled, isInvalid, allowedPattern, autoFocus, modes: propModes, style, supportText, supportTextStatus, }: OTPProps): import("react/jsx-runtime").JSX.Element;
120
+ declare function OTP({ length, value: controlledValue, defaultValue, onChange, onValueChange, onComplete, isDisabled, isInvalid, allowedPattern, autoFocus, modes: propModes, style, supportText, supportTextStatus, errorMessage, resend, enableSmsAutofill, }: OTPProps): import("react/jsx-runtime").JSX.Element;
35
121
  export default OTP;
36
122
  //# sourceMappingURL=OTP.d.ts.map
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type PageHeroProps = {
4
+ /** Small eyebrow text shown above the headline. */
5
+ eyebrow?: string;
6
+ /** Main headline text. Centered and bold. */
7
+ headline?: string;
8
+ /** Optional supporting text shown below the headline. */
9
+ supportingText?: string;
10
+ /** Whether to render the supporting text. */
11
+ showSupportingText?: boolean;
12
+ /** Label for the default action button. Ignored when `buttonSlot` is provided. */
13
+ buttonLabel?: string;
14
+ /** Press handler for the default action button. Ignored when `buttonSlot` is provided. */
15
+ onButtonPress?: () => void;
16
+ /** Whether to render the default action button. Ignored when `buttonSlot` is provided. */
17
+ showButton?: boolean;
18
+ /**
19
+ * Optional slot to fully override the action button.
20
+ * When provided, `showButton`, `buttonLabel`, and `onButtonPress` are ignored.
21
+ * `modes` are automatically cascaded into this slot.
22
+ */
23
+ buttonSlot?: React.ReactNode;
24
+ /** Mode configuration for design-token theming. */
25
+ modes?: Record<string, any>;
26
+ /** Style overrides applied to the outer container. */
27
+ style?: StyleProp<ViewStyle>;
28
+ testID?: string;
29
+ };
30
+ /**
31
+ * PageHero displays a centered hero block typically used at the top of a page
32
+ * or feature screen. It contains an eyebrow line, a large headline, an optional
33
+ * supporting line (e.g. price/timeline), and an optional action button.
34
+ *
35
+ * All visual values are resolved from Figma design tokens via
36
+ * `getVariableByName`. The button slot cascades the active `modes` to its
37
+ * children through `cloneChildrenWithModes`.
38
+ *
39
+ * @component
40
+ * @example
41
+ * ```tsx
42
+ * <PageHero
43
+ * eyebrow="Upgrade to JioFinance+"
44
+ * headline="Resume earning cashback, extra points, and 1% gold"
45
+ * supportingText="₹999/year · ₹0 until 2027"
46
+ * buttonLabel="Renew for free"
47
+ * onButtonPress={() => navigate('Upgrade')}
48
+ * />
49
+ * ```
50
+ */
51
+ declare function PageHero({ eyebrow, headline, supportingText, showSupportingText, buttonLabel, onButtonPress, showButton, buttonSlot, modes: propModes, style, testID, }: PageHeroProps): import("react/jsx-runtime").JSX.Element;
52
+ export default PageHero;
53
+ //# sourceMappingURL=PageHero.d.ts.map
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import { type ImageStyle, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ import { type UnifiedSource } from '../../utils/MediaSource';
4
+ export type PoweredByLabelProps = {
5
+ /**
6
+ * Label copy. Defaults to "Powered by RBI-regulated account aggregator"
7
+ * to match the Figma reference.
8
+ */
9
+ label?: string;
10
+ /**
11
+ * Brand logo source. Accepts any {@link UnifiedSource} — remote URI, SVG
12
+ * XML string, `require()` asset, SVG React component, or React element.
13
+ * Defaults to the bundled FINVU logo so the component renders correctly
14
+ * without any caller-provided image.
15
+ *
16
+ * Ignored when `imageSlot` is provided.
17
+ */
18
+ imageSource?: UnifiedSource;
19
+ /**
20
+ * Rendered width of the logo in px. Defaults to `33` to match Figma.
21
+ */
22
+ imageWidth?: number;
23
+ /**
24
+ * Rendered height of the logo in px. Defaults to `12` to match Figma.
25
+ */
26
+ imageHeight?: number;
27
+ /**
28
+ * Replace the default `Image` entirely (e.g. with a vector logo,
29
+ * `BrandChip`, or custom layout). Receives `modes` recursively.
30
+ * Overrides `imageSource`.
31
+ */
32
+ imageSlot?: React.ReactNode;
33
+ /**
34
+ * Design token modes for theming (e.g. `{ 'Color Mode': 'Dark' }`).
35
+ */
36
+ modes?: Record<string, any>;
37
+ /** Container style override. */
38
+ style?: StyleProp<ViewStyle>;
39
+ /** Label text style override. */
40
+ textStyle?: StyleProp<TextStyle>;
41
+ /** Logo image style override (size/resize behaviour, etc.). */
42
+ imageStyle?: StyleProp<ImageStyle>;
43
+ /**
44
+ * Accessibility label. Defaults to the visible `label` so the brand image
45
+ * (which is decorative) does not need to be announced separately.
46
+ */
47
+ accessibilityLabel?: string;
48
+ };
49
+ /**
50
+ * `PoweredByLabel` renders the small "Powered by RBI-regulated account
51
+ * aggregator" badge with a trailing brand logo, used to attribute the
52
+ * underlying account-aggregator partner in flows such as bank-account
53
+ * linking and consent screens.
54
+ *
55
+ * The component is composed of:
56
+ *
57
+ * 1. A token-styled pill container (`poweredByLabel/background`,
58
+ * `poweredByLabel/padding/*`).
59
+ * 2. The disclosure copy rendered through the `poweredByLabel/*` typography
60
+ * tokens.
61
+ * 3. A configurable brand logo slot. Defaults to the bundled FINVU mark, but
62
+ * callers can pass any image via `imageSource` or fully replace the slot
63
+ * via `imageSlot`.
64
+ *
65
+ * @component
66
+ * @param {PoweredByLabelProps} props
67
+ */
68
+ declare function PoweredByLabel({ label, imageSource, imageWidth, imageHeight, imageSlot, modes: propModes, style, textStyle, imageStyle, accessibilityLabel, }: PoweredByLabelProps): import("react/jsx-runtime").JSX.Element;
69
+ export default PoweredByLabel;
70
+ //# sourceMappingURL=PoweredByLabel.d.ts.map
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle, type ImageSourcePropType } from 'react-native';
3
+ export type ProductOverviewStat = {
4
+ /** The large prominent value shown on top, e.g. "995", "3%". */
5
+ value: string;
6
+ /** The descriptive label rendered beneath the value, e.g. "Purity". */
7
+ label: string;
8
+ };
9
+ export type ProductOverviewProps = {
10
+ /** Hero image source rendered at the top of the card. */
11
+ imageSource?: ImageSourcePropType | string;
12
+ /** Aspect ratio for the hero image. Defaults to the Figma frame (288:170). */
13
+ imageRatio?: number;
14
+ /** Avatar source for the inline ProductLabel chip. */
15
+ labelImageSource?: ImageSourcePropType | string;
16
+ /** Text shown next to the avatar in the ProductLabel chip. */
17
+ label?: string;
18
+ /** The large product name, e.g. "0.5g Gold Coin". */
19
+ productName?: string;
20
+ /** The short multi-line description below the product name. */
21
+ description?: string;
22
+ /**
23
+ * Stats rendered in the bottom row. Each stat shows a large value above a
24
+ * smaller label. Pass an empty array (or `null`) to hide the row.
25
+ */
26
+ stats?: ProductOverviewStat[];
27
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
28
+ modes?: Record<string, any>;
29
+ /** Container style override. */
30
+ style?: StyleProp<ViewStyle>;
31
+ /**
32
+ * Custom slot rendered between the description and the stats row, useful
33
+ * for badges, callouts, etc. Receives the same `modes` as the parent.
34
+ */
35
+ children?: React.ReactNode;
36
+ };
37
+ declare const ProductOverview: ({ imageSource, imageRatio, labelImageSource, label, productName, description, stats, modes, style, children, }: ProductOverviewProps) => import("react/jsx-runtime").JSX.Element;
38
+ export default ProductOverview;
39
+ //# sourceMappingURL=ProductOverview.d.ts.map
@@ -0,0 +1,173 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ /**
4
+ * One row of data inside a `RangeTrack` tab.
5
+ *
6
+ * Each item drives BOTH a `SegmentedTrack` segment and the matching
7
+ * `MetricLegendItem` row, so the segment color and legend indicator
8
+ * always share the same color by construction (same `Emphasis / DataViz`
9
+ * cascade as the standalone `SegmentedTrack`).
10
+ */
11
+ export type RangeTrackItem = {
12
+ /** Stable React key. Falls back to the item label / index. */
13
+ key?: React.Key;
14
+ /** The descriptive label rendered next to the indicator dot. */
15
+ label?: React.ReactNode;
16
+ /**
17
+ * The data point — drives the segment's proportional width. Same
18
+ * semantics as `SegmentedTrackSegmentData.value`. When the legend's
19
+ * right-side text is shown, the resolution order is:
20
+ * `displayValue` → `formatValue(value)` → hide.
21
+ */
22
+ value: number;
23
+ /**
24
+ * Optional override for the legend row's right-side text. Falls
25
+ * back to `formatValue(value)` if a parent-level `formatValue` is
26
+ * provided; otherwise the value slot is hidden (matches the
27
+ * `data` boolean toggle on `MetricLegendItem`). Pass `null` or
28
+ * `false` to explicitly hide on a per-item basis.
29
+ */
30
+ displayValue?: React.ReactNode;
31
+ /**
32
+ * Hard-override the shared color used for both the segment and the
33
+ * legend indicator. Bypasses `dataViz/bg` token resolution.
34
+ */
35
+ color?: string;
36
+ /**
37
+ * Per-item design token mode overrides. Merged on top of parent
38
+ * `modes` and the per-index `Emphasis / DataViz` defaults
39
+ * (`High`, `Medium`, `Low`, then cycles).
40
+ */
41
+ modes?: Record<string, any>;
42
+ /** Accessibility label for the segment + legend row pairing. */
43
+ accessibilityLabel?: string;
44
+ };
45
+ /**
46
+ * One tab inside a `RangeTrack`. Each tab carries its own `items`
47
+ * array, which is the single source of truth for both the
48
+ * `SegmentedTrack` segments AND the `MetricLegendItem` legend rows
49
+ * rendered for that tab.
50
+ */
51
+ export type RangeTrackTab = {
52
+ /** Stable React key. Falls back to the tab label / index. */
53
+ key?: React.Key;
54
+ /** The label shown inside the `TabItem` at the top of the component. */
55
+ label: string;
56
+ /**
57
+ * Data-driven rows. Each entry produces one `SegmentedTrack`
58
+ * segment AND one matching `MetricLegendItem` legend row — the
59
+ * count of legend rows is locked in step with the count of segments
60
+ * by construction.
61
+ */
62
+ items: RangeTrackItem[];
63
+ /**
64
+ * Per-tab accessibility label for the tab item button. Falls back
65
+ * to `label`.
66
+ */
67
+ accessibilityLabel?: string;
68
+ };
69
+ export type RangeTrackProps = {
70
+ /**
71
+ * Tabs to render across the top. Each tab carries its own `items`
72
+ * array, which is the single source of truth for that tab's
73
+ * segments and legend rows. Switching tabs swaps both the segments
74
+ * and the legend together.
75
+ */
76
+ tabs: RangeTrackTab[];
77
+ /**
78
+ * Optional formatter applied to each item's numeric `value` when
79
+ * the item does not provide an explicit `displayValue`. Useful for
80
+ * the common "format every weight the same way" case
81
+ * (e.g. `(v) => `${v}%``). Applies to the legend rows of the
82
+ * currently active tab.
83
+ */
84
+ formatValue?: (value: number) => React.ReactNode;
85
+ /**
86
+ * Controlled active tab index. When provided, the component is
87
+ * fully controlled and `onTabChange` should be wired up. When
88
+ * `undefined`, the component manages the active tab internally
89
+ * starting from `defaultActiveTabIndex`.
90
+ */
91
+ activeTabIndex?: number;
92
+ /**
93
+ * Initial active tab index when the component is uncontrolled.
94
+ * Ignored if `activeTabIndex` is provided.
95
+ * @default 0
96
+ */
97
+ defaultActiveTabIndex?: number;
98
+ /**
99
+ * Fired when the user taps a tab. Receives the new index and the
100
+ * matching `RangeTrackTab` from the `tabs` array.
101
+ */
102
+ onTabChange?: (index: number, tab: RangeTrackTab) => void;
103
+ /**
104
+ * When true, the tab row scrolls horizontally — useful when there
105
+ * are many tabs.
106
+ * @default false
107
+ */
108
+ scrollableTabs?: boolean;
109
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
110
+ modes?: Record<string, any>;
111
+ /** Override the outer container styles. */
112
+ style?: StyleProp<ViewStyle>;
113
+ /** Override the tab row styles. */
114
+ tabsStyle?: StyleProp<ViewStyle>;
115
+ /** Override the `SegmentedTrack` styles. */
116
+ trackStyle?: StyleProp<ViewStyle>;
117
+ /** Override the legend list container styles. */
118
+ legendStyle?: StyleProp<ViewStyle>;
119
+ /** Accessibility label announced for the whole component. */
120
+ accessibilityLabel?: string;
121
+ };
122
+ /**
123
+ * `RangeTrack` pairs a tab row with a `SegmentedTrack` and a vertical
124
+ * stack of `MetricLegendItem` rows. Each tab carries its own `items`
125
+ * array which is the **single source of truth** for both the segments
126
+ * and the legend rows of that tab — every segment has exactly one
127
+ * legend row and they share the same color through the same
128
+ * `Emphasis / DataViz` cascade as the standalone `SegmentedTrack`.
129
+ *
130
+ * Switching tabs swaps the segments and the legend together so the
131
+ * two visualizations can never drift out of sync.
132
+ *
133
+ * The default 3-item layout per tab receives per-index
134
+ * `Emphasis / DataViz` defaults (item 1 → `High`, 2 → `Medium`, 3 →
135
+ * `Low`, then cycles). Override `Appearance / DataViz` on the parent
136
+ * `modes` to retheme the whole component, or set `modes` per item to
137
+ * remix.
138
+ *
139
+ * The component supports both **controlled** and **uncontrolled**
140
+ * tab selection — pass `activeTabIndex` + `onTabChange` for the
141
+ * controlled mode, or omit them and the component will manage the
142
+ * selection internally starting from `defaultActiveTabIndex`.
143
+ *
144
+ * @component
145
+ * @param {RangeTrackProps} props
146
+ *
147
+ * @example
148
+ * ```tsx
149
+ * <RangeTrack
150
+ * tabs={[
151
+ * {
152
+ * label: 'Sectoral',
153
+ * items: [
154
+ * { label: 'Large cap', value: 50, displayValue: '50%' },
155
+ * { label: 'Mid cap', value: 30, displayValue: '30%' },
156
+ * { label: 'Small cap', value: 20, displayValue: '20%' },
157
+ * ],
158
+ * },
159
+ * {
160
+ * label: 'Geography',
161
+ * items: [
162
+ * { label: 'India', value: 70, displayValue: '70%' },
163
+ * { label: 'US', value: 20, displayValue: '20%' },
164
+ * { label: 'Other', value: 10, displayValue: '10%' },
165
+ * ],
166
+ * },
167
+ * ]}
168
+ * />
169
+ * ```
170
+ */
171
+ declare function RangeTrack({ tabs, formatValue, activeTabIndex, defaultActiveTabIndex, onTabChange, scrollableTabs, modes: propModes, style, tabsStyle, trackStyle, legendStyle, accessibilityLabel, }: RangeTrackProps): import("react/jsx-runtime").JSX.Element;
172
+ export default RangeTrack;
173
+ //# sourceMappingURL=RangeTrack.d.ts.map