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.
- package/CHANGELOG.md +28 -0
- package/lib/commonjs/components/AccordionCheckbox/AccordionCheckbox.js +239 -0
- package/lib/commonjs/components/AccountCard/AccountCard.js +247 -0
- package/lib/commonjs/components/AppBar/AppBar.js +17 -11
- package/lib/commonjs/components/BrandChip/BrandChip.js +149 -0
- package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +229 -0
- package/lib/commonjs/components/CardInsight/CardInsight.js +166 -0
- package/lib/commonjs/components/CheckboxGroup/CheckboxGroup.js +67 -0
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +140 -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/Dropdown/Dropdown.js +214 -0
- package/lib/commonjs/components/DropdownInput/DropdownInput.js +542 -0
- package/lib/commonjs/components/FormField/FormField.js +328 -178
- package/lib/commonjs/components/LinearMeter/LinearMeter.js +9 -28
- package/lib/commonjs/components/LinearProgress/LinearProgress.js +68 -0
- package/lib/commonjs/components/LottieIntroBlock/LottieIntroBlock.js +150 -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/PageHero/PageHero.js +153 -0
- package/lib/commonjs/components/PoweredByLabel/PoweredByLabel.js +135 -0
- package/lib/commonjs/components/PoweredByLabel/finvu.png +0 -0
- package/lib/commonjs/components/ProductOverview/ProductOverview.js +147 -0
- 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/Text/Text.js +9 -2
- package/lib/commonjs/components/Tooltip/Tooltip.js +34 -27
- package/lib/commonjs/components/index.js +231 -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/AccountCard/AccountCard.js +241 -0
- package/lib/module/components/AppBar/AppBar.js +17 -11
- package/lib/module/components/BrandChip/BrandChip.js +143 -0
- package/lib/module/components/CardBankAccount/CardBankAccount.js +223 -0
- package/lib/module/components/CardInsight/CardInsight.js +161 -0
- package/lib/module/components/CheckboxGroup/CheckboxGroup.js +62 -0
- package/lib/module/components/CheckboxItem/CheckboxItem.js +134 -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/Dropdown/Dropdown.js +206 -0
- package/lib/module/components/DropdownInput/DropdownInput.js +536 -0
- package/lib/module/components/FormField/FormField.js +330 -180
- package/lib/module/components/LinearMeter/LinearMeter.js +9 -28
- package/lib/module/components/LinearProgress/LinearProgress.js +63 -0
- package/lib/module/components/LottieIntroBlock/LottieIntroBlock.js +144 -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/PageHero/PageHero.js +147 -0
- package/lib/module/components/PoweredByLabel/PoweredByLabel.js +130 -0
- package/lib/module/components/PoweredByLabel/finvu.png +0 -0
- package/lib/module/components/ProductOverview/ProductOverview.js +142 -0
- 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/Text/Text.js +9 -2
- package/lib/module/components/Tooltip/Tooltip.js +34 -27
- package/lib/module/components/index.js +28 -2
- 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/AccountCard/AccountCard.d.ts +81 -0
- package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +43 -0
- package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +86 -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 +72 -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/Dropdown/Dropdown.d.ts +62 -0
- package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +107 -0
- package/lib/typescript/src/components/FormField/FormField.d.ts +76 -19
- package/lib/typescript/src/components/LinearProgress/LinearProgress.d.ts +17 -0
- package/lib/typescript/src/components/LottieIntroBlock/LottieIntroBlock.d.ts +58 -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/PageHero/PageHero.d.ts +53 -0
- package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +70 -0
- package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +39 -0
- 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/Text/Text.d.ts +12 -2
- package/lib/typescript/src/components/Tooltip/Tooltip.d.ts +13 -2
- package/lib/typescript/src/components/index.d.ts +29 -3
- 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 -3
- package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +323 -0
- package/src/components/AccountCard/AccountCard.tsx +376 -0
- package/src/components/AppBar/AppBar.tsx +25 -14
- package/src/components/BrandChip/BrandChip.tsx +235 -0
- package/src/components/CardBankAccount/CardBankAccount.tsx +321 -0
- package/src/components/CardInsight/CardInsight.tsx +239 -0
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +86 -0
- package/src/components/CheckboxItem/CheckboxItem.tsx +209 -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/Dropdown/Dropdown.tsx +331 -0
- package/src/components/DropdownInput/DropdownInput.tsx +819 -0
- package/src/components/FormField/FormField.tsx +542 -215
- package/src/components/LinearMeter/LinearMeter.tsx +9 -39
- package/src/components/LinearProgress/LinearProgress.tsx +92 -0
- package/src/components/LottieIntroBlock/LottieIntroBlock.tsx +202 -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/PageHero/PageHero.tsx +200 -0
- package/src/components/PoweredByLabel/PoweredByLabel.tsx +221 -0
- package/src/components/PoweredByLabel/finvu.png +0 -0
- package/src/components/ProductOverview/ProductOverview.tsx +236 -0
- 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/Text/Text.tsx +24 -3
- package/src/components/Tooltip/Tooltip.tsx +50 -25
- package/src/components/index.ts +47 -3
- 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,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type ButtonProps } from '../Button/Button';
|
|
4
|
+
type CoverageRingBaseProps = Omit<React.ComponentProps<typeof View>, 'children' | 'style'>;
|
|
5
|
+
export type CoverageRingProps = CoverageRingBaseProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Current count (numerator). Together with `total`, drives both the ring
|
|
8
|
+
* progress and the default `valueLabel` (`"{value} of {total}"`). Clamped
|
|
9
|
+
* to `[0, total]`.
|
|
10
|
+
*/
|
|
11
|
+
value?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum count (denominator). Drives the ring fill ratio along with
|
|
14
|
+
* `value`. Must be greater than 0; a non-positive total collapses to 0%.
|
|
15
|
+
*/
|
|
16
|
+
total?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Small caption rendered above the value inside the ring (e.g. "Benefits
|
|
19
|
+
* availed"). Maps to the Figma `circularProgressBar/supportText/*` tokens.
|
|
20
|
+
*/
|
|
21
|
+
supportText?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional override for the formatted value rendered inside the ring.
|
|
24
|
+
* Defaults to `"{value} of {total}"` so the visual matches the Figma
|
|
25
|
+
* "Coverage Ring" reference.
|
|
26
|
+
*/
|
|
27
|
+
valueLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Visible label of the default action button. Ignored when `action` is
|
|
30
|
+
* provided. Defaults to `"Learn more"` to match the Figma reference.
|
|
31
|
+
*/
|
|
32
|
+
actionLabel?: string;
|
|
33
|
+
/** Press handler for the default action button. */
|
|
34
|
+
onActionPress?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Forward extra props to the default action button (e.g. `disabled`,
|
|
37
|
+
* `accessibilityHint`, `icon`). Use this for tweaks; for a fully custom
|
|
38
|
+
* action node, pass it as `action` instead.
|
|
39
|
+
*/
|
|
40
|
+
actionProps?: Partial<ButtonProps>;
|
|
41
|
+
/**
|
|
42
|
+
* Render-prop slot for the action area. When provided, takes precedence
|
|
43
|
+
* over `actionLabel`/`onActionPress`/`actionProps` and the default button
|
|
44
|
+
* is skipped entirely.
|
|
45
|
+
*
|
|
46
|
+
* Use `children` instead if you prefer a JSX-style slot — both are
|
|
47
|
+
* supported and produce identical output.
|
|
48
|
+
*/
|
|
49
|
+
action?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Alternative slot for the action area. Identical to `action`; provided
|
|
52
|
+
* for ergonomic JSX:
|
|
53
|
+
*
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <CoverageRing value={4} total={7} supportText="Benefits availed">
|
|
56
|
+
* <CustomCTA />
|
|
57
|
+
* </CoverageRing>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
children?: React.ReactNode;
|
|
61
|
+
/** Design token modes forwarded to token lookups and slot children. */
|
|
62
|
+
modes?: Record<string, any>;
|
|
63
|
+
/** Container style override. */
|
|
64
|
+
style?: StyleProp<ViewStyle>;
|
|
65
|
+
/** Override the support-text style inside the ring. */
|
|
66
|
+
supportTextStyle?: StyleProp<TextStyle>;
|
|
67
|
+
/** Override the value-label style inside the ring. */
|
|
68
|
+
valueStyle?: StyleProp<TextStyle>;
|
|
69
|
+
/** Accessibility label for the entire component. */
|
|
70
|
+
accessibilityLabel?: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* `CoverageRing` renders a single-purpose insight: how many items out of a
|
|
74
|
+
* total have been covered (e.g. "4 of 7 benefits availed"), paired with a
|
|
75
|
+
* call-to-action button below the ring.
|
|
76
|
+
*
|
|
77
|
+
* It composes the existing {@link CircularProgressBar} (in its `M` size so
|
|
78
|
+
* there is room for a caption + value inside the ring) and {@link Button}
|
|
79
|
+
* (in its `S`, Secondary brand variant) — both driven by the same design
|
|
80
|
+
* tokens used by the rest of the design system.
|
|
81
|
+
*
|
|
82
|
+
* The ring fill is derived from `value / total`, so the percentage, the
|
|
83
|
+
* displayed `"{value} of {total}"` label and the support caption stay in
|
|
84
|
+
* sync automatically. There is no separate `progress` prop.
|
|
85
|
+
*
|
|
86
|
+
* @component
|
|
87
|
+
*/
|
|
88
|
+
declare function CoverageRing({ value, total, supportText, valueLabel, actionLabel, onActionPress, actionProps, action, children, modes: propModes, style, supportTextStyle, valueStyle, accessibilityLabel, ...rest }: CoverageRingProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export default CoverageRing;
|
|
90
|
+
//# sourceMappingURL=CoverageRing.d.ts.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Per-segment data definition for the data-driven `segments` prop.
|
|
5
|
+
*
|
|
6
|
+
* Each segment renders one arc on the donut ring. `value` controls the
|
|
7
|
+
* arc's angular share (its weight relative to the sum of all values).
|
|
8
|
+
* Use `modes` per segment to override the default `Appearance / DataViz`
|
|
9
|
+
* mode (the parent injects per-index defaults of `Senary`, `Primary`,
|
|
10
|
+
* `Secondary`, `Tertiary`, `Quaternary`, `Quinary`, then cycles).
|
|
11
|
+
*/
|
|
12
|
+
export type DonutChartSegmentData = {
|
|
13
|
+
/** Stable React key. */
|
|
14
|
+
key?: React.Key;
|
|
15
|
+
/** Segment's angular weight (relative to the sum of all segment values). */
|
|
16
|
+
value: number;
|
|
17
|
+
/** Hard-override the segment color. Bypasses `dataViz/bg` token resolution. */
|
|
18
|
+
color?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Per-segment design token mode overrides. Merged on top of parent
|
|
21
|
+
* `modes` and the per-index `Appearance / DataViz` defaults.
|
|
22
|
+
*/
|
|
23
|
+
modes?: Record<string, any>;
|
|
24
|
+
/** Per-segment accessibility label. */
|
|
25
|
+
accessibilityLabel?: string;
|
|
26
|
+
};
|
|
27
|
+
export type DonutChartProps = {
|
|
28
|
+
/**
|
|
29
|
+
* Data-driven segment list. Used when no `children` slot is provided.
|
|
30
|
+
* Defaults to six equal segments themed across the
|
|
31
|
+
* `Appearance / DataViz` palette.
|
|
32
|
+
*/
|
|
33
|
+
segments?: DonutChartSegmentData[];
|
|
34
|
+
/**
|
|
35
|
+
* Optional center value text (large/bold). Pass `null`/`false` to hide.
|
|
36
|
+
* Accepts a string or any `ReactNode` for full control.
|
|
37
|
+
*/
|
|
38
|
+
value?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Optional center label text (smaller, beneath the value). Pass
|
|
41
|
+
* `null`/`false` to hide. Accepts a string or any `ReactNode`.
|
|
42
|
+
*/
|
|
43
|
+
label?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Slot for custom center content. When provided, it replaces the
|
|
46
|
+
* default `value`/`label` text wrap entirely.
|
|
47
|
+
*/
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
/** Outer diameter in px. Defaults to 194 (matching the Figma reference). */
|
|
50
|
+
size?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Ring stroke width in px. Defaults to 18% of `size` so the donut keeps
|
|
53
|
+
* the same visual proportions across sizes.
|
|
54
|
+
*/
|
|
55
|
+
strokeWidth?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Visual gap between adjacent segments expressed in degrees of arc.
|
|
58
|
+
* Defaults to 0 (segments touch). Use small values (1–4°) for
|
|
59
|
+
* separation when many segments are present.
|
|
60
|
+
*/
|
|
61
|
+
gap?: number;
|
|
62
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
63
|
+
modes?: Record<string, any>;
|
|
64
|
+
/** Override container styles. */
|
|
65
|
+
style?: StyleProp<ViewStyle>;
|
|
66
|
+
/** Override default value text styles. */
|
|
67
|
+
valueStyle?: StyleProp<TextStyle>;
|
|
68
|
+
/** Override default label text styles. */
|
|
69
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
70
|
+
/** Accessibility label announced for the whole donut chart. */
|
|
71
|
+
accessibilityLabel?: string;
|
|
72
|
+
};
|
|
73
|
+
type DonutChartSegmentProps = {
|
|
74
|
+
/** Angular weight relative to the sum of sibling segment values. */
|
|
75
|
+
value: number;
|
|
76
|
+
/** Hard-override segment color (bypasses tokens). */
|
|
77
|
+
color?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Design token modes for the segment. Merged with parent `modes` and
|
|
80
|
+
* the per-index `Appearance / DataViz` defaults.
|
|
81
|
+
*/
|
|
82
|
+
modes?: Record<string, any>;
|
|
83
|
+
/** Per-segment accessibility label. */
|
|
84
|
+
accessibilityLabel?: string;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Inert helper used purely to author donut segments declaratively as
|
|
88
|
+
* `DonutChart.Segment` slot children. The parent reads its props and
|
|
89
|
+
* renders the actual SVG arcs — this component never renders anything by
|
|
90
|
+
* itself.
|
|
91
|
+
*/
|
|
92
|
+
declare function DonutChartSegment(_: DonutChartSegmentProps): any;
|
|
93
|
+
/**
|
|
94
|
+
* `DonutChart` renders a circular ring split into categorical segments.
|
|
95
|
+
* It is the segmented counterpart of `CircularProgressBar`: there is **no
|
|
96
|
+
* track background** behind the segments — the colored ring *is* the
|
|
97
|
+
* data, and each slice is a sibling category rather than a directional or
|
|
98
|
+
* temporal value.
|
|
99
|
+
*
|
|
100
|
+
* The default 6-segment layout receives per-index `Appearance / DataViz`
|
|
101
|
+
* defaults (segment 1 → `Senary`, 2 → `Primary`, 3 → `Secondary`, 4 →
|
|
102
|
+
* `Tertiary`, 5 → `Quaternary`, 6 → `Quinary`) so the wheel reads as one
|
|
103
|
+
* concept split into six color-coded categories. Override `modes` per
|
|
104
|
+
* segment to remix appearances, or set `Emphasis / DataViz` on the
|
|
105
|
+
* parent `modes` to dim or brighten the whole wheel at once.
|
|
106
|
+
*
|
|
107
|
+
* @component
|
|
108
|
+
* @param {DonutChartProps} props
|
|
109
|
+
*/
|
|
110
|
+
declare function DonutChart({ segments, value, label, children, size, strokeWidth: strokeWidthProp, gap, modes: propModes, style, valueStyle, labelStyle, accessibilityLabel, }: DonutChartProps): import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
declare namespace DonutChart {
|
|
112
|
+
var Segment: typeof DonutChartSegment;
|
|
113
|
+
}
|
|
114
|
+
export { DonutChartSegment };
|
|
115
|
+
export type { DonutChartSegmentProps };
|
|
116
|
+
export default DonutChart;
|
|
117
|
+
//# sourceMappingURL=DonutChart.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* One row of the `DonutChartSummary`. Each item drives BOTH a donut
|
|
5
|
+
* segment and the matching legend row, so the segment and indicator
|
|
6
|
+
* always share the same color by construction.
|
|
7
|
+
*/
|
|
8
|
+
export type DonutChartSummaryItem = {
|
|
9
|
+
/** Stable React key. Falls back to the item label / index. */
|
|
10
|
+
key?: React.Key;
|
|
11
|
+
/** The descriptive label rendered next to the indicator dot. */
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The data point — drives the segment's angular share. Same
|
|
15
|
+
* semantics as `DonutChartSegmentData.value`. When the legend's
|
|
16
|
+
* right-side text is shown, the resolution order is:
|
|
17
|
+
* `displayValue` → `formatValue(value)` → hide.
|
|
18
|
+
*/
|
|
19
|
+
value: number;
|
|
20
|
+
/**
|
|
21
|
+
* Optional override for the legend row's right-side text. Falls
|
|
22
|
+
* back to `formatValue(value)` if a parent-level `formatValue` is
|
|
23
|
+
* provided; otherwise the value slot is hidden (matches the Figma
|
|
24
|
+
* `data` boolean toggle on `MetricLegendItem`). Pass `null` or
|
|
25
|
+
* `false` to explicitly hide on a per-item basis.
|
|
26
|
+
*/
|
|
27
|
+
displayValue?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Hard-override the shared color used for both the donut segment
|
|
30
|
+
* and the legend indicator. Bypasses `dataViz/bg` token resolution.
|
|
31
|
+
*/
|
|
32
|
+
color?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Per-item design token mode overrides. Merged on top of parent
|
|
35
|
+
* `modes` and the per-index `Appearance / DataViz` defaults
|
|
36
|
+
* (`Senary`, `Primary`, `Secondary`, `Tertiary`, `Quaternary`,
|
|
37
|
+
* `Quinary`, then cycles).
|
|
38
|
+
*/
|
|
39
|
+
modes?: Record<string, any>;
|
|
40
|
+
/** Accessibility label for the segment + legend row pairing. */
|
|
41
|
+
accessibilityLabel?: string;
|
|
42
|
+
};
|
|
43
|
+
export type DonutChartSummaryProps = {
|
|
44
|
+
/**
|
|
45
|
+
* Data-driven rows. Each entry produces a donut segment AND a
|
|
46
|
+
* matching `MetricLegendItem` — the count of legend rows is locked
|
|
47
|
+
* in step with the count of donut segments by construction.
|
|
48
|
+
*/
|
|
49
|
+
items?: DonutChartSummaryItem[];
|
|
50
|
+
/**
|
|
51
|
+
* Optional formatter applied to each item's numeric `value` when
|
|
52
|
+
* the item does not provide an explicit `displayValue`. Useful for
|
|
53
|
+
* the common "format every weight the same way" case
|
|
54
|
+
* (e.g. `(v) => `${v}%``).
|
|
55
|
+
*/
|
|
56
|
+
formatValue?: (value: number) => React.ReactNode;
|
|
57
|
+
/** Center value text inside the donut (large/bold). */
|
|
58
|
+
centerValue?: React.ReactNode;
|
|
59
|
+
/** Center label text inside the donut (smaller, beneath the value). */
|
|
60
|
+
centerLabel?: React.ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Slot for fully-custom donut center content. When provided it
|
|
63
|
+
* replaces the default `centerValue`/`centerLabel` text wrap.
|
|
64
|
+
*/
|
|
65
|
+
donutCenter?: React.ReactNode;
|
|
66
|
+
/** Outer donut diameter in px. Defaults to 194 (Figma reference). */
|
|
67
|
+
donutSize?: number;
|
|
68
|
+
/** Donut ring stroke width in px. Defaults to ~18% of `donutSize`. */
|
|
69
|
+
donutStrokeWidth?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Visual gap between adjacent donut segments expressed in degrees
|
|
72
|
+
* of arc. Defaults to 0 (segments touch).
|
|
73
|
+
*/
|
|
74
|
+
donutGap?: number;
|
|
75
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
76
|
+
modes?: Record<string, any>;
|
|
77
|
+
/** Override outer container styles. */
|
|
78
|
+
style?: StyleProp<ViewStyle>;
|
|
79
|
+
/** Override the legend container styles. */
|
|
80
|
+
legendStyle?: StyleProp<ViewStyle>;
|
|
81
|
+
/** Accessibility label announced for the whole summary. */
|
|
82
|
+
accessibilityLabel?: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* `DonutChartSummary` pairs a `DonutChart` with a vertical list of
|
|
86
|
+
* `MetricLegendItem` rows. The component takes a single `items` array,
|
|
87
|
+
* so the number of legend rows is locked in step with the number of
|
|
88
|
+
* donut segments by construction — every segment has exactly one
|
|
89
|
+
* legend row, and they share the same color through the same
|
|
90
|
+
* `Appearance / DataViz` cascade as the standalone `DonutChart`.
|
|
91
|
+
*
|
|
92
|
+
* The default 4-item layout receives per-index `Appearance / DataViz`
|
|
93
|
+
* defaults (item 1 → `Senary`, 2 → `Primary`, 3 → `Secondary`, 4 →
|
|
94
|
+
* `Tertiary`, then cycles). Override `modes` per item to remix, or set
|
|
95
|
+
* `Emphasis / DataViz` on the parent `modes` to dim or brighten the
|
|
96
|
+
* whole component at once.
|
|
97
|
+
*
|
|
98
|
+
* @component
|
|
99
|
+
* @param {DonutChartSummaryProps} props
|
|
100
|
+
*/
|
|
101
|
+
declare function DonutChartSummary({ items, formatValue, centerValue, centerLabel, donutCenter, donutSize, donutStrokeWidth, donutGap, modes: propModes, style, legendStyle, accessibilityLabel, }: DonutChartSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export default DonutChartSummary;
|
|
103
|
+
//# sourceMappingURL=DonutChartSummary.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
export type DropdownItemProps = {
|
|
4
|
+
/** Display text for the item. Ignored when `children` is provided. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Value associated with the item. Used by the parent `Dropdown` /
|
|
8
|
+
* `DropdownInput` to identify the selected item. Optional when the item
|
|
9
|
+
* is purely informational or used outside of a selection context.
|
|
10
|
+
*/
|
|
11
|
+
value?: string | number | null;
|
|
12
|
+
/** Whether the item is currently selected (renders the trailing check). */
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
/** Whether the item is disabled and non-interactive. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Optional element rendered before the label (icon, avatar, etc.). */
|
|
17
|
+
leading?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Optional element rendered after the label. When omitted and `selected`
|
|
20
|
+
* is true, a check icon is rendered automatically.
|
|
21
|
+
*/
|
|
22
|
+
trailing?: React.ReactNode;
|
|
23
|
+
/** Press handler. Receives the item's `value` if provided. */
|
|
24
|
+
onPress?: (value: DropdownItemProps['value']) => void;
|
|
25
|
+
/** Optional custom child content (overrides `label`). */
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
/** Modes for design token resolution. */
|
|
28
|
+
modes?: Record<string, any>;
|
|
29
|
+
/** Style overrides for the item container. */
|
|
30
|
+
style?: StyleProp<ViewStyle>;
|
|
31
|
+
/** Style overrides for the item label text. */
|
|
32
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
33
|
+
/** Accessibility label (defaults to label / inferred from children). */
|
|
34
|
+
accessibilityLabel?: string;
|
|
35
|
+
/** Accessibility hint. */
|
|
36
|
+
accessibilityHint?: string;
|
|
37
|
+
};
|
|
38
|
+
export declare function DropdownItem({ label, value, selected, disabled, leading, trailing, onPress, children, modes: propModes, style, labelStyle, accessibilityLabel, accessibilityHint, }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export type DropdownProps = {
|
|
40
|
+
/** Dropdown items, typically `<DropdownItem />` children. */
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum height of the popup before its content becomes scrollable.
|
|
44
|
+
* Defaults to no limit.
|
|
45
|
+
*/
|
|
46
|
+
maxHeight?: number;
|
|
47
|
+
/** Modes for design token resolution. */
|
|
48
|
+
modes?: Record<string, any>;
|
|
49
|
+
/** Style overrides for the popup container. */
|
|
50
|
+
style?: StyleProp<ViewStyle>;
|
|
51
|
+
/** Accessibility label for the menu surface. */
|
|
52
|
+
accessibilityLabel?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* `Dropdown` is the visual surface (popup) that contains a list of
|
|
56
|
+
* `DropdownItem`s. It is responsible for the background, rounded corners,
|
|
57
|
+
* elevation/shadow, and clipping. Use it standalone for menu UIs, or rely on
|
|
58
|
+
* `DropdownInput` which composes it into a form-field experience.
|
|
59
|
+
*/
|
|
60
|
+
export declare function Dropdown({ children, maxHeight, modes: propModes, style, accessibilityLabel, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export default Dropdown;
|
|
62
|
+
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export type DropdownInputOptionValue = string | number;
|
|
4
|
+
export type DropdownInputOption = {
|
|
5
|
+
/** Stable, unique value used to identify the option. */
|
|
6
|
+
value: DropdownInputOptionValue;
|
|
7
|
+
/** Human-readable label rendered in the menu and selected display. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Optional element rendered before the label inside the item. */
|
|
10
|
+
leading?: React.ReactNode;
|
|
11
|
+
/** Optional element rendered after the label inside the item. */
|
|
12
|
+
trailing?: React.ReactNode;
|
|
13
|
+
/** Whether the option is non-selectable. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type DropdownInputProps = {
|
|
17
|
+
/** Label rendered above the input. */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Placeholder text shown when no value is selected. */
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Data-driven list of options. Mutually compatible with `children`; if
|
|
23
|
+
* both are provided the `items` are rendered first.
|
|
24
|
+
*/
|
|
25
|
+
items?: DropdownInputOption[];
|
|
26
|
+
/**
|
|
27
|
+
* Currently selected value (controlled). When `value` is `undefined` the
|
|
28
|
+
* component operates in uncontrolled mode and keeps its own state.
|
|
29
|
+
*/
|
|
30
|
+
value?: DropdownInputOptionValue | null;
|
|
31
|
+
/** Initial selected value for uncontrolled mode. */
|
|
32
|
+
defaultValue?: DropdownInputOptionValue | null;
|
|
33
|
+
/** Called when the selected value changes. */
|
|
34
|
+
onValueChange?: (value: DropdownInputOptionValue | null, option?: DropdownInputOption) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Custom slot of `<DropdownItem />` children. Used when finer-grained
|
|
37
|
+
* control is needed (icons, custom layouts, etc.). When provided alongside
|
|
38
|
+
* `items`, both are rendered (items first).
|
|
39
|
+
*/
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Custom renderer for the trigger label. Receives the currently-selected
|
|
43
|
+
* option (if any) and a boolean indicating whether the field has a value.
|
|
44
|
+
*/
|
|
45
|
+
renderValue?: (option: DropdownInputOption | undefined, hasValue: boolean) => React.ReactNode;
|
|
46
|
+
/** Controlled open state. */
|
|
47
|
+
open?: boolean;
|
|
48
|
+
/** Initial open state for uncontrolled mode. */
|
|
49
|
+
defaultOpen?: boolean;
|
|
50
|
+
/** Called whenever the open state changes. */
|
|
51
|
+
onOpenChange?: (open: boolean) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Preferred placement for the popup. The component falls back to the
|
|
54
|
+
* opposite side automatically when there isn't enough room.
|
|
55
|
+
* @default 'bottom'
|
|
56
|
+
*/
|
|
57
|
+
placement?: 'bottom' | 'top' | 'auto';
|
|
58
|
+
/** Renders a required asterisk next to the label. */
|
|
59
|
+
isRequired?: boolean;
|
|
60
|
+
/** Disables interaction and dims the field. */
|
|
61
|
+
isDisabled?: boolean;
|
|
62
|
+
/** Marks the field as invalid and shows `errorMessage`. */
|
|
63
|
+
isInvalid?: boolean;
|
|
64
|
+
/** Renders the field in read-only mode (non-interactive but not disabled). */
|
|
65
|
+
isReadOnly?: boolean;
|
|
66
|
+
/** Helper text displayed below the input. */
|
|
67
|
+
supportText?: string;
|
|
68
|
+
/** Replaces `supportText` when `isInvalid` is true. */
|
|
69
|
+
errorMessage?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Maximum height of the popup before it becomes scrollable. Helpful for
|
|
72
|
+
* long lists. Defaults to 240 (roughly 5 items).
|
|
73
|
+
*/
|
|
74
|
+
menuMaxHeight?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Pixel offset between the trigger and the popup. Defaults to 4 so the
|
|
77
|
+
* popup visually peeks below the input.
|
|
78
|
+
*/
|
|
79
|
+
menuOffset?: number;
|
|
80
|
+
/**
|
|
81
|
+
* When true, the popup width matches the trigger width. When false, the
|
|
82
|
+
* popup uses its intrinsic content width but never exceeds the trigger.
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
matchTriggerWidth?: boolean;
|
|
86
|
+
/** Whether tapping the backdrop closes the menu. */
|
|
87
|
+
closeOnBackdropPress?: boolean;
|
|
88
|
+
/** Modes for design token resolution. */
|
|
89
|
+
modes?: Record<string, any>;
|
|
90
|
+
/** Style overrides for the outermost wrapper. */
|
|
91
|
+
style?: StyleProp<ViewStyle>;
|
|
92
|
+
/** Style overrides for the input row. */
|
|
93
|
+
inputStyle?: StyleProp<ViewStyle>;
|
|
94
|
+
/** Style overrides for the popup container. */
|
|
95
|
+
menuStyle?: StyleProp<ViewStyle>;
|
|
96
|
+
/** Accessibility label. Defaults to the visible label / placeholder. */
|
|
97
|
+
accessibilityLabel?: string;
|
|
98
|
+
/** Accessibility hint. */
|
|
99
|
+
accessibilityHint?: string;
|
|
100
|
+
/** Called when the trigger receives focus (web only). */
|
|
101
|
+
onFocus?: (e: any) => void;
|
|
102
|
+
/** Called when the trigger loses focus (web only). */
|
|
103
|
+
onBlur?: (e: any) => void;
|
|
104
|
+
};
|
|
105
|
+
declare function DropdownInput({ label, placeholder, items, value, defaultValue, onValueChange, children, renderValue, open, defaultOpen, onOpenChange, placement, isRequired, isDisabled, isInvalid, isReadOnly, supportText, errorMessage, menuMaxHeight, menuOffset, matchTriggerWidth, closeOnBackdropPress, modes: propModes, style, inputStyle, menuStyle, accessibilityLabel, accessibilityHint, onFocus, onBlur, }: DropdownInputProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
export default DropdownInput;
|
|
107
|
+
//# sourceMappingURL=DropdownInput.d.ts.map
|
|
@@ -1,27 +1,84 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
export type FormFieldType = 'text' | 'password' | 'email' | 'search';
|
|
2
|
+
import { type StyleProp, type TextInputProps as RNTextInputProps, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
export type FormFieldType = 'text' | 'password' | 'email' | 'search' | 'number' | 'phone' | 'url';
|
|
4
4
|
export type FormFieldProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/** Label rendered above the input. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Placeholder text shown when the input is empty. */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Current value of the input (controlled). */
|
|
10
|
+
value?: string;
|
|
11
|
+
/** Called when the input text changes. */
|
|
12
|
+
onChangeText?: (text: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Logical input type. Mapped to keyboard, secure entry and capitalization.
|
|
15
|
+
* @default 'text'
|
|
16
|
+
*/
|
|
17
|
+
type?: FormFieldType;
|
|
18
|
+
/**
|
|
19
|
+
* Field name. When used inside `<Form>`, this is the key used to look up
|
|
20
|
+
* server-side `validationErrors` and to notify the form when the value
|
|
21
|
+
* changes so the error can clear.
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional element rendered before the input text (Figma slot "start").
|
|
26
|
+
* No leading element is rendered by default — the Figma FormField design
|
|
27
|
+
* does not include one.
|
|
28
|
+
*/
|
|
10
29
|
leading?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Optional element rendered after the input text (Figma slot "end").
|
|
32
|
+
* Typically used for an inline button (e.g. "Apply", "Show") or a status
|
|
33
|
+
* icon.
|
|
34
|
+
*/
|
|
11
35
|
trailing?: React.ReactNode;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Convenience prop to render a built-in icon as the leading element.
|
|
38
|
+
* Ignored when `leading` is provided. Defaults to `undefined` — meaning
|
|
39
|
+
* no leading icon, matching the Figma design.
|
|
40
|
+
*/
|
|
41
|
+
leadingIconName?: string;
|
|
42
|
+
/** Shows a required asterisk next to the label. */
|
|
43
|
+
isRequired?: boolean;
|
|
44
|
+
/** Disables interaction and dims the field. Resolves to "Read Only" state. */
|
|
45
|
+
isDisabled?: boolean;
|
|
46
|
+
/** Marks the field as invalid and shows `errorMessage`. */
|
|
47
|
+
isInvalid?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Renders the field in read-only mode (non-interactive but not dimmed).
|
|
50
|
+
* Resolves to the "Read Only" state.
|
|
51
|
+
*/
|
|
52
|
+
isReadOnly?: boolean;
|
|
53
|
+
/** Helper text displayed below the input. */
|
|
54
|
+
supportText?: string;
|
|
55
|
+
/** Replaces `supportText` when `isInvalid` is true. */
|
|
56
|
+
errorMessage?: string;
|
|
57
|
+
/** Maximum number of characters accepted. */
|
|
58
|
+
maxLength?: number;
|
|
59
|
+
/** When true, focuses the input on mount. */
|
|
60
|
+
autoFocus?: boolean;
|
|
61
|
+
/** Modes for design token resolution. */
|
|
62
|
+
modes?: Record<string, any>;
|
|
63
|
+
/** Style overrides for the outermost wrapper. */
|
|
19
64
|
style?: StyleProp<ViewStyle>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
65
|
+
/** Style overrides for the input row container. */
|
|
66
|
+
inputStyle?: StyleProp<ViewStyle>;
|
|
67
|
+
/** Style overrides for the input text. */
|
|
68
|
+
inputTextStyle?: StyleProp<TextStyle>;
|
|
69
|
+
/** Called when the input receives focus. */
|
|
70
|
+
onFocus?: RNTextInputProps['onFocus'];
|
|
71
|
+
/** Called when the input loses focus. */
|
|
72
|
+
onBlur?: RNTextInputProps['onBlur'];
|
|
73
|
+
/** Called when the user submits the input (e.g. presses return). */
|
|
74
|
+
onSubmitEditing?: RNTextInputProps['onSubmitEditing'];
|
|
75
|
+
/** Accessibility label. Defaults to `label` or `placeholder`. */
|
|
76
|
+
accessibilityLabel?: string;
|
|
77
|
+
/** Accessibility hint. */
|
|
78
|
+
accessibilityHint?: string;
|
|
79
|
+
/** Test identifier. */
|
|
80
|
+
testID?: string;
|
|
24
81
|
};
|
|
25
|
-
declare function FormField({ label, placeholder, value, onChangeText, type, leading, trailing, leadingIconName, isRequired, isDisabled, isInvalid, supportText, errorMessage, modes, style, onFocus, onBlur, accessibilityLabel, accessibilityHint, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
declare function FormField({ label, placeholder, value, onChangeText, type, name, leading, trailing, leadingIconName, isRequired, isDisabled, isInvalid, isReadOnly, supportText, errorMessage, maxLength, autoFocus, modes: propModes, style, inputStyle, inputTextStyle, onFocus, onBlur, onSubmitEditing, accessibilityLabel, accessibilityHint, testID, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
26
83
|
export default FormField;
|
|
27
84
|
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export type LinearProgressProps = {
|
|
4
|
+
/** Progress value between 0 and 1. Values are clamped. */
|
|
5
|
+
value?: number;
|
|
6
|
+
/** Design token modes for theming */
|
|
7
|
+
modes?: Record<string, any>;
|
|
8
|
+
/** Override container styles (the track wrapper) */
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
/** Override the track styles */
|
|
11
|
+
trackStyle?: StyleProp<ViewStyle>;
|
|
12
|
+
/** Override the indicator styles */
|
|
13
|
+
indicatorStyle?: StyleProp<ViewStyle>;
|
|
14
|
+
} & Omit<React.ComponentProps<typeof View>, 'style'>;
|
|
15
|
+
declare const LinearProgress: ({ value, modes, style, trackStyle, indicatorStyle, ...rest }: LinearProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default LinearProgress;
|
|
17
|
+
//# sourceMappingURL=LinearProgress.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export type LottieIntroBlockProps = {
|
|
4
|
+
/** Headline text shown below the media area. */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Whether to render the supportive paragraph below the title. */
|
|
7
|
+
showSupportText?: boolean;
|
|
8
|
+
/** Body/supportive text shown below the title. */
|
|
9
|
+
supportText?: string;
|
|
10
|
+
/** Whether to render the action button at the bottom. */
|
|
11
|
+
showButton?: 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
|
+
/**
|
|
17
|
+
* Custom slot for the media area (Lottie animation, illustration, or image).
|
|
18
|
+
* Should render at the design size of 117x117. If omitted, a neutral
|
|
19
|
+
* placeholder of the same size is rendered so the layout stays stable.
|
|
20
|
+
* `modes` are automatically cascaded into this slot.
|
|
21
|
+
*/
|
|
22
|
+
media?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Optional slot to fully override the action button.
|
|
25
|
+
* When provided, `showButton`, `buttonLabel`, and `onButtonPress` are ignored.
|
|
26
|
+
* `modes` are automatically cascaded into this slot.
|
|
27
|
+
*/
|
|
28
|
+
buttonSlot?: React.ReactNode;
|
|
29
|
+
/** Mode configuration for design-token theming. */
|
|
30
|
+
modes?: Record<string, any>;
|
|
31
|
+
/** Style overrides applied to the outer container. */
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
testID?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* LottieIntroBlock displays a centered onboarding/intro block composed of a
|
|
37
|
+
* media slot (typically a Lottie animation or illustration) above a title,
|
|
38
|
+
* an optional supportive paragraph, and an optional action button.
|
|
39
|
+
*
|
|
40
|
+
* All visual values are resolved from Figma design tokens via
|
|
41
|
+
* `getVariableByName`. Slots cascade the active `modes` to their children
|
|
42
|
+
* through `cloneChildrenWithModes`.
|
|
43
|
+
*
|
|
44
|
+
* @component
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <LottieIntroBlock
|
|
48
|
+
* title="Let's get to know how your financial health is doing"
|
|
49
|
+
* supportText="From assets to taxes, stay on top of everything in one simple view."
|
|
50
|
+
* buttonLabel="Get started"
|
|
51
|
+
* onButtonPress={() => navigate('NextScreen')}
|
|
52
|
+
* media={<MyLottiePlayer source={animationSource} />}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function LottieIntroBlock({ title, showSupportText, supportText, showButton, buttonLabel, onButtonPress, media, buttonSlot, modes: propModes, style, testID, }: LottieIntroBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export default LottieIntroBlock;
|
|
58
|
+
//# sourceMappingURL=LottieIntroBlock.d.ts.map
|