jfs-components 0.0.73 → 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 +23 -6
- package/lib/commonjs/components/AccountCard/AccountCard.js +247 -0
- package/lib/commonjs/components/AppBar/AppBar.js +17 -11
- package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +18 -2
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +40 -25
- 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/LottieIntroBlock/LottieIntroBlock.js +150 -0
- 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/Text/Text.js +9 -2
- package/lib/commonjs/components/Tooltip/Tooltip.js +34 -27
- package/lib/commonjs/components/index.js +60 -0
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/AccountCard/AccountCard.js +241 -0
- package/lib/module/components/AppBar/AppBar.js +17 -11
- package/lib/module/components/CardBankAccount/CardBankAccount.js +17 -2
- package/lib/module/components/CheckboxItem/CheckboxItem.js +41 -26
- 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/LottieIntroBlock/LottieIntroBlock.js +144 -0
- 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/Text/Text.js +9 -2
- package/lib/module/components/Tooltip/Tooltip.js +34 -27
- package/lib/module/components/index.js +7 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +81 -0
- package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +9 -2
- package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +18 -2
- 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/LottieIntroBlock/LottieIntroBlock.d.ts +58 -0
- 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/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 +7 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -3
- package/src/components/AccountCard/AccountCard.tsx +376 -0
- package/src/components/AppBar/AppBar.tsx +25 -14
- package/src/components/CardBankAccount/CardBankAccount.tsx +29 -3
- package/src/components/CheckboxItem/CheckboxItem.tsx +65 -30
- 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/LottieIntroBlock/LottieIntroBlock.tsx +202 -0
- 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/Text/Text.tsx +24 -3
- package/src/components/Tooltip/Tooltip.tsx +50 -25
- package/src/components/index.ts +15 -1
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/icons/registry.ts +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ImageSourcePropType, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export type AccountCardState = 'connected' | 'add';
|
|
4
|
+
export type AccountCardProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Visual variant of the card.
|
|
7
|
+
* - `'connected'` (default): renders a card preview image, a `title` and a
|
|
8
|
+
* `subtitle` below it (e.g. account name + masked number).
|
|
9
|
+
* - `'add'`: renders an empty placeholder field with a centred `+` icon
|
|
10
|
+
* and only the `title`. Use this for the "Add new account" affordance
|
|
11
|
+
* that pairs with a list of connected `AccountCard`s.
|
|
12
|
+
*/
|
|
13
|
+
state?: AccountCardState;
|
|
14
|
+
/** Title rendered below the image / placeholder. */
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Subtitle rendered below the title (e.g. masked account number).
|
|
18
|
+
* Only displayed when `state === 'connected'`.
|
|
19
|
+
*/
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Card preview image. Only used when `state === 'connected'` and
|
|
23
|
+
* `cardSlot` is not provided. Accepts a URL string or any
|
|
24
|
+
* `ImageSourcePropType` (e.g. `require('./card.png')`).
|
|
25
|
+
*/
|
|
26
|
+
imageSource?: ImageSourcePropType | string;
|
|
27
|
+
/**
|
|
28
|
+
* Aspect ratio (width / height) of the image / placeholder area.
|
|
29
|
+
* Defaults to the Figma reference ratio (`125 / 82` ≈ `1.524`).
|
|
30
|
+
*/
|
|
31
|
+
imageRatio?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Override the entire image / placeholder area with a custom node
|
|
34
|
+
* (e.g. a smaller `DebitCard`, a brand logo, a remote image).
|
|
35
|
+
* Receives `modes` automatically through `cloneChildrenWithModes`.
|
|
36
|
+
*/
|
|
37
|
+
cardSlot?: React.ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Icon name shown inside the "Add" placeholder. Defaults to `'ic_add'`.
|
|
40
|
+
* Only used when `state === 'add'`.
|
|
41
|
+
*/
|
|
42
|
+
addIcon?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Press handler. Applied to the whole card so the entire surface is a
|
|
45
|
+
* single touch target — particularly important for the `'add'` state,
|
|
46
|
+
* which behaves like a button.
|
|
47
|
+
*/
|
|
48
|
+
onPress?: () => void;
|
|
49
|
+
/** Disable interaction (also dims the card). */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/** Design token modes (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
52
|
+
modes?: Record<string, any>;
|
|
53
|
+
/** Container style override. */
|
|
54
|
+
style?: StyleProp<ViewStyle>;
|
|
55
|
+
/** Accessibility label (defaults to `title`). */
|
|
56
|
+
accessibilityLabel?: string;
|
|
57
|
+
/** Accessibility hint forwarded to the underlying `Pressable`. */
|
|
58
|
+
accessibilityHint?: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* `AccountCard` — a compact card preview used to represent a linked
|
|
62
|
+
* financial account in lists / grids.
|
|
63
|
+
*
|
|
64
|
+
* Two visual states are supported via the `state` prop:
|
|
65
|
+
*
|
|
66
|
+
* 1. `'connected'` (default): renders a small card-art preview, a bold
|
|
67
|
+
* `title` and a regular-weight `subtitle` (e.g. masked account number).
|
|
68
|
+
* 2. `'add'`: renders a soft-tinted placeholder field with a centred `+`
|
|
69
|
+
* icon and the `title` underneath, intended as the "add new account"
|
|
70
|
+
* entry-point at the end of a list of connected accounts.
|
|
71
|
+
*
|
|
72
|
+
* All values resolve through the `accountCard/*` design tokens with
|
|
73
|
+
* sensible Figma defaults so the card renders correctly out of the box.
|
|
74
|
+
*
|
|
75
|
+
* @component
|
|
76
|
+
* @param {AccountCardProps} props
|
|
77
|
+
*/
|
|
78
|
+
declare function AccountCard({ state, title, subtitle, imageSource, imageRatio, cardSlot, addIcon, onPress, disabled, modes, style, accessibilityLabel, accessibilityHint, }: AccountCardProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
declare const _default: React.MemoExoticComponent<typeof AccountCard>;
|
|
80
|
+
export default _default;
|
|
81
|
+
//# sourceMappingURL=AccountCard.d.ts.map
|
|
@@ -53,7 +53,14 @@ export type CardBankAccountProps = {
|
|
|
53
53
|
* `false`/`null` to hide it entirely.
|
|
54
54
|
*/
|
|
55
55
|
footer?: React.ReactNode | false | null;
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`).
|
|
58
|
+
*
|
|
59
|
+
* Defaults to `{ 'Button / Size': 'S', AppearanceBrand: 'Secondary',
|
|
60
|
+
* Emphasis: 'Medium' }` so the footer button matches the Figma reference
|
|
61
|
+
* out of the box. Caller-supplied modes are merged on top and can
|
|
62
|
+
* override any of the default keys.
|
|
63
|
+
*/
|
|
57
64
|
modes?: Record<string, any>;
|
|
58
65
|
/** Container style override. */
|
|
59
66
|
style?: StyleProp<ViewStyle>;
|
|
@@ -74,6 +81,6 @@ export type CardBankAccountProps = {
|
|
|
74
81
|
* @component
|
|
75
82
|
* @param {CardBankAccountProps} props
|
|
76
83
|
*/
|
|
77
|
-
declare function CardBankAccount({ institutionName, institutionAvatar, badge, headerSlot, items, children, buttonLabel, onButtonPress, footer, modes, style, accessibilityLabel, }: CardBankAccountProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
declare function CardBankAccount({ institutionName, institutionAvatar, badge, headerSlot, items, children, buttonLabel, onButtonPress, footer, modes: propModes, style, accessibilityLabel, }: CardBankAccountProps): import("react/jsx-runtime").JSX.Element;
|
|
78
85
|
export default CardBankAccount;
|
|
79
86
|
//# sourceMappingURL=CardBankAccount.d.ts.map
|
|
@@ -12,9 +12,21 @@ export type CheckboxItemProps = {
|
|
|
12
12
|
/** The label text rendered next to the checkbox. */
|
|
13
13
|
label?: React.ReactNode;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Position of the checkbox control relative to the label.
|
|
16
|
+
* - `'leading'` (default): checkbox is rendered on the left, then label, then optional `endSlot` on the right.
|
|
17
|
+
* - `'trailing'`: optional `endSlot` is rendered on the left, then label, then checkbox on the right.
|
|
18
|
+
*
|
|
19
|
+
* Matches the Figma "Control" variant on the Checkbox Item component.
|
|
20
|
+
*/
|
|
21
|
+
control?: 'leading' | 'trailing';
|
|
22
|
+
/**
|
|
23
|
+
* Optional content rendered in the row's end slot (e.g. a `Button`). When provided,
|
|
16
24
|
* it receives the same `modes` as the parent. Wrapped in a fixed-width container
|
|
17
25
|
* matching the Figma `endSlot` design.
|
|
26
|
+
*
|
|
27
|
+
* Placement depends on `control`:
|
|
28
|
+
* - With `control="leading"` the slot appears on the right edge (after the label).
|
|
29
|
+
* - With `control="trailing"` the slot appears on the left edge (before the label).
|
|
18
30
|
*/
|
|
19
31
|
endSlot?: React.ReactNode;
|
|
20
32
|
/** Width of the end slot container in pixels. Defaults to 80 to match the Figma reference. */
|
|
@@ -33,6 +45,9 @@ export type CheckboxItemProps = {
|
|
|
33
45
|
* single horizontal pressable row. Pressing anywhere on the row (outside of the
|
|
34
46
|
* `endSlot`) toggles the checkbox, mirroring the typical native form pattern.
|
|
35
47
|
*
|
|
48
|
+
* Use the `control` prop to swap the checkbox between the leading (left, default)
|
|
49
|
+
* and trailing (right) edge of the row. The `endSlot` flips to the opposite edge.
|
|
50
|
+
*
|
|
36
51
|
* Mirrors the Figma "Checkbox Item" component and uses the `checkboxItem/*`
|
|
37
52
|
* design tokens for typography and spacing.
|
|
38
53
|
*
|
|
@@ -47,10 +62,11 @@ export type CheckboxItemProps = {
|
|
|
47
62
|
* label="Fixed deposit • 0245"
|
|
48
63
|
* checked={checked}
|
|
49
64
|
* onValueChange={setChecked}
|
|
65
|
+
* control="leading"
|
|
50
66
|
* modes={{ 'Color Mode': 'Light' }}
|
|
51
67
|
* />
|
|
52
68
|
* ```
|
|
53
69
|
*/
|
|
54
|
-
declare function CheckboxItem({ checked: controlledChecked, defaultChecked, onValueChange, disabled, label, endSlot, endSlotWidth, modes, style, labelStyle, accessibilityLabel, }: CheckboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
declare function CheckboxItem({ checked: controlledChecked, defaultChecked, onValueChange, disabled, label, control, endSlot, endSlotWidth, modes, style, labelStyle, accessibilityLabel, }: CheckboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
55
71
|
export default CheckboxItem;
|
|
56
72
|
//# sourceMappingURL=CheckboxItem.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,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
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export type PageHeroProps = {
|
|
4
|
+
/** Small eyebrow text shown above the headline. */
|
|
5
|
+
eyebrow?: string;
|
|
6
|
+
/** Main headline text. Centered and bold. */
|
|
7
|
+
headline?: string;
|
|
8
|
+
/** Optional supporting text shown below the headline. */
|
|
9
|
+
supportingText?: string;
|
|
10
|
+
/** Whether to render the supporting text. */
|
|
11
|
+
showSupportingText?: boolean;
|
|
12
|
+
/** Label for the default action button. Ignored when `buttonSlot` is provided. */
|
|
13
|
+
buttonLabel?: string;
|
|
14
|
+
/** Press handler for the default action button. Ignored when `buttonSlot` is provided. */
|
|
15
|
+
onButtonPress?: () => void;
|
|
16
|
+
/** Whether to render the default action button. Ignored when `buttonSlot` is provided. */
|
|
17
|
+
showButton?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional slot to fully override the action button.
|
|
20
|
+
* When provided, `showButton`, `buttonLabel`, and `onButtonPress` are ignored.
|
|
21
|
+
* `modes` are automatically cascaded into this slot.
|
|
22
|
+
*/
|
|
23
|
+
buttonSlot?: React.ReactNode;
|
|
24
|
+
/** Mode configuration for design-token theming. */
|
|
25
|
+
modes?: Record<string, any>;
|
|
26
|
+
/** Style overrides applied to the outer container. */
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
testID?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* PageHero displays a centered hero block typically used at the top of a page
|
|
32
|
+
* or feature screen. It contains an eyebrow line, a large headline, an optional
|
|
33
|
+
* supporting line (e.g. price/timeline), and an optional action button.
|
|
34
|
+
*
|
|
35
|
+
* All visual values are resolved from Figma design tokens via
|
|
36
|
+
* `getVariableByName`. The button slot cascades the active `modes` to its
|
|
37
|
+
* children through `cloneChildrenWithModes`.
|
|
38
|
+
*
|
|
39
|
+
* @component
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <PageHero
|
|
43
|
+
* eyebrow="Upgrade to JioFinance+"
|
|
44
|
+
* headline="Resume earning cashback, extra points, and 1% gold"
|
|
45
|
+
* supportingText="₹999/year · ₹0 until 2027"
|
|
46
|
+
* buttonLabel="Renew for free"
|
|
47
|
+
* onButtonPress={() => navigate('Upgrade')}
|
|
48
|
+
* />
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare function PageHero({ eyebrow, headline, supportingText, showSupportingText, buttonLabel, onButtonPress, showButton, buttonSlot, modes: propModes, style, testID, }: PageHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export default PageHero;
|
|
53
|
+
//# sourceMappingURL=PageHero.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ImageStyle, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type UnifiedSource } from '../../utils/MediaSource';
|
|
4
|
+
export type PoweredByLabelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Label copy. Defaults to "Powered by RBI-regulated account aggregator"
|
|
7
|
+
* to match the Figma reference.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Brand logo source. Accepts any {@link UnifiedSource} — remote URI, SVG
|
|
12
|
+
* XML string, `require()` asset, SVG React component, or React element.
|
|
13
|
+
* Defaults to the bundled FINVU logo so the component renders correctly
|
|
14
|
+
* without any caller-provided image.
|
|
15
|
+
*
|
|
16
|
+
* Ignored when `imageSlot` is provided.
|
|
17
|
+
*/
|
|
18
|
+
imageSource?: UnifiedSource;
|
|
19
|
+
/**
|
|
20
|
+
* Rendered width of the logo in px. Defaults to `33` to match Figma.
|
|
21
|
+
*/
|
|
22
|
+
imageWidth?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Rendered height of the logo in px. Defaults to `12` to match Figma.
|
|
25
|
+
*/
|
|
26
|
+
imageHeight?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Replace the default `Image` entirely (e.g. with a vector logo,
|
|
29
|
+
* `BrandChip`, or custom layout). Receives `modes` recursively.
|
|
30
|
+
* Overrides `imageSource`.
|
|
31
|
+
*/
|
|
32
|
+
imageSlot?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Design token modes for theming (e.g. `{ 'Color Mode': 'Dark' }`).
|
|
35
|
+
*/
|
|
36
|
+
modes?: Record<string, any>;
|
|
37
|
+
/** Container style override. */
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Label text style override. */
|
|
40
|
+
textStyle?: StyleProp<TextStyle>;
|
|
41
|
+
/** Logo image style override (size/resize behaviour, etc.). */
|
|
42
|
+
imageStyle?: StyleProp<ImageStyle>;
|
|
43
|
+
/**
|
|
44
|
+
* Accessibility label. Defaults to the visible `label` so the brand image
|
|
45
|
+
* (which is decorative) does not need to be announced separately.
|
|
46
|
+
*/
|
|
47
|
+
accessibilityLabel?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* `PoweredByLabel` renders the small "Powered by RBI-regulated account
|
|
51
|
+
* aggregator" badge with a trailing brand logo, used to attribute the
|
|
52
|
+
* underlying account-aggregator partner in flows such as bank-account
|
|
53
|
+
* linking and consent screens.
|
|
54
|
+
*
|
|
55
|
+
* The component is composed of:
|
|
56
|
+
*
|
|
57
|
+
* 1. A token-styled pill container (`poweredByLabel/background`,
|
|
58
|
+
* `poweredByLabel/padding/*`).
|
|
59
|
+
* 2. The disclosure copy rendered through the `poweredByLabel/*` typography
|
|
60
|
+
* tokens.
|
|
61
|
+
* 3. A configurable brand logo slot. Defaults to the bundled FINVU mark, but
|
|
62
|
+
* callers can pass any image via `imageSource` or fully replace the slot
|
|
63
|
+
* via `imageSlot`.
|
|
64
|
+
*
|
|
65
|
+
* @component
|
|
66
|
+
* @param {PoweredByLabelProps} props
|
|
67
|
+
*/
|
|
68
|
+
declare function PoweredByLabel({ label, imageSource, imageWidth, imageHeight, imageSlot, modes: propModes, style, textStyle, imageStyle, accessibilityLabel, }: PoweredByLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export default PoweredByLabel;
|
|
70
|
+
//# sourceMappingURL=PoweredByLabel.d.ts.map
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type TextStyle, type StyleProp } from 'react-native';
|
|
2
3
|
export type TextProps = {
|
|
3
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The text content to display. You may also pass content as JSX children
|
|
6
|
+
* (e.g. `<Text>Hello</Text>`) — when both are provided, `children` wins.
|
|
7
|
+
*/
|
|
4
8
|
text?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Child nodes (string, number, or nested <Text>/<RNText> elements). This
|
|
11
|
+
* mirrors the standard React Native `<Text>` API so the component is a
|
|
12
|
+
* near-drop-in replacement.
|
|
13
|
+
*/
|
|
14
|
+
children?: React.ReactNode;
|
|
5
15
|
/** Horizontal alignment of the text. */
|
|
6
16
|
textAlign?: 'Left' | 'Center';
|
|
7
17
|
/** Modes configuration for design token resolution. */
|
|
@@ -11,6 +21,6 @@ export type TextProps = {
|
|
|
11
21
|
/** Number of lines to limit the text to. */
|
|
12
22
|
numberOfLines?: number;
|
|
13
23
|
};
|
|
14
|
-
declare function Text({ text, textAlign, modes, style, numberOfLines, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function Text({ text, children, textAlign, modes, style, numberOfLines, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
15
25
|
export default Text;
|
|
16
26
|
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { Pressable } from 'react-native';
|
|
2
|
+
import { Pressable, ViewStyle } from 'react-native';
|
|
3
3
|
export type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
4
4
|
export type TooltipProps = {
|
|
5
5
|
children: ReactNode;
|
|
@@ -21,6 +21,17 @@ export declare function TooltipTrigger({ children, asChild, ...props }: TooltipT
|
|
|
21
21
|
export type TooltipContentProps = {
|
|
22
22
|
children: ReactNode;
|
|
23
23
|
sideOffset?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Vertical spacing between slot children, in pixels.
|
|
26
|
+
* The content area acts as a vertical slot: any children passed in
|
|
27
|
+
* (text, icons, custom views, etc.) are stacked top-to-bottom with this gap.
|
|
28
|
+
*/
|
|
29
|
+
gap?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Cross-axis alignment of slot children.
|
|
32
|
+
* Defaults to `flex-start` so multi-line/multi-element content lines up on the left.
|
|
33
|
+
*/
|
|
34
|
+
alignItems?: ViewStyle['alignItems'];
|
|
24
35
|
};
|
|
25
|
-
export declare function TooltipContent({ children, sideOffset }: TooltipContentProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function TooltipContent({ children, sideOffset, gap, alignItems, }: TooltipContentProps): import("react/jsx-runtime").JSX.Element;
|
|
26
37
|
//# sourceMappingURL=Tooltip.d.ts.map
|