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.
- package/CHANGELOG.md +60 -0
- package/lib/commonjs/components/AccordionCheckbox/AccordionCheckbox.js +239 -0
- package/lib/commonjs/components/BrandChip/BrandChip.js +149 -0
- package/lib/commonjs/components/CardAdvisory/CardAdvisory.js +2 -2
- package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +213 -0
- package/lib/commonjs/components/CardFinancialCondition/CardFinancialCondition.js +213 -0
- package/lib/commonjs/components/CardInsight/CardInsight.js +166 -0
- package/lib/commonjs/components/Carousel/Carousel.js +9 -7
- package/lib/commonjs/components/CheckboxGroup/CheckboxGroup.js +67 -0
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +125 -0
- package/lib/commonjs/components/CircularProgressBar/CircularProgressBar.js +56 -9
- package/lib/commonjs/components/CoverageBarComparison/CoverageBarComparison.js +272 -0
- package/lib/commonjs/components/CoverageRing/CoverageRing.js +141 -0
- package/lib/commonjs/components/DonutChart/DonutChart.js +309 -0
- package/lib/commonjs/components/DonutChartSummary/DonutChartSummary.js +155 -0
- package/lib/commonjs/components/HoldingsCard/HoldingsCard.js +2 -2
- package/lib/commonjs/components/InstitutionBadge/InstitutionBadge.js +132 -0
- package/lib/commonjs/components/LinearMeter/LinearMeter.js +9 -28
- package/lib/commonjs/components/LinearProgress/LinearProgress.js +68 -0
- package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +95 -0
- package/lib/commonjs/components/MonthlyStatusGrid/MonthlyStatusGrid.js +286 -0
- package/lib/commonjs/components/OTP/OTP.js +381 -37
- package/lib/commonjs/components/ProductOverview/ProductOverview.js +147 -0
- package/lib/commonjs/components/Radio/Radio.js +194 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +21 -188
- package/lib/commonjs/components/RangeTrack/RangeTrack.js +269 -0
- package/lib/commonjs/components/SavingsGoalSummary/SavingsGoalSummary.js +181 -0
- package/lib/commonjs/components/SegmentedTrack/SegmentedTrack.js +171 -0
- package/lib/commonjs/components/StatGroup/StatGroup.js +128 -0
- package/lib/commonjs/components/StatItem/StatItem.js +65 -35
- package/lib/commonjs/components/StrengthIndicator/StrengthIndicator.js +157 -0
- package/lib/commonjs/components/SummaryTile/SummaryTile.js +150 -0
- package/lib/commonjs/components/index.js +192 -1
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/commonjs/utils/index.js +7 -0
- package/lib/commonjs/utils/number-utils.js +57 -0
- package/lib/module/components/AccordionCheckbox/AccordionCheckbox.js +233 -0
- package/lib/module/components/BrandChip/BrandChip.js +143 -0
- package/lib/module/components/CardAdvisory/CardAdvisory.js +2 -2
- package/lib/module/components/CardBankAccount/CardBankAccount.js +208 -0
- package/lib/module/components/CardFinancialCondition/CardFinancialCondition.js +207 -0
- package/lib/module/components/CardInsight/CardInsight.js +161 -0
- package/lib/module/components/Carousel/Carousel.js +9 -7
- package/lib/module/components/CheckboxGroup/CheckboxGroup.js +62 -0
- package/lib/module/components/CheckboxItem/CheckboxItem.js +119 -0
- package/lib/module/components/CircularProgressBar/CircularProgressBar.js +56 -9
- package/lib/module/components/CoverageBarComparison/CoverageBarComparison.js +266 -0
- package/lib/module/components/CoverageRing/CoverageRing.js +136 -0
- package/lib/module/components/DonutChart/DonutChart.js +303 -0
- package/lib/module/components/DonutChartSummary/DonutChartSummary.js +150 -0
- package/lib/module/components/HoldingsCard/HoldingsCard.js +2 -2
- package/lib/module/components/InstitutionBadge/InstitutionBadge.js +127 -0
- package/lib/module/components/LinearMeter/LinearMeter.js +9 -28
- package/lib/module/components/LinearProgress/LinearProgress.js +63 -0
- package/lib/module/components/MetricLegendItem/MetricLegendItem.js +90 -0
- package/lib/module/components/MonthlyStatusGrid/MonthlyStatusGrid.js +281 -0
- package/lib/module/components/OTP/OTP.js +381 -38
- package/lib/module/components/ProductOverview/ProductOverview.js +142 -0
- package/lib/module/components/Radio/Radio.js +188 -0
- package/lib/module/components/RadioButton/RadioButton.js +20 -185
- package/lib/module/components/RangeTrack/RangeTrack.js +263 -0
- package/lib/module/components/SavingsGoalSummary/SavingsGoalSummary.js +175 -0
- package/lib/module/components/SegmentedTrack/SegmentedTrack.js +166 -0
- package/lib/module/components/StatGroup/StatGroup.js +123 -0
- package/lib/module/components/StatItem/StatItem.js +66 -36
- package/lib/module/components/StrengthIndicator/StrengthIndicator.js +152 -0
- package/lib/module/components/SummaryTile/SummaryTile.js +145 -0
- package/lib/module/components/index.js +28 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/module/utils/index.js +2 -1
- package/lib/module/utils/number-utils.js +53 -0
- package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +71 -0
- package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +43 -0
- package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +79 -0
- package/lib/typescript/src/components/CardFinancialCondition/CardFinancialCondition.d.ts +50 -0
- package/lib/typescript/src/components/CardInsight/CardInsight.d.ts +48 -0
- package/lib/typescript/src/components/CheckboxGroup/CheckboxGroup.d.ts +41 -0
- package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +56 -0
- package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +11 -1
- package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +105 -0
- package/lib/typescript/src/components/CoverageRing/CoverageRing.d.ts +90 -0
- package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +117 -0
- package/lib/typescript/src/components/DonutChartSummary/DonutChartSummary.d.ts +103 -0
- package/lib/typescript/src/components/InstitutionBadge/InstitutionBadge.d.ts +30 -0
- package/lib/typescript/src/components/LinearProgress/LinearProgress.d.ts +17 -0
- package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +37 -0
- package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +119 -0
- package/lib/typescript/src/components/OTP/OTP.d.ts +88 -2
- package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +39 -0
- package/lib/typescript/src/components/Radio/Radio.d.ts +30 -0
- package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +20 -28
- package/lib/typescript/src/components/RangeTrack/RangeTrack.d.ts +173 -0
- package/lib/typescript/src/components/SavingsGoalSummary/SavingsGoalSummary.d.ts +95 -0
- package/lib/typescript/src/components/SegmentedTrack/SegmentedTrack.d.ts +108 -0
- package/lib/typescript/src/components/StatGroup/StatGroup.d.ts +45 -0
- package/lib/typescript/src/components/StatItem/StatItem.d.ts +24 -7
- package/lib/typescript/src/components/StrengthIndicator/StrengthIndicator.d.ts +58 -0
- package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +60 -0
- package/lib/typescript/src/components/index.d.ts +29 -2
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/lib/typescript/src/utils/index.d.ts +1 -0
- package/lib/typescript/src/utils/number-utils.d.ts +29 -0
- package/package.json +1 -1
- package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +323 -0
- package/src/components/BrandChip/BrandChip.tsx +235 -0
- package/src/components/CardAdvisory/CardAdvisory.tsx +2 -2
- package/src/components/CardBankAccount/CardBankAccount.tsx +295 -0
- package/src/components/CardFinancialCondition/CardFinancialCondition.tsx +366 -0
- package/src/components/CardInsight/CardInsight.tsx +239 -0
- package/src/components/Carousel/Carousel.tsx +14 -6
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +86 -0
- package/src/components/CheckboxItem/CheckboxItem.tsx +174 -0
- package/src/components/CircularProgressBar/CircularProgressBar.tsx +74 -9
- package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +378 -0
- package/src/components/CoverageRing/CoverageRing.tsx +225 -0
- package/src/components/DonutChart/DonutChart.tsx +503 -0
- package/src/components/DonutChartSummary/DonutChartSummary.tsx +256 -0
- package/src/components/HoldingsCard/HoldingsCard.tsx +2 -2
- package/src/components/InstitutionBadge/InstitutionBadge.tsx +216 -0
- package/src/components/LinearMeter/LinearMeter.tsx +9 -39
- package/src/components/LinearProgress/LinearProgress.tsx +92 -0
- package/src/components/MetricLegendItem/MetricLegendItem.tsx +167 -0
- package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +438 -0
- package/src/components/OTP/OTP.tsx +476 -29
- package/src/components/ProductOverview/ProductOverview.tsx +236 -0
- package/src/components/Radio/Radio.tsx +227 -0
- package/src/components/RadioButton/RadioButton.tsx +23 -225
- package/src/components/RangeTrack/RangeTrack.tsx +394 -0
- package/src/components/SavingsGoalSummary/SavingsGoalSummary.tsx +269 -0
- package/src/components/SegmentedTrack/SegmentedTrack.tsx +268 -0
- package/src/components/StatGroup/StatGroup.tsx +169 -0
- package/src/components/StatItem/StatItem.tsx +117 -40
- package/src/components/StrengthIndicator/StrengthIndicator.tsx +205 -0
- package/src/components/SummaryTile/SummaryTile.tsx +251 -0
- package/src/components/index.ts +39 -2
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/icons/registry.ts +1 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/number-utils.ts +60 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
2
|
+
export interface RadioProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the radio is selected.
|
|
5
|
+
*/
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the radio is disabled.
|
|
9
|
+
*/
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Function to call when the radio is pressed.
|
|
13
|
+
*/
|
|
14
|
+
onPress?: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Modes object for design-token resolution.
|
|
17
|
+
*/
|
|
18
|
+
modes?: Record<string, any>;
|
|
19
|
+
/**
|
|
20
|
+
* Custom style for the radio container.
|
|
21
|
+
*/
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
/**
|
|
24
|
+
* Test ID for testing.
|
|
25
|
+
*/
|
|
26
|
+
testID?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function Radio({ selected, disabled, onPress, modes, style, testID, }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default Radio;
|
|
30
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
22
|
-
style?: StyleProp<ViewStyle>;
|
|
23
|
-
/**
|
|
24
|
-
* Test ID for testing.
|
|
25
|
-
*/
|
|
26
|
-
testID?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare function RadioButton({ selected, disabled, onPress, modes, style, testID, }: RadioButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated `RadioButton` has been renamed to `Radio`.
|
|
3
|
+
*
|
|
4
|
+
* This file is kept as a backward-compatibility shim for teams that may be
|
|
5
|
+
* importing `RadioButton` directly from this deep path:
|
|
6
|
+
*
|
|
7
|
+
* import RadioButton from 'jfs-components/src/components/RadioButton/RadioButton'
|
|
8
|
+
* import { RadioButton, RadioButtonProps } from '...'
|
|
9
|
+
*
|
|
10
|
+
* The recommended public import is now:
|
|
11
|
+
*
|
|
12
|
+
* import { Radio, type RadioProps } from 'jfs-components'
|
|
13
|
+
*
|
|
14
|
+
* Going forward, this component is called `Radio`. This shim only re-exports
|
|
15
|
+
* the new `Radio` component under the old `RadioButton` names; please migrate
|
|
16
|
+
* existing usages to `Radio` at your earliest convenience.
|
|
17
|
+
*/
|
|
18
|
+
import { Radio, type RadioProps } from '../Radio/Radio';
|
|
19
|
+
export type RadioButtonProps = RadioProps;
|
|
20
|
+
export declare const RadioButton: typeof Radio;
|
|
29
21
|
export default RadioButton;
|
|
30
22
|
//# sourceMappingURL=RadioButton.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
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A single row in the savings-goal legend (current vs. target).
|
|
5
|
+
*
|
|
6
|
+
* `value` is a **numeric amount** (e.g. `240000`). It serves two purposes:
|
|
7
|
+
*
|
|
8
|
+
* 1. Display: rendered on the right side of the row using Indian numeric
|
|
9
|
+
* notation via {@link formatIndianNumber} and prefixed with `currency`
|
|
10
|
+
* (e.g. `240000` → `"₹2.4L"`).
|
|
11
|
+
* 2. Progress derivation: the bar fills to `current.value / target.value`
|
|
12
|
+
* automatically. There is no separate `progress` prop.
|
|
13
|
+
*
|
|
14
|
+
* Pass `value: undefined` to render a label-only row (the underlying
|
|
15
|
+
* {@link MetricLegendItem} hides the right slot in that case).
|
|
16
|
+
*/
|
|
17
|
+
export type SavingsGoalSummaryItem = {
|
|
18
|
+
/** Label shown next to the indicator dot (e.g. "Current (4 months)"). */
|
|
19
|
+
label?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Numeric amount used for both display formatting and progress derivation.
|
|
22
|
+
* Use `undefined` to render a label-only row.
|
|
23
|
+
*/
|
|
24
|
+
value?: number;
|
|
25
|
+
/** Override the indicator dot colour. */
|
|
26
|
+
indicatorColor?: string;
|
|
27
|
+
};
|
|
28
|
+
export type SavingsGoalSummaryProps = {
|
|
29
|
+
/**
|
|
30
|
+
* Currency symbol (e.g. `'₹'`, `'$'`) prefixed to every legend value.
|
|
31
|
+
* Defaults to `'₹'`. The symbol is rendered as part of the formatted
|
|
32
|
+
* string — this component does not use `MoneyValue`.
|
|
33
|
+
*/
|
|
34
|
+
currency?: string;
|
|
35
|
+
/**
|
|
36
|
+
* "Current" row in the legend. The indicator dot defaults to the
|
|
37
|
+
* `LinearProgress` indicator colour. Pass `null` to hide the row.
|
|
38
|
+
*
|
|
39
|
+
* `current.value` (numeric) drives both the displayed amount and — together
|
|
40
|
+
* with `target.value` — the progress bar fill.
|
|
41
|
+
*/
|
|
42
|
+
current?: SavingsGoalSummaryItem | null;
|
|
43
|
+
/**
|
|
44
|
+
* "Target" / recommended row in the legend. The indicator dot defaults to
|
|
45
|
+
* the `LinearProgress` track colour. Pass `null` to hide the row.
|
|
46
|
+
*/
|
|
47
|
+
target?: SavingsGoalSummaryItem | null;
|
|
48
|
+
/**
|
|
49
|
+
* Custom legend slot. When provided, replaces the default `current`/`target`
|
|
50
|
+
* rows entirely — pass any number of `MetricLegendItem`s (or any other
|
|
51
|
+
* nodes) to fully control the legend.
|
|
52
|
+
*
|
|
53
|
+
* Note: the progress bar is still derived from `current.value` / `target.value`,
|
|
54
|
+
* so pass them even when overriding the legend if you want a non-zero bar.
|
|
55
|
+
*/
|
|
56
|
+
children?: React.ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Design token modes for theming. Defaults to `{ 'LinearProgress Size': 'L' }`
|
|
59
|
+
* which renders the thicker progress bar from the Figma reference. Caller
|
|
60
|
+
* modes are merged on top and can override every default key.
|
|
61
|
+
*/
|
|
62
|
+
modes?: Record<string, any>;
|
|
63
|
+
/** Override container styles. */
|
|
64
|
+
style?: StyleProp<ViewStyle>;
|
|
65
|
+
/**
|
|
66
|
+
* Override styles for the auto-generated percentage text. Useful for
|
|
67
|
+
* tweaking colour or alignment; the value (e.g. `"50%"`) is always
|
|
68
|
+
* computed from `current` / `target` and cannot be replaced.
|
|
69
|
+
*/
|
|
70
|
+
titleStyle?: StyleProp<TextStyle>;
|
|
71
|
+
/** Override the inner legend container styles. */
|
|
72
|
+
legendStyle?: StyleProp<ViewStyle>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* `SavingsGoalSummary` visualises progress toward a savings goal as:
|
|
76
|
+
*
|
|
77
|
+
* 1. A `Title` showing the percentage — **computed automatically** from
|
|
78
|
+
* `current.value / target.value`. There is no `progress` prop; the
|
|
79
|
+
* component owns the calculation so the title, bar and legend are always
|
|
80
|
+
* in sync.
|
|
81
|
+
* 2. A `LinearProgress` bar driven by the same derived ratio.
|
|
82
|
+
* 3. A two-row legend comparing **current** vs. **target**, where each numeric
|
|
83
|
+
* `value` is auto-formatted with Indian notation
|
|
84
|
+
* ({@link formatIndianNumber}) and prefixed with the `currency` symbol.
|
|
85
|
+
*
|
|
86
|
+
* The component is intentionally narrow in scope — it is the body of a savings
|
|
87
|
+
* insight card. Wrap it in `CardInsight` (or any container of your choice) to
|
|
88
|
+
* add a heading, badge or footer.
|
|
89
|
+
*
|
|
90
|
+
* @component
|
|
91
|
+
* @param {SavingsGoalSummaryProps} props
|
|
92
|
+
*/
|
|
93
|
+
declare function SavingsGoalSummary({ currency, current, target, children, modes, style, titleStyle, legendStyle, }: SavingsGoalSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export default SavingsGoalSummary;
|
|
95
|
+
//# sourceMappingURL=SavingsGoalSummary.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Per-segment data definition for the data-driven `segments` prop.
|
|
5
|
+
*
|
|
6
|
+
* Use `value` for proportional widths (segments share width by their value
|
|
7
|
+
* relative to the sum). When `value` is omitted, segments share the row
|
|
8
|
+
* equally (`flex: 1`).
|
|
9
|
+
*
|
|
10
|
+
* Use `modes` to override the per-segment design-token mode — typically the
|
|
11
|
+
* `Appearance / DataViz` mode for color theming, or `Emphasis / DataViz` to
|
|
12
|
+
* change the emphasis level. The parent already injects per-index defaults
|
|
13
|
+
* (segment 0 = High, 1 = Medium, 2 = Low, then cycling) so callers only need
|
|
14
|
+
* to pass `modes` when they want a different result.
|
|
15
|
+
*/
|
|
16
|
+
export type SegmentedTrackSegmentData = {
|
|
17
|
+
/** Stable React key. */
|
|
18
|
+
key?: React.Key;
|
|
19
|
+
/**
|
|
20
|
+
* Optional explicit weight used for proportional width (`flex: value`).
|
|
21
|
+
* When omitted, the segment uses an equal share of the available row.
|
|
22
|
+
* Mixing values and undefined is supported — undefined falls back to 1.
|
|
23
|
+
*/
|
|
24
|
+
value?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Hard-override the segment color. Bypasses `dataViz/bg` token resolution
|
|
27
|
+
* entirely.
|
|
28
|
+
*/
|
|
29
|
+
color?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Per-segment design token mode overrides. Merged on top of the parent
|
|
32
|
+
* `modes` and the per-index Emphasis defaults.
|
|
33
|
+
*/
|
|
34
|
+
modes?: Record<string, any>;
|
|
35
|
+
/** Override individual segment styles. */
|
|
36
|
+
style?: StyleProp<ViewStyle>;
|
|
37
|
+
/** Per-segment accessibility label. */
|
|
38
|
+
accessibilityLabel?: string;
|
|
39
|
+
};
|
|
40
|
+
export type SegmentedTrackProps = {
|
|
41
|
+
/**
|
|
42
|
+
* Data-driven segment list. Used when no `children` slot is provided.
|
|
43
|
+
* Defaults to three equal segments which receive per-index Emphasis
|
|
44
|
+
* defaults (`High`, `Medium`, `Low`).
|
|
45
|
+
*/
|
|
46
|
+
segments?: SegmentedTrackSegmentData[];
|
|
47
|
+
/**
|
|
48
|
+
* Slot for fully custom segment children. Each top-level child is treated
|
|
49
|
+
* as one segment. The parent injects per-index Emphasis defaults and the
|
|
50
|
+
* shared `modes`, while child-level `modes` overrides win.
|
|
51
|
+
*/
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
54
|
+
modes?: Record<string, any>;
|
|
55
|
+
/** Override the container styles. */
|
|
56
|
+
style?: StyleProp<ViewStyle>;
|
|
57
|
+
/** Style applied to every segment (data-driven mode only). */
|
|
58
|
+
segmentStyle?: StyleProp<ViewStyle>;
|
|
59
|
+
/** Accessibility label announced for the whole distribution row. */
|
|
60
|
+
accessibilityLabel?: string;
|
|
61
|
+
};
|
|
62
|
+
type SegmentedTrackSegmentProps = {
|
|
63
|
+
/**
|
|
64
|
+
* Optional explicit weight used for proportional width (`flex: value`).
|
|
65
|
+
* Defaults to 1 (equal share within the parent row).
|
|
66
|
+
*/
|
|
67
|
+
value?: number | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Hard-override the segment color. Bypasses `dataViz/bg` token resolution.
|
|
70
|
+
*/
|
|
71
|
+
color?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Design token modes for the segment. Merged with parent `modes` and the
|
|
74
|
+
* per-index Emphasis defaults injected by the parent `SegmentedTrack`.
|
|
75
|
+
*/
|
|
76
|
+
modes?: Record<string, any> | undefined;
|
|
77
|
+
/** Override the segment styles. */
|
|
78
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
79
|
+
/** Per-segment accessibility label. */
|
|
80
|
+
accessibilityLabel?: string | undefined;
|
|
81
|
+
};
|
|
82
|
+
declare function SegmentedTrackSegment({ value, color, modes, style, accessibilityLabel, }: SegmentedTrackSegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
/**
|
|
84
|
+
* `SegmentedTrack` renders a horizontal pill-shaped row of categorical
|
|
85
|
+
* segments. Use it for distribution / share-of breakdowns where each
|
|
86
|
+
* segment is a sibling category (not a directional or temporal progress).
|
|
87
|
+
*
|
|
88
|
+
* Defaults to three equal segments tinted at descending Emphasis levels
|
|
89
|
+
* (`High`, `Medium`, `Low`) so the shape reads as a single concept split
|
|
90
|
+
* three ways. Consumers can either pass the data-driven `segments` prop or
|
|
91
|
+
* a fully custom `children` slot of `SegmentedTrack.Segment`s.
|
|
92
|
+
*
|
|
93
|
+
* Each segment resolves its color through the `dataViz/bg` token, which
|
|
94
|
+
* cascades through `Emphasis / DataViz` and `Appearance / DataViz`. Pass
|
|
95
|
+
* `modes` per segment (or override `Appearance / DataViz` at the parent
|
|
96
|
+
* level via `modes`) to retheme the row without touching colors directly.
|
|
97
|
+
*
|
|
98
|
+
* @component
|
|
99
|
+
* @param {SegmentedTrackProps} props
|
|
100
|
+
*/
|
|
101
|
+
declare function SegmentedTrack({ segments, children, modes: propModes, style, segmentStyle, accessibilityLabel, }: SegmentedTrackProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
declare namespace SegmentedTrack {
|
|
103
|
+
var Segment: typeof SegmentedTrackSegment;
|
|
104
|
+
}
|
|
105
|
+
export { SegmentedTrackSegment };
|
|
106
|
+
export type { SegmentedTrackSegmentProps };
|
|
107
|
+
export default SegmentedTrack;
|
|
108
|
+
//# sourceMappingURL=SegmentedTrack.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export type StatGroupItem = {
|
|
4
|
+
/** Stable key for the item. Falls back to the label / index. */
|
|
5
|
+
key?: React.Key;
|
|
6
|
+
/** The descriptive label shown beneath the value. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** The prominent value shown above the label. */
|
|
9
|
+
value?: string;
|
|
10
|
+
};
|
|
11
|
+
export type StatGroupProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Array of stat items. Each item is rendered as a centered `StatItem`
|
|
14
|
+
* (`labelPosition="Bottom"`) with vertical dividers between them.
|
|
15
|
+
*
|
|
16
|
+
* Ignored when a `children` slot is provided.
|
|
17
|
+
*/
|
|
18
|
+
items?: StatGroupItem[];
|
|
19
|
+
/**
|
|
20
|
+
* Custom slot content. When provided, the `items` prop is ignored. Each
|
|
21
|
+
* top-level child is wrapped to take an equal share of the available width
|
|
22
|
+
* and a vertical `Divider` is auto-inserted between siblings — matching the
|
|
23
|
+
* Figma `slot` behaviour. `modes` are propagated to all children.
|
|
24
|
+
*/
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
27
|
+
modes?: Record<string, any>;
|
|
28
|
+
/** Override container styles. */
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* StatGroup renders a card-style container holding a horizontal row of
|
|
33
|
+
* `StatItem`s separated by vertical dividers. It is typically used to surface
|
|
34
|
+
* 3–5 short metrics (e.g. validity, data range, storage) at a glance.
|
|
35
|
+
*
|
|
36
|
+
* Pass `items` for the simple data-driven case, or use the `children` slot
|
|
37
|
+
* for full control over the row contents (the component still auto-inserts
|
|
38
|
+
* vertical dividers between top-level children).
|
|
39
|
+
*
|
|
40
|
+
* @component
|
|
41
|
+
* @param {StatGroupProps} props
|
|
42
|
+
*/
|
|
43
|
+
declare function StatGroup({ items, children, modes, style, }: StatGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export default StatGroup;
|
|
45
|
+
//# sourceMappingURL=StatGroup.d.ts.map
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
-
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
1
|
+
import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
|
|
2
|
+
export type StatItemLabelPosition = 'Top' | 'Bottom';
|
|
2
3
|
export type StatItemProps = {
|
|
3
|
-
/** The small descriptive label
|
|
4
|
+
/** The small descriptive label. */
|
|
4
5
|
label?: string;
|
|
5
|
-
/** The
|
|
6
|
+
/** The prominent value to display. */
|
|
6
7
|
value?: string;
|
|
7
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Whether the label is rendered above or below the value. Matches the
|
|
10
|
+
* Figma `labelPosition` variant. Defaults to `'Top'`.
|
|
11
|
+
*
|
|
12
|
+
* - `'Top'` — Label (12px medium) above large value (26px black). Left-aligned.
|
|
13
|
+
* - `'Bottom'` — Value (12px medium) above smaller label (10px regular). Center-aligned.
|
|
14
|
+
*/
|
|
15
|
+
labelPosition?: StatItemLabelPosition;
|
|
16
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
8
17
|
modes?: Record<string, any>;
|
|
9
18
|
/** Override container styles. */
|
|
10
19
|
style?: StyleProp<ViewStyle>;
|
|
20
|
+
/** Override the label text styles. */
|
|
21
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
22
|
+
/** Override the value text styles. */
|
|
23
|
+
valueStyle?: StyleProp<TextStyle>;
|
|
11
24
|
};
|
|
12
25
|
/**
|
|
13
|
-
* StatItem displays a label/value pair
|
|
14
|
-
*
|
|
26
|
+
* StatItem displays a label/value pair, useful for product stats, metrics
|
|
27
|
+
* or KPI callouts.
|
|
28
|
+
*
|
|
29
|
+
* Supports two layouts via the `labelPosition` variant:
|
|
30
|
+
* - `'Top'` — Small label above a large prominent value (default).
|
|
31
|
+
* - `'Bottom'` — Value above a smaller label, content centered.
|
|
15
32
|
*
|
|
16
33
|
* @component
|
|
17
34
|
* @param {StatItemProps} props
|
|
18
35
|
*/
|
|
19
|
-
declare function StatItem({ label, value, modes, style, }: StatItemProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare function StatItem({ label, value, labelPosition, modes, style, labelStyle, valueStyle, }: StatItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
37
|
export default StatItem;
|
|
21
38
|
//# sourceMappingURL=StatItem.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Confidence levels supported by the indicator. Mirrors the Figma `Confidence`
|
|
5
|
+
* mode collection exactly (`High` | `Medium` | `Low` | `None`).
|
|
6
|
+
*/
|
|
7
|
+
export type StrengthIndicatorConfidence = 'High' | 'Medium' | 'Low' | 'None';
|
|
8
|
+
/**
|
|
9
|
+
* Accepted shape for the `confidence` prop. Either:
|
|
10
|
+
* - one of the named levels (`'High' | 'Medium' | 'Low' | 'None'`), or
|
|
11
|
+
* - a float in `[0, 1]`. Floats are bucketed to the nearest level using
|
|
12
|
+
* midpoint thresholds (1/6, 1/2, 5/6) so anchor values land squarely:
|
|
13
|
+
* `0` → `None`, `~0.33` → `Low`, `~0.66` → `Medium`, `1` → `High`.
|
|
14
|
+
* Values outside `[0, 1]` are clamped.
|
|
15
|
+
*/
|
|
16
|
+
export type StrengthIndicatorConfidenceValue = StrengthIndicatorConfidence | number;
|
|
17
|
+
export type StrengthIndicatorProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Overall confidence level. Accepts either the named enum value
|
|
20
|
+
* (`'High' | 'Medium' | 'Low' | 'None'`) or a float in `[0, 1]`:
|
|
21
|
+
*
|
|
22
|
+
* `1.0` (or `'High'`) → bars `[High, High, High]` (3/3 lit)
|
|
23
|
+
* `0.66` (or `'Medium'`) → bars `[Medium, Medium, None]` (2/3 lit)
|
|
24
|
+
* `0.33` (or `'Low'`) → bars `[Low, None, None]` (1/3 lit)
|
|
25
|
+
* `0.0` (or `'None'`) → bars `[None, None, None]` (0/3 lit)
|
|
26
|
+
*
|
|
27
|
+
* The component maps the resolved level to a per-bar confidence mode
|
|
28
|
+
* internally, so each bar's color resolves through the
|
|
29
|
+
* `strengthIndicator/bar/<size>/background` token using its own
|
|
30
|
+
* `Confidence` mode.
|
|
31
|
+
*
|
|
32
|
+
* Default: `'High'`.
|
|
33
|
+
*/
|
|
34
|
+
confidence?: StrengthIndicatorConfidenceValue;
|
|
35
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
36
|
+
modes?: Record<string, any>;
|
|
37
|
+
/** Override container styles. */
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
} & Omit<React.ComponentProps<typeof View>, 'style'>;
|
|
40
|
+
/**
|
|
41
|
+
* StrengthIndicator renders three fixed-size, ascending bars that
|
|
42
|
+
* communicate a discrete confidence/strength level — typically used to
|
|
43
|
+
* signal model confidence, signal quality, or password strength.
|
|
44
|
+
*
|
|
45
|
+
* Sizes are intentionally fixed (matching the Figma spec): 3px-wide bars
|
|
46
|
+
* 6/9/12px tall with a 2px gap and 2px container padding.
|
|
47
|
+
*
|
|
48
|
+
* Pass a single `confidence` value (named enum *or* float `[0, 1]`); the
|
|
49
|
+
* component normalizes it to a level, maps that level to a per-bar
|
|
50
|
+
* confidence mode, and resolves each bar's color through design tokens
|
|
51
|
+
* (`strengthIndicator/bar/<size>/background`).
|
|
52
|
+
*
|
|
53
|
+
* @component
|
|
54
|
+
* @param {StrengthIndicatorProps} props
|
|
55
|
+
*/
|
|
56
|
+
declare function StrengthIndicator({ confidence, modes, style, ...rest }: StrengthIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export default StrengthIndicator;
|
|
58
|
+
//# sourceMappingURL=StrengthIndicator.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
|
|
3
|
+
import { type StrengthIndicatorConfidenceValue } from '../StrengthIndicator/StrengthIndicator';
|
|
4
|
+
export type SummaryTileProps = {
|
|
5
|
+
/** Bold heading shown at the top-left of the tile. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Smaller supporting copy rendered beneath the title. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Confidence level for the inline `StrengthIndicator` next to the title.
|
|
11
|
+
* Defaults to `'None'` to match the Figma reference (all bars unlit).
|
|
12
|
+
* Pass `null` to hide the indicator entirely.
|
|
13
|
+
*/
|
|
14
|
+
confidence?: StrengthIndicatorConfidenceValue | null;
|
|
15
|
+
/**
|
|
16
|
+
* When `true`, render a trailing forward chevron (`NavArrow`) — the
|
|
17
|
+
* convention for "tap the tile to drill in" affordance. Defaults to
|
|
18
|
+
* `false`.
|
|
19
|
+
*/
|
|
20
|
+
chevron?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Action slot rendered to the right of the text content. Defaults to a
|
|
23
|
+
* small `Button` (`Button / Size: 'S'`) labelled "Button" to match the
|
|
24
|
+
* Figma default. Pass `null` to render no action slot (typical for
|
|
25
|
+
* static tiles that want only a chevron).
|
|
26
|
+
*/
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Optional press handler for the entire tile. When provided, the tile
|
|
30
|
+
* is wrapped in a `Pressable`, gets `accessibilityRole="button"` and
|
|
31
|
+
* the default `Button` action slot is automatically suppressed so the
|
|
32
|
+
* rendered HTML doesn't contain a `<button>` inside another `<button>`
|
|
33
|
+
* (which would trigger a hydration warning on web). Pair this with
|
|
34
|
+
* `chevron` for the navigational tile pattern.
|
|
35
|
+
*/
|
|
36
|
+
onPress?: () => void;
|
|
37
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
38
|
+
modes?: Record<string, any>;
|
|
39
|
+
/** Override container styles. */
|
|
40
|
+
style?: StyleProp<ViewStyle>;
|
|
41
|
+
/** Override the title text styles. */
|
|
42
|
+
titleStyle?: StyleProp<TextStyle>;
|
|
43
|
+
/** Override the description text styles. */
|
|
44
|
+
descriptionStyle?: StyleProp<TextStyle>;
|
|
45
|
+
/** Accessibility label override (defaults to `title`). */
|
|
46
|
+
accessibilityLabel?: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* SummaryTile composes a title (with an inline `StrengthIndicator`), a
|
|
50
|
+
* supporting description and an action slot into a compact horizontal row,
|
|
51
|
+
* commonly used at the top of dashboard cards (e.g. "Spending — know your
|
|
52
|
+
* spending and savings"). An optional trailing chevron and tile-level
|
|
53
|
+
* `onPress` handler turn the whole row into a navigational entry point.
|
|
54
|
+
*
|
|
55
|
+
* @component
|
|
56
|
+
* @param {SummaryTileProps} props
|
|
57
|
+
*/
|
|
58
|
+
declare function SummaryTile({ title, description, confidence, chevron, children, onPress, modes, style, titleStyle, descriptionStyle, accessibilityLabel, }: SummaryTileProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export default SummaryTile;
|
|
60
|
+
//# sourceMappingURL=SummaryTile.d.ts.map
|