jfs-components 0.0.71 → 0.0.73

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 (141) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/lib/commonjs/components/AccordionCheckbox/AccordionCheckbox.js +239 -0
  3. package/lib/commonjs/components/BrandChip/BrandChip.js +149 -0
  4. package/lib/commonjs/components/CardAdvisory/CardAdvisory.js +2 -2
  5. package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +213 -0
  6. package/lib/commonjs/components/CardFinancialCondition/CardFinancialCondition.js +213 -0
  7. package/lib/commonjs/components/CardInsight/CardInsight.js +166 -0
  8. package/lib/commonjs/components/Carousel/Carousel.js +9 -7
  9. package/lib/commonjs/components/CheckboxGroup/CheckboxGroup.js +67 -0
  10. package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +125 -0
  11. package/lib/commonjs/components/CircularProgressBar/CircularProgressBar.js +56 -9
  12. package/lib/commonjs/components/CoverageBarComparison/CoverageBarComparison.js +272 -0
  13. package/lib/commonjs/components/CoverageRing/CoverageRing.js +141 -0
  14. package/lib/commonjs/components/DonutChart/DonutChart.js +309 -0
  15. package/lib/commonjs/components/DonutChartSummary/DonutChartSummary.js +155 -0
  16. package/lib/commonjs/components/HoldingsCard/HoldingsCard.js +2 -2
  17. package/lib/commonjs/components/InstitutionBadge/InstitutionBadge.js +132 -0
  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/MetricLegendItem/MetricLegendItem.js +95 -0
  21. package/lib/commonjs/components/MonthlyStatusGrid/MonthlyStatusGrid.js +286 -0
  22. package/lib/commonjs/components/OTP/OTP.js +381 -37
  23. package/lib/commonjs/components/ProductOverview/ProductOverview.js +147 -0
  24. package/lib/commonjs/components/Radio/Radio.js +194 -0
  25. package/lib/commonjs/components/RadioButton/RadioButton.js +21 -188
  26. package/lib/commonjs/components/RangeTrack/RangeTrack.js +269 -0
  27. package/lib/commonjs/components/SavingsGoalSummary/SavingsGoalSummary.js +181 -0
  28. package/lib/commonjs/components/SegmentedTrack/SegmentedTrack.js +171 -0
  29. package/lib/commonjs/components/StatGroup/StatGroup.js +128 -0
  30. package/lib/commonjs/components/StatItem/StatItem.js +65 -35
  31. package/lib/commonjs/components/StrengthIndicator/StrengthIndicator.js +157 -0
  32. package/lib/commonjs/components/SummaryTile/SummaryTile.js +150 -0
  33. package/lib/commonjs/components/index.js +192 -1
  34. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  35. package/lib/commonjs/icons/registry.js +1 -1
  36. package/lib/commonjs/utils/index.js +7 -0
  37. package/lib/commonjs/utils/number-utils.js +57 -0
  38. package/lib/module/components/AccordionCheckbox/AccordionCheckbox.js +233 -0
  39. package/lib/module/components/BrandChip/BrandChip.js +143 -0
  40. package/lib/module/components/CardAdvisory/CardAdvisory.js +2 -2
  41. package/lib/module/components/CardBankAccount/CardBankAccount.js +208 -0
  42. package/lib/module/components/CardFinancialCondition/CardFinancialCondition.js +207 -0
  43. package/lib/module/components/CardInsight/CardInsight.js +161 -0
  44. package/lib/module/components/Carousel/Carousel.js +9 -7
  45. package/lib/module/components/CheckboxGroup/CheckboxGroup.js +62 -0
  46. package/lib/module/components/CheckboxItem/CheckboxItem.js +119 -0
  47. package/lib/module/components/CircularProgressBar/CircularProgressBar.js +56 -9
  48. package/lib/module/components/CoverageBarComparison/CoverageBarComparison.js +266 -0
  49. package/lib/module/components/CoverageRing/CoverageRing.js +136 -0
  50. package/lib/module/components/DonutChart/DonutChart.js +303 -0
  51. package/lib/module/components/DonutChartSummary/DonutChartSummary.js +150 -0
  52. package/lib/module/components/HoldingsCard/HoldingsCard.js +2 -2
  53. package/lib/module/components/InstitutionBadge/InstitutionBadge.js +127 -0
  54. package/lib/module/components/LinearMeter/LinearMeter.js +9 -28
  55. package/lib/module/components/LinearProgress/LinearProgress.js +63 -0
  56. package/lib/module/components/MetricLegendItem/MetricLegendItem.js +90 -0
  57. package/lib/module/components/MonthlyStatusGrid/MonthlyStatusGrid.js +281 -0
  58. package/lib/module/components/OTP/OTP.js +381 -38
  59. package/lib/module/components/ProductOverview/ProductOverview.js +142 -0
  60. package/lib/module/components/Radio/Radio.js +188 -0
  61. package/lib/module/components/RadioButton/RadioButton.js +20 -185
  62. package/lib/module/components/RangeTrack/RangeTrack.js +263 -0
  63. package/lib/module/components/SavingsGoalSummary/SavingsGoalSummary.js +175 -0
  64. package/lib/module/components/SegmentedTrack/SegmentedTrack.js +166 -0
  65. package/lib/module/components/StatGroup/StatGroup.js +123 -0
  66. package/lib/module/components/StatItem/StatItem.js +66 -36
  67. package/lib/module/components/StrengthIndicator/StrengthIndicator.js +152 -0
  68. package/lib/module/components/SummaryTile/SummaryTile.js +145 -0
  69. package/lib/module/components/index.js +28 -1
  70. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  71. package/lib/module/icons/registry.js +1 -1
  72. package/lib/module/utils/index.js +2 -1
  73. package/lib/module/utils/number-utils.js +53 -0
  74. package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +71 -0
  75. package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +43 -0
  76. package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +79 -0
  77. package/lib/typescript/src/components/CardFinancialCondition/CardFinancialCondition.d.ts +50 -0
  78. package/lib/typescript/src/components/CardInsight/CardInsight.d.ts +48 -0
  79. package/lib/typescript/src/components/CheckboxGroup/CheckboxGroup.d.ts +41 -0
  80. package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +56 -0
  81. package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +11 -1
  82. package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +105 -0
  83. package/lib/typescript/src/components/CoverageRing/CoverageRing.d.ts +90 -0
  84. package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +117 -0
  85. package/lib/typescript/src/components/DonutChartSummary/DonutChartSummary.d.ts +103 -0
  86. package/lib/typescript/src/components/InstitutionBadge/InstitutionBadge.d.ts +30 -0
  87. package/lib/typescript/src/components/LinearProgress/LinearProgress.d.ts +17 -0
  88. package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +37 -0
  89. package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +119 -0
  90. package/lib/typescript/src/components/OTP/OTP.d.ts +88 -2
  91. package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +39 -0
  92. package/lib/typescript/src/components/Radio/Radio.d.ts +30 -0
  93. package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +20 -28
  94. package/lib/typescript/src/components/RangeTrack/RangeTrack.d.ts +173 -0
  95. package/lib/typescript/src/components/SavingsGoalSummary/SavingsGoalSummary.d.ts +95 -0
  96. package/lib/typescript/src/components/SegmentedTrack/SegmentedTrack.d.ts +108 -0
  97. package/lib/typescript/src/components/StatGroup/StatGroup.d.ts +45 -0
  98. package/lib/typescript/src/components/StatItem/StatItem.d.ts +24 -7
  99. package/lib/typescript/src/components/StrengthIndicator/StrengthIndicator.d.ts +58 -0
  100. package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +60 -0
  101. package/lib/typescript/src/components/index.d.ts +29 -2
  102. package/lib/typescript/src/icons/registry.d.ts +1 -1
  103. package/lib/typescript/src/utils/index.d.ts +1 -0
  104. package/lib/typescript/src/utils/number-utils.d.ts +29 -0
  105. package/package.json +1 -1
  106. package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +323 -0
  107. package/src/components/BrandChip/BrandChip.tsx +235 -0
  108. package/src/components/CardAdvisory/CardAdvisory.tsx +2 -2
  109. package/src/components/CardBankAccount/CardBankAccount.tsx +295 -0
  110. package/src/components/CardFinancialCondition/CardFinancialCondition.tsx +366 -0
  111. package/src/components/CardInsight/CardInsight.tsx +239 -0
  112. package/src/components/Carousel/Carousel.tsx +14 -6
  113. package/src/components/CheckboxGroup/CheckboxGroup.tsx +86 -0
  114. package/src/components/CheckboxItem/CheckboxItem.tsx +174 -0
  115. package/src/components/CircularProgressBar/CircularProgressBar.tsx +74 -9
  116. package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +378 -0
  117. package/src/components/CoverageRing/CoverageRing.tsx +225 -0
  118. package/src/components/DonutChart/DonutChart.tsx +503 -0
  119. package/src/components/DonutChartSummary/DonutChartSummary.tsx +256 -0
  120. package/src/components/HoldingsCard/HoldingsCard.tsx +2 -2
  121. package/src/components/InstitutionBadge/InstitutionBadge.tsx +216 -0
  122. package/src/components/LinearMeter/LinearMeter.tsx +9 -39
  123. package/src/components/LinearProgress/LinearProgress.tsx +92 -0
  124. package/src/components/MetricLegendItem/MetricLegendItem.tsx +167 -0
  125. package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +438 -0
  126. package/src/components/OTP/OTP.tsx +476 -29
  127. package/src/components/ProductOverview/ProductOverview.tsx +236 -0
  128. package/src/components/Radio/Radio.tsx +227 -0
  129. package/src/components/RadioButton/RadioButton.tsx +23 -225
  130. package/src/components/RangeTrack/RangeTrack.tsx +394 -0
  131. package/src/components/SavingsGoalSummary/SavingsGoalSummary.tsx +269 -0
  132. package/src/components/SegmentedTrack/SegmentedTrack.tsx +268 -0
  133. package/src/components/StatGroup/StatGroup.tsx +169 -0
  134. package/src/components/StatItem/StatItem.tsx +117 -40
  135. package/src/components/StrengthIndicator/StrengthIndicator.tsx +205 -0
  136. package/src/components/SummaryTile/SummaryTile.tsx +251 -0
  137. package/src/components/index.ts +39 -2
  138. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  139. package/src/icons/registry.ts +1 -1
  140. package/src/utils/index.ts +1 -0
  141. package/src/utils/number-utils.ts +60 -0
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  export { cloneChildrenWithModes, flattenChildren } from './react-utils';
4
- export { default as MediaSource } from './MediaSource';
4
+ export { default as MediaSource } from './MediaSource';
5
+ export { formatIndianNumber } from './number-utils';
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Format a number using the Indian numeric system.
5
+ *
6
+ * - Below 1 lakh (100,000): standard Indian-locale comma grouping (e.g. `12,400`).
7
+ * - 1 lakh up to (but excluding) 1 crore: shorthand `L` (e.g. `2.4L`).
8
+ * - 1 crore and above: shorthand `Cr` (e.g. `1.2Cr`).
9
+ *
10
+ * Trailing zero decimals are trimmed, so `100000` becomes `1L` rather than `1.0L`.
11
+ * Negative values keep the sign (`-2.4L`). Non-finite inputs (`NaN`, `Infinity`)
12
+ * are returned via `String(value)` so callers can decide how to handle them.
13
+ *
14
+ * @example formatIndianNumber(240000) // "2.4L"
15
+ * @example formatIndianNumber(12400) // "12,400"
16
+ * @example formatIndianNumber(15000000) // "1.5Cr"
17
+ * @example formatIndianNumber(-100000) // "-1L"
18
+ * @example formatIndianNumber(99999) // "99,999"
19
+ *
20
+ * @param value The number to format.
21
+ * @param options Optional formatting overrides.
22
+ * @param options.decimals Maximum number of decimal places used in the
23
+ * shorthand `L` / `Cr` form. Defaults to `1`.
24
+ * @param options.prefix String to prefix the output with — useful for a
25
+ * currency symbol, e.g. `'₹'`. Defaults to `''`.
26
+ */
27
+ export function formatIndianNumber(value, options = {}) {
28
+ if (!Number.isFinite(value)) return String(value);
29
+ const {
30
+ decimals = 1,
31
+ prefix = ''
32
+ } = options;
33
+ const sign = value < 0 ? '-' : '';
34
+ const absValue = Math.abs(value);
35
+ const CRORE = 10_000_000;
36
+ const LAKH = 100_000;
37
+ if (absValue >= CRORE) {
38
+ return `${sign}${prefix}${trimTrailingZeros((absValue / CRORE).toFixed(Math.max(0, decimals)))}Cr`;
39
+ }
40
+ if (absValue >= LAKH) {
41
+ return `${sign}${prefix}${trimTrailingZeros((absValue / LAKH).toFixed(Math.max(0, decimals)))}L`;
42
+ }
43
+
44
+ // For sub-lakh values, fall back to the native Indian comma grouping.
45
+ // `toLocaleString` with `en-IN` gives 1,23,456 — exactly what we want.
46
+ return `${prefix}${value.toLocaleString('en-IN', {
47
+ maximumFractionDigits: 0
48
+ })}`;
49
+ }
50
+ function trimTrailingZeros(numericString) {
51
+ if (!numericString.includes('.')) return numericString;
52
+ return numericString.replace(/\.?0+$/, '');
53
+ }
@@ -0,0 +1,71 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type AccordionCheckboxProps = {
4
+ /** Title shown next to the checkbox (e.g. "Axis Bank"). */
5
+ title?: string;
6
+ /** Subtitle shown beneath the title (e.g. "3 accounts"). */
7
+ subtitle?: string;
8
+ /** Initial expanded state (uncontrolled). Defaults to `false`. */
9
+ defaultExpanded?: boolean;
10
+ /** Controlled expanded state. When provided, the component becomes controlled. */
11
+ expanded?: boolean;
12
+ /** Callback fired whenever the expanded state changes. */
13
+ onExpandedChange?: (expanded: boolean) => void;
14
+ /** Initial checked state of the header checkbox (uncontrolled). */
15
+ defaultChecked?: boolean;
16
+ /** Controlled checked state of the header checkbox. */
17
+ checked?: boolean;
18
+ /** Callback fired whenever the header checkbox value changes. */
19
+ onCheckedChange?: (checked: boolean) => void;
20
+ /** Disables the entire component (header press + checkbox + content). */
21
+ disabled?: boolean;
22
+ /**
23
+ * Slot — content rendered below the divider when expanded. Typically a
24
+ * `CheckboxGroup` of child `CheckboxItem`s. The `modes` prop is forwarded
25
+ * recursively to every child.
26
+ */
27
+ children?: React.ReactNode;
28
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
29
+ modes?: Record<string, any>;
30
+ /** Override outer container styles. */
31
+ style?: StyleProp<ViewStyle>;
32
+ /** Accessibility label for the header press target. Defaults to `title`. */
33
+ accessibilityLabel?: string;
34
+ };
35
+ /**
36
+ * AccordionCheckbox composes a header (with a `Checkbox`, title, subtitle and
37
+ * chevron) and a collapsible content slot. It mirrors the Figma
38
+ * "Accordion Checkbox" component.
39
+ *
40
+ * Two independent interactions live inside the header:
41
+ * - **Pressing the checkbox** toggles the parent checked state via
42
+ * `onCheckedChange` (typically used for "select all" behaviour).
43
+ * - **Pressing anywhere else on the header** toggles the expanded state via
44
+ * `onExpandedChange`.
45
+ *
46
+ * When expanded, a divider is shown and `children` are rendered with `modes`
47
+ * automatically forwarded through `cloneChildrenWithModes`.
48
+ *
49
+ * @component
50
+ * @param {AccordionCheckboxProps} props
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * <AccordionCheckbox
55
+ * title="Axis Bank"
56
+ * subtitle="3 accounts"
57
+ * defaultExpanded
58
+ * defaultChecked
59
+ * modes={{ 'Color Mode': 'Light' }}
60
+ * >
61
+ * <CheckboxGroup>
62
+ * <CheckboxItem label="Fixed deposit • 0245" />
63
+ * <CheckboxItem label="Recurring deposit • 1182" />
64
+ * <CheckboxItem label="Mutual fund • Equity" />
65
+ * </CheckboxGroup>
66
+ * </AccordionCheckbox>
67
+ * ```
68
+ */
69
+ declare function AccordionCheckbox({ title, subtitle, defaultExpanded, expanded: controlledExpanded, onExpandedChange, defaultChecked, checked: controlledChecked, onCheckedChange, disabled, children, modes, style, accessibilityLabel, }: AccordionCheckboxProps): import("react/jsx-runtime").JSX.Element;
70
+ export default AccordionCheckbox;
71
+ //# sourceMappingURL=AccordionCheckbox.d.ts.map
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { type ImageSourcePropType, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ export type BrandChipProps = {
4
+ /** Visible label (e.g. `"Axis Bank • 0245"`). */
5
+ label?: string;
6
+ /**
7
+ * Image shown in the avatar. Forwarded to the underlying `Avatar`'s
8
+ * `imageSource` prop. Pass a `require()`-ed asset, an `{ uri }` object
9
+ * or a remote URL string. Ignored when `avatarSlot` is provided.
10
+ */
11
+ imageSource?: ImageSourcePropType | string;
12
+ /**
13
+ * Slot replacing the default `Avatar`. Receives `modes` recursively, so
14
+ * inner `Avatar` / `IconCapsule` instances inherit theming.
15
+ */
16
+ avatarSlot?: React.ReactNode;
17
+ /** Optional press handler — when provided, the chip becomes a `Pressable`. */
18
+ onPress?: () => void;
19
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
20
+ modes?: Record<string, any>;
21
+ /** Container style override. */
22
+ style?: StyleProp<ViewStyle>;
23
+ /** Label style override. */
24
+ labelStyle?: StyleProp<TextStyle>;
25
+ /** Accessibility label. Defaults to `label`. */
26
+ accessibilityLabel?: string;
27
+ };
28
+ /**
29
+ * `BrandChip` renders a compact pill that pairs a small institution avatar
30
+ * with a short identifier label (e.g. `"Axis Bank • 0245"`). It's typically
31
+ * used to surface the currently-selected linked account in headers, sticky
32
+ * bars, or selectors.
33
+ *
34
+ * All visual values resolve through the `brandChip/*` design tokens with
35
+ * sensible Figma defaults so the chip renders correctly out of the box.
36
+ *
37
+ * @component
38
+ * @param {BrandChipProps} props
39
+ */
40
+ declare function BrandChip({ label, imageSource, avatarSlot, onPress, modes: propModes, style, labelStyle, accessibilityLabel, }: BrandChipProps): import("react/jsx-runtime").JSX.Element;
41
+ declare const _default: React.MemoExoticComponent<typeof BrandChip>;
42
+ export default _default;
43
+ //# sourceMappingURL=BrandChip.d.ts.map
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import type { UnifiedSource } from '../../utils/MediaSource';
4
+ export type CardBankAccountItem = {
5
+ /** Left-aligned label text (e.g. "Account type"). */
6
+ label: string;
7
+ /**
8
+ * Right-aligned value. Strings render through the `text/*` design tokens.
9
+ * Pass any `ReactNode` to fully customise the value (e.g. obfuscated
10
+ * account numbers, masked dots, icons).
11
+ */
12
+ value: React.ReactNode;
13
+ };
14
+ export type CardBankAccountProps = {
15
+ /**
16
+ * Institution name shown in the header next to the avatar. Pass an empty
17
+ * string and `headerSlot` to fully replace the default header.
18
+ */
19
+ institutionName?: string;
20
+ /**
21
+ * Avatar source for the institution. Forwarded to the underlying
22
+ * `InstitutionBadge`. Accepts any {@link UnifiedSource}.
23
+ */
24
+ institutionAvatar?: UnifiedSource;
25
+ /**
26
+ * Header badge. Pass a string to render the default `Badge` with that
27
+ * label, or a custom `ReactNode` for full control. Pass `false`/`null`
28
+ * to hide the badge entirely.
29
+ */
30
+ badge?: React.ReactNode | string | false | null;
31
+ /**
32
+ * Override the entire header. When provided, replaces the default
33
+ * `InstitutionBadge` + `Badge` row.
34
+ */
35
+ headerSlot?: React.ReactNode;
36
+ /**
37
+ * Data rows shown in the middle. Each entry renders a left-aligned label
38
+ * and a right-aligned value. Defaults to three placeholder rows that
39
+ * match the Figma reference.
40
+ */
41
+ items?: CardBankAccountItem[];
42
+ /**
43
+ * Custom content slot rendered between the header and the footer.
44
+ * Overrides `items` when provided.
45
+ */
46
+ children?: React.ReactNode;
47
+ /** Footer button label. Ignored when `footer` is provided. */
48
+ buttonLabel?: string;
49
+ /** Footer button press handler. Ignored when `footer` is provided. */
50
+ onButtonPress?: () => void;
51
+ /**
52
+ * Override the footer. Pass a `ReactNode` for full control or
53
+ * `false`/`null` to hide it entirely.
54
+ */
55
+ footer?: React.ReactNode | false | null;
56
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
57
+ modes?: Record<string, any>;
58
+ /** Container style override. */
59
+ style?: StyleProp<ViewStyle>;
60
+ /** Accessibility label for the card region. */
61
+ accessibilityLabel?: string;
62
+ };
63
+ /**
64
+ * `CardBankAccount` renders a bank account summary card composed of:
65
+ *
66
+ * 1. A header with an `InstitutionBadge` (avatar + bank name) and an
67
+ * optional trailing `Badge`.
68
+ * 2. A configurable list of label/value rows describing the account.
69
+ * 3. A footer `Button` for the primary action.
70
+ *
71
+ * All values resolve through the `bankAccountCard/*` design tokens with
72
+ * sensible Figma defaults so the card renders correctly out of the box.
73
+ *
74
+ * @component
75
+ * @param {CardBankAccountProps} props
76
+ */
77
+ declare function CardBankAccount({ institutionName, institutionAvatar, badge, headerSlot, items, children, buttonLabel, onButtonPress, footer, modes, style, accessibilityLabel, }: CardBankAccountProps): import("react/jsx-runtime").JSX.Element;
78
+ export default CardBankAccount;
79
+ //# sourceMappingURL=CardBankAccount.d.ts.map
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { View, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ import { type CircularProgressBarProps } from '../CircularProgressBar/CircularProgressBar';
4
+ type CardFinancialConditionBaseProps = Omit<React.ComponentProps<typeof View>, 'children' | 'style'>;
5
+ export type CardFinancialConditionProps = CardFinancialConditionBaseProps & {
6
+ /** Title text shown in the header. */
7
+ title?: string;
8
+ /** Body / description shown below the title. */
9
+ body?: string;
10
+ /** Progress score for the circular indicator. Forwarded to CircularProgressBar. */
11
+ value?: number;
12
+ /** Visual state of the circular indicator. Forwarded to CircularProgressBar. */
13
+ progressState?: CircularProgressBarProps['state'];
14
+ /** Optional formatted value label for the active state. */
15
+ valueLabel?: string;
16
+ /** Show the bottom advisory nudge. */
17
+ showNudge?: boolean;
18
+ /** Body text for the default nudge. Use `\n` to add a second line. */
19
+ nudgeBody?: string;
20
+ /** Show the bottom divider above the action button. */
21
+ showDivider?: boolean;
22
+ /** Show the action button at the bottom of the card. */
23
+ showButton?: boolean;
24
+ /** Label for the default action button. */
25
+ buttonLabel?: string;
26
+ /** Callback for the default action button press. */
27
+ onPressButton?: () => void;
28
+ /** Slot replacing the default circular progress bar. Receives `modes` recursively. */
29
+ progressSlot?: React.ReactNode;
30
+ /** Slot replacing the default Nudge. Receives `modes` recursively. */
31
+ nudgeSlot?: React.ReactNode;
32
+ /** Slot replacing the default action button. Receives `modes` recursively. */
33
+ buttonSlot?: React.ReactNode;
34
+ /** Design token modes forwarded to token lookups and child components. */
35
+ modes?: Record<string, any>;
36
+ /** Container style override. */
37
+ style?: StyleProp<ViewStyle>;
38
+ /** Header row style override. */
39
+ headerStyle?: StyleProp<ViewStyle>;
40
+ /** Title text style override. */
41
+ titleStyle?: StyleProp<TextStyle>;
42
+ /** Body text style override. */
43
+ bodyStyle?: StyleProp<TextStyle>;
44
+ /** Accessibility label for the whole card. */
45
+ accessibilityLabel?: string;
46
+ };
47
+ declare function CardFinancialCondition({ title, body, value, progressState, valueLabel, showNudge, nudgeBody, showDivider, showButton, buttonLabel, onPressButton, progressSlot, nudgeSlot, buttonSlot, modes: propModes, style, headerStyle, titleStyle, bodyStyle, accessibilityLabel, ...rest }: CardFinancialConditionProps): import("react/jsx-runtime").JSX.Element;
48
+ declare const _default: React.MemoExoticComponent<typeof CardFinancialCondition>;
49
+ export default _default;
50
+ //# sourceMappingURL=CardFinancialCondition.d.ts.map
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type CardInsightProps = {
4
+ /** Card title rendered in the header (left of the badge). */
5
+ title?: string;
6
+ /** One-line explanation rendered under the title. */
7
+ subtitle?: string;
8
+ /**
9
+ * Header badge. Pass a string to render the default `Badge` with that
10
+ * label, or a custom `ReactNode` for full control. Pass `false` or
11
+ * `null` to hide the badge entirely.
12
+ */
13
+ badge?: React.ReactNode | string | false;
14
+ /**
15
+ * Main content slot. Defaults to a `SavingsGoalSummary` to match the
16
+ * Figma reference. Pass any `ReactNode` to override.
17
+ */
18
+ children?: React.ReactNode;
19
+ /**
20
+ * Footer Nudge. Pass a `ReactNode` to override the default inline-compact
21
+ * `Nudge`, or `false`/`null` to hide it.
22
+ */
23
+ footer?: React.ReactNode | false;
24
+ /**
25
+ * Whether to render a `Divider` between the content slot and the footer.
26
+ * Defaults to `true` whenever a footer is shown. Pass `false` to hide it,
27
+ * or a custom `ReactNode` to override.
28
+ */
29
+ divider?: React.ReactNode | boolean;
30
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
31
+ modes?: Record<string, any>;
32
+ /** Override container styles. */
33
+ style?: StyleProp<ViewStyle>;
34
+ };
35
+ /**
36
+ * `CardInsight` renders a single insight card composed of:
37
+ *
38
+ * 1. A header with a title, subtitle and a trailing `Badge`.
39
+ * 2. A flexible content slot — defaults to `SavingsGoalSummary`.
40
+ * 3. A `Divider` separating the slot from the footer.
41
+ * 4. A footer slot — defaults to an inline-compact `Nudge`.
42
+ *
43
+ * @component
44
+ * @param {CardInsightProps} props
45
+ */
46
+ declare function CardInsight({ title, subtitle, badge, children, footer, divider, modes, style, }: CardInsightProps): import("react/jsx-runtime").JSX.Element;
47
+ export default CardInsight;
48
+ //# sourceMappingURL=CardInsight.d.ts.map
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export type CheckboxGroupProps = {
4
+ /**
5
+ * Slot — a list of `CheckboxItem` (or compatible) elements to render inside
6
+ * the group. The `modes` prop is automatically forwarded to each child.
7
+ *
8
+ * When omitted, three default placeholder `CheckboxItem`s are rendered to
9
+ * mirror the Figma reference for the empty/initial state.
10
+ */
11
+ children?: React.ReactNode;
12
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
13
+ modes?: Record<string, any>;
14
+ /** Override container styles. */
15
+ style?: StyleProp<ViewStyle>;
16
+ /** Accessibility label for the surrounding group. */
17
+ accessibilityLabel?: string;
18
+ };
19
+ /**
20
+ * CheckboxGroup composes a vertical stack of `CheckboxItem`s. Spacing and
21
+ * padding are driven by the `checkboxGroup/*` design tokens so groups stay
22
+ * visually consistent across screens.
23
+ *
24
+ * The `modes` prop is forwarded recursively to all children — including
25
+ * `CheckboxItem`s and any element rendered inside their `endSlot`.
26
+ *
27
+ * @component
28
+ * @param {CheckboxGroupProps} props
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * <CheckboxGroup modes={{ 'Color Mode': 'Light' }}>
33
+ * <CheckboxItem label="Fixed deposit • 0245" />
34
+ * <CheckboxItem label="Recurring deposit • 1182" />
35
+ * <CheckboxItem label="Mutual fund • Equity" />
36
+ * </CheckboxGroup>
37
+ * ```
38
+ */
39
+ declare function CheckboxGroup({ children, modes, style, accessibilityLabel, }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
40
+ export default CheckboxGroup;
41
+ //# sourceMappingURL=CheckboxGroup.d.ts.map
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ export type CheckboxItemProps = {
4
+ /** Whether the checkbox is checked (controlled). */
5
+ checked?: boolean;
6
+ /** Initial checked state (uncontrolled). */
7
+ defaultChecked?: boolean;
8
+ /** Callback fired when the checked state changes. */
9
+ onValueChange?: (checked: boolean) => void;
10
+ /** Whether the row is disabled — both the checkbox and row press handler are disabled. */
11
+ disabled?: boolean;
12
+ /** The label text rendered next to the checkbox. */
13
+ label?: React.ReactNode;
14
+ /**
15
+ * Optional content rendered on the right side (e.g. a `Button`). When provided,
16
+ * it receives the same `modes` as the parent. Wrapped in a fixed-width container
17
+ * matching the Figma `endSlot` design.
18
+ */
19
+ endSlot?: React.ReactNode;
20
+ /** Width of the end slot container in pixels. Defaults to 80 to match the Figma reference. */
21
+ endSlotWidth?: number;
22
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
23
+ modes?: Record<string, any>;
24
+ /** Override container styles. */
25
+ style?: StyleProp<ViewStyle>;
26
+ /** Override the label text styles. */
27
+ labelStyle?: StyleProp<TextStyle>;
28
+ /** Accessibility label for screen readers. Defaults to the `label` prop when it is a string. */
29
+ accessibilityLabel?: string;
30
+ };
31
+ /**
32
+ * CheckboxItem composes a `Checkbox`, a label and an optional `endSlot` into a
33
+ * single horizontal pressable row. Pressing anywhere on the row (outside of the
34
+ * `endSlot`) toggles the checkbox, mirroring the typical native form pattern.
35
+ *
36
+ * Mirrors the Figma "Checkbox Item" component and uses the `checkboxItem/*`
37
+ * design tokens for typography and spacing.
38
+ *
39
+ * @component
40
+ * @param {CheckboxItemProps} props
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * const [checked, setChecked] = useState(false)
45
+ *
46
+ * <CheckboxItem
47
+ * label="Fixed deposit • 0245"
48
+ * checked={checked}
49
+ * onValueChange={setChecked}
50
+ * modes={{ 'Color Mode': 'Light' }}
51
+ * />
52
+ * ```
53
+ */
54
+ declare function CheckboxItem({ checked: controlledChecked, defaultChecked, onValueChange, disabled, label, endSlot, endSlotWidth, modes, style, labelStyle, accessibilityLabel, }: CheckboxItemProps): import("react/jsx-runtime").JSX.Element;
55
+ export default CheckboxItem;
56
+ //# sourceMappingURL=CheckboxItem.d.ts.map
@@ -9,6 +9,14 @@ export type CircularProgressBarProps = CircularProgressBarBaseProps & {
9
9
  state?: CircularProgressBarState | boolean;
10
10
  /** Optional formatted value shown in the active state. */
11
11
  valueLabel?: string;
12
+ /**
13
+ * Optional small label rendered above the value inside the ring. Useful for
14
+ * sizes that have enough room for both a caption and a value (e.g. the
15
+ * `circularProgressBar Size: M` mode from Figma). When omitted, only the
16
+ * value is shown — keeping the default S-size compatible with existing
17
+ * callers.
18
+ */
19
+ supportText?: string;
12
20
  /** Design token modes forwarded to token lookups. */
13
21
  modes?: Record<string, any>;
14
22
  /** Container style override. */
@@ -19,9 +27,11 @@ export type CircularProgressBarProps = CircularProgressBarBaseProps & {
19
27
  progressStyle?: StyleProp<ViewStyle>;
20
28
  /** Value text style override. */
21
29
  valueStyle?: StyleProp<TextStyle>;
30
+ /** Support text style override. */
31
+ supportTextStyle?: StyleProp<TextStyle>;
22
32
  /** Accessibility label for the whole progress component. */
23
33
  accessibilityLabel?: string;
24
34
  };
25
- declare function CircularProgressBar({ value, state, valueLabel, modes: propModes, style, trackStyle, progressStyle, valueStyle, accessibilityLabel, ...rest }: CircularProgressBarProps): import("react/jsx-runtime").JSX.Element;
35
+ declare function CircularProgressBar({ value, state, valueLabel, supportText, modes: propModes, style, trackStyle, progressStyle, valueStyle, supportTextStyle, accessibilityLabel, ...rest }: CircularProgressBarProps): import("react/jsx-runtime").JSX.Element;
26
36
  export default CircularProgressBar;
27
37
  //# sourceMappingURL=CircularProgressBar.d.ts.map
@@ -0,0 +1,105 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ /**
4
+ * One entry in the {@link CoverageBarComparisonProps.bars} array.
5
+ *
6
+ * Each entry carries **both** the bar's data and its legend label, so the
7
+ * number of bars is intrinsically equal to the number of legend items.
8
+ * There is no separate `legends` prop — that is by design.
9
+ */
10
+ export type CoverageBarComparisonItem = {
11
+ /** Stable React key. */
12
+ key?: React.Key;
13
+ /**
14
+ * Numeric value used to scale the bar height proportionally. Bars share
15
+ * the chart area; the largest value (or {@link CoverageBarComparisonProps.max})
16
+ * fills the full bar area, smaller bars are proportionally shorter.
17
+ */
18
+ value: number;
19
+ /**
20
+ * Text rendered above the bar (the Figma `Header` slot, e.g. `"₹1L (40%)"`).
21
+ * Omit to hide the header for this bar.
22
+ */
23
+ label?: React.ReactNode;
24
+ /**
25
+ * Legend label rendered below the chart for this bar. Required: the legend
26
+ * row always has exactly one item per bar.
27
+ */
28
+ legend: React.ReactNode;
29
+ /**
30
+ * Optional value text shown on the right of the legend (e.g. `"₹12,400"`).
31
+ * When omitted the legend renders only the colored dot + label.
32
+ */
33
+ legendValue?: React.ReactNode;
34
+ /**
35
+ * Hard-override the bar fill color. Bypasses `valueBar/bar/background`
36
+ * resolution entirely — and is also used for the legend indicator dot, so
37
+ * the bar and its legend stay in sync.
38
+ */
39
+ color?: string;
40
+ /**
41
+ * Per-bar design token mode overrides. Merged on top of the parent `modes`
42
+ * and the per-index `Emphasis / DataViz` defaults injected by the parent.
43
+ */
44
+ modes?: Record<string, any>;
45
+ /** Per-bar accessibility label. */
46
+ accessibilityLabel?: string;
47
+ };
48
+ export type CoverageBarComparisonProps = {
49
+ /**
50
+ * The bars to render. Each entry contains the value, the bar header label
51
+ * **and** the legend label, so the chart and the legend can never go out of
52
+ * sync. Defaults to a 2-item "Current vs Recommended" example matching the
53
+ * Figma reference.
54
+ */
55
+ bars?: CoverageBarComparisonItem[];
56
+ /**
57
+ * Maximum value used to scale the bars. Defaults to the largest
58
+ * `bars[i].value`. Pass an explicit `max` when bars represent absolute
59
+ * numbers and you want a fixed scale (e.g. `max=100` for percentages).
60
+ */
61
+ max?: number;
62
+ /**
63
+ * Total height of the bar visualization area in px (includes the per-bar
64
+ * header label space). The largest bar fills `height - labelHeight - gap`.
65
+ * Default: `100`.
66
+ */
67
+ height?: number;
68
+ /**
69
+ * Vertical gap (px) between the chart and the legend row. Default: `12`,
70
+ * matching the Figma reference.
71
+ */
72
+ legendGap?: number;
73
+ /** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
74
+ modes?: Record<string, any>;
75
+ /** Container style override. */
76
+ style?: StyleProp<ViewStyle>;
77
+ /** Style applied to the chart row (the bars container). */
78
+ chartStyle?: StyleProp<ViewStyle>;
79
+ /** Style applied to the legend row. */
80
+ legendStyle?: StyleProp<ViewStyle>;
81
+ /** Style applied to every value-label text above the bars. */
82
+ labelStyle?: StyleProp<TextStyle>;
83
+ /** Accessibility label for the entire component. */
84
+ accessibilityLabel?: string;
85
+ };
86
+ /**
87
+ * `CoverageBarComparison` renders a small vertical-bar chart that compares
88
+ * 2+ values side by side, with a legend row directly below where each item
89
+ * is intrinsically tied to one bar.
90
+ *
91
+ * Cohesiveness guarantees:
92
+ * - The legend row is **derived** from the same `bars` prop, so the count
93
+ * and order can never desynchronise from the chart.
94
+ * - Each bar's color, its tokenized `Emphasis / DataViz` mode and its
95
+ * legend indicator dot are the same value.
96
+ *
97
+ * Bars are drawn with `react-native-svg` (`<Rect>` with `rx`), and the
98
+ * fonts/spacing/colors are sourced from the Figma `valueBar/*` and
99
+ * `coverageBarComparison/*` tokens.
100
+ *
101
+ * @component
102
+ */
103
+ declare function CoverageBarComparison({ bars, max, height, legendGap, modes: propModes, style, chartStyle, legendStyle, labelStyle, accessibilityLabel, }: CoverageBarComparisonProps): import("react/jsx-runtime").JSX.Element;
104
+ export default CoverageBarComparison;
105
+ //# sourceMappingURL=CoverageBarComparison.d.ts.map