jfs-components 0.1.28 → 0.1.32
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 -2
- package/lib/commonjs/components/CategoryCard/CategoryCard.js +264 -0
- package/lib/commonjs/components/CompareTable/CompareTable.js +247 -25
- package/lib/commonjs/components/ContentSheet/ContentSheet.js +91 -8
- package/lib/commonjs/components/CounterBadge/CounterBadge.js +78 -0
- package/lib/commonjs/components/FavoriteToggle/FavoriteToggle.js +180 -0
- package/lib/commonjs/components/HelloJioInput/HelloJioInput.js +287 -0
- package/lib/commonjs/components/MoneyValue/MoneyValue.js +179 -54
- package/lib/commonjs/components/PdpCcCard/PdpCcCard.js +7 -1
- package/lib/commonjs/components/Table/Table.js +27 -7
- package/lib/commonjs/components/ValueBackMetric/ValueBackMetric.js +219 -0
- package/lib/commonjs/components/index.js +35 -0
- package/lib/commonjs/design-tokens/figma-modes.generated.js +3 -0
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/CategoryCard/CategoryCard.js +258 -0
- package/lib/module/components/CompareTable/CompareTable.js +247 -26
- package/lib/module/components/ContentSheet/ContentSheet.js +94 -11
- package/lib/module/components/CounterBadge/CounterBadge.js +73 -0
- package/lib/module/components/FavoriteToggle/FavoriteToggle.js +174 -0
- package/lib/module/components/HelloJioInput/HelloJioInput.js +281 -0
- package/lib/module/components/MoneyValue/MoneyValue.js +182 -57
- package/lib/module/components/PdpCcCard/PdpCcCard.js +7 -1
- package/lib/module/components/Table/Table.js +27 -7
- package/lib/module/components/ValueBackMetric/ValueBackMetric.js +214 -0
- package/lib/module/components/index.js +6 -1
- package/lib/module/design-tokens/figma-modes.generated.js +3 -0
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/components/CategoryCard/CategoryCard.d.ts +72 -0
- package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +36 -1
- package/lib/typescript/src/components/ContentSheet/ContentSheet.d.ts +20 -1
- package/lib/typescript/src/components/CounterBadge/CounterBadge.d.ts +19 -0
- package/lib/typescript/src/components/FavoriteToggle/FavoriteToggle.d.ts +66 -0
- package/lib/typescript/src/components/HelloJioInput/HelloJioInput.d.ts +111 -0
- package/lib/typescript/src/components/MoneyValue/MoneyValue.d.ts +10 -1
- package/lib/typescript/src/components/PdpCcCard/PdpCcCard.d.ts +25 -1
- package/lib/typescript/src/components/Table/Table.d.ts +9 -1
- package/lib/typescript/src/components/ValueBackMetric/ValueBackMetric.d.ts +86 -0
- package/lib/typescript/src/components/index.d.ts +5 -0
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/CategoryCard/CategoryCard.tsx +404 -0
- package/src/components/CompareTable/CompareTable.tsx +324 -30
- package/src/components/ContentSheet/ContentSheet.tsx +120 -11
- package/src/components/CounterBadge/CounterBadge.tsx +95 -0
- package/src/components/FavoriteToggle/FavoriteToggle.tsx +243 -0
- package/src/components/HelloJioInput/HelloJioInput.tsx +513 -0
- package/src/components/MoneyValue/MoneyValue.tsx +216 -65
- package/src/components/PdpCcCard/PdpCcCard.tsx +36 -1
- package/src/components/Table/Table.tsx +29 -4
- package/src/components/ValueBackMetric/ValueBackMetric.tsx +298 -0
- package/src/components/index.ts +5 -0
- package/src/design-tokens/figma-modes.generated.ts +3 -0
- package/src/icons/registry.ts +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AccessibilityState, type ImageSourcePropType, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type SafePressableProps, type WebAccessibilityProps } from '../../utils/web-platform-utils';
|
|
4
|
+
import type { Modes } from '../../design-tokens';
|
|
5
|
+
export type CategoryCardProps = SafePressableProps & {
|
|
6
|
+
/** Bottom label (e.g. `"Popular"`). */
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Image shown in the card centre. Ignored when `imageSlot` is provided.
|
|
10
|
+
* Accepts a remote URL string, `{ uri }` object, or `require()`-ed asset.
|
|
11
|
+
*/
|
|
12
|
+
imageSource?: ImageSourcePropType | string;
|
|
13
|
+
/**
|
|
14
|
+
* Slot replacing the default `Image`. Receives `modes` recursively so inner
|
|
15
|
+
* components inherit theming.
|
|
16
|
+
*/
|
|
17
|
+
imageSlot?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Optional badge label rendered as an overlapping pill at the top edge.
|
|
20
|
+
* Omit or pass `undefined` to hide the badge.
|
|
21
|
+
*/
|
|
22
|
+
badge?: string;
|
|
23
|
+
/** Whether the card is in the selected / active state. */
|
|
24
|
+
active?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Fixed width of the card in dp. Defaults to `60` per the Figma spec.
|
|
27
|
+
*/
|
|
28
|
+
width?: number;
|
|
29
|
+
/**
|
|
30
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
31
|
+
* shown and any `numberOfLines` clamp is ignored, so the label wraps to as many
|
|
32
|
+
* lines as it needs even when horizontal space is tight. Same behaviour as
|
|
33
|
+
* {@link Text}'s `disableTruncation`.
|
|
34
|
+
*/
|
|
35
|
+
disableTruncation?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When `true`, forces the label onto a single line with no wrapping (implies
|
|
38
|
+
* `disableTruncation`). On web the line overflows horizontally instead of
|
|
39
|
+
* wrapping or truncating. Same behaviour as {@link Text}'s `singleLine`.
|
|
40
|
+
*/
|
|
41
|
+
singleLine?: boolean;
|
|
42
|
+
/** Press handler — the card is always a `Pressable`. */
|
|
43
|
+
onPress?: () => void;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Design token modes for theming (e.g. `{ 'Color Mode': 'Light' }`). */
|
|
46
|
+
modes?: Modes;
|
|
47
|
+
/** Container style override. */
|
|
48
|
+
style?: StyleProp<ViewStyle>;
|
|
49
|
+
/** Label style override. */
|
|
50
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
51
|
+
accessibilityLabel?: string;
|
|
52
|
+
accessibilityHint?: string;
|
|
53
|
+
accessibilityState?: AccessibilityState;
|
|
54
|
+
webAccessibilityProps?: WebAccessibilityProps;
|
|
55
|
+
testID?: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* `CategoryCard` is a compact, tappable tile for category pickers and
|
|
59
|
+
* merchandising rails. It stacks a square image above a short label and can
|
|
60
|
+
* optionally show an overlapping badge at the top edge. Cards are typically
|
|
61
|
+
* laid out in a horizontal `ScrollView` or `HStack`.
|
|
62
|
+
*
|
|
63
|
+
* All visual values resolve through the `cardTab/*` design tokens with
|
|
64
|
+
* sensible Figma defaults so the card renders correctly out of the box.
|
|
65
|
+
*
|
|
66
|
+
* @component
|
|
67
|
+
* @param {CategoryCardProps} props
|
|
68
|
+
*/
|
|
69
|
+
declare function CategoryCard({ label, imageSource, imageSlot, badge, active, width, disableTruncation, singleLine, onPress, disabled, modes: propModes, style, labelStyle, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, testID, ...rest }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
declare const _default: React.MemoExoticComponent<typeof CategoryCard>;
|
|
71
|
+
export default _default;
|
|
72
|
+
//# sourceMappingURL=CategoryCard.d.ts.map
|
|
@@ -76,6 +76,41 @@ export type CompareTableProps = {
|
|
|
76
76
|
* lines as it needs even when horizontal space is tight.
|
|
77
77
|
*/
|
|
78
78
|
disableTruncation?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Fixed width (px) for every selection card and every table cell — all
|
|
81
|
+
* columns share this width. When set, the component enters **scroll mode**:
|
|
82
|
+
*
|
|
83
|
+
* - The cards row and each section's table body become independent
|
|
84
|
+
* horizontal `ScrollView`s whose scroll events are **chained** — moving
|
|
85
|
+
* one moves every other in lockstep (the cards always stay aligned with
|
|
86
|
+
* the cells beneath them).
|
|
87
|
+
* - The cards row becomes a **sticky header** at the top: it pins in place
|
|
88
|
+
* on the vertical axis (does not scroll away) while the sections scroll
|
|
89
|
+
* beneath it. Requires the host to give `CompareTable` a bounded height.
|
|
90
|
+
* - The gray table-header rows (each section's `header`) are rendered
|
|
91
|
+
* full-width **outside** the horizontal scroll, so they stay put
|
|
92
|
+
* horizontally (they don't slide with the cells) while still scrolling
|
|
93
|
+
* vertically with the table.
|
|
94
|
+
*
|
|
95
|
+
* Omit to keep the original flex layout (columns share the available width,
|
|
96
|
+
* no scrolling). @default undefined
|
|
97
|
+
*/
|
|
98
|
+
columnWidth?: number;
|
|
99
|
+
/**
|
|
100
|
+
* When `true` (default), each section's header row (the gray header label)
|
|
101
|
+
* sticks to the top of the viewport when scrolling vertically, with multiple
|
|
102
|
+
* sticky headers stacking up as each reaches the top. Only applies in
|
|
103
|
+
* fixed-width scroll mode (`columnWidth` is set).
|
|
104
|
+
* @default true
|
|
105
|
+
*/
|
|
106
|
+
stickyHeaders?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* When `true` (default), the section header label stays fixed on the left
|
|
109
|
+
* when scrolling horizontally. Only applies in fixed-width scroll mode
|
|
110
|
+
* (`columnWidth` is set).
|
|
111
|
+
* @default true
|
|
112
|
+
*/
|
|
113
|
+
stickyHeaderLabel?: boolean;
|
|
79
114
|
};
|
|
80
115
|
/**
|
|
81
116
|
* CompareTable renders a product comparison surface: a row of selection cards
|
|
@@ -89,6 +124,6 @@ export type CompareTableProps = {
|
|
|
89
124
|
*
|
|
90
125
|
* @component
|
|
91
126
|
*/
|
|
92
|
-
declare function CompareTable({ columns, sections, onAddColumn, addColumnLabel, maxColumns, modes, style, disableTruncation, }: CompareTableProps): import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
declare function CompareTable({ columns, sections, onAddColumn, addColumnLabel, maxColumns, modes, style, disableTruncation, columnWidth, stickyHeaders, stickyHeaderLabel, }: CompareTableProps): import("react/jsx-runtime").JSX.Element;
|
|
93
128
|
export default CompareTable;
|
|
94
129
|
//# sourceMappingURL=CompareTable.d.ts.map
|
|
@@ -53,6 +53,25 @@ export type ContentSheetProps = {
|
|
|
53
53
|
* works in both modes.
|
|
54
54
|
*/
|
|
55
55
|
pinToBottom?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Controls whether the sheet is on-screen. When this becomes `true` the sheet
|
|
58
|
+
* springs up from the bottom edge (off-screen → on-screen) using the same
|
|
59
|
+
* spring as the {@link Drawer} (`damping: 32`, `stiffness: 300`); when it
|
|
60
|
+
* becomes `false` it springs back down below the bottom edge. The sheet pops
|
|
61
|
+
* up on mount by default.
|
|
62
|
+
*
|
|
63
|
+
* The animation runs entirely on the UI thread via `react-native-reanimated`
|
|
64
|
+
* (no re-renders) and composes with keyboard avoidance — the entrance
|
|
65
|
+
* `translateY` and the keyboard `translateY` are summed in a single
|
|
66
|
+
* `useAnimatedStyle`. Default `true`.
|
|
67
|
+
*/
|
|
68
|
+
visible?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Max height of the sheet as a fraction (0–1) of the screen height.
|
|
71
|
+
* When content reaches this height the sheet becomes vertically scrollable.
|
|
72
|
+
* Default `0.7`.
|
|
73
|
+
*/
|
|
74
|
+
maxHeightPercent?: number;
|
|
56
75
|
/** Optional style override applied to the sheet container. */
|
|
57
76
|
style?: StyleProp<ViewStyle>;
|
|
58
77
|
} & Omit<ViewProps, 'style' | 'children'>;
|
|
@@ -72,6 +91,6 @@ export type ContentSheetProps = {
|
|
|
72
91
|
* - **Token-driven** styling via `getVariableByName` + `modes`, with `modes`
|
|
73
92
|
* cascaded to all slot children.
|
|
74
93
|
*/
|
|
75
|
-
declare function ContentSheet({ children, modes, title, avoidKeyboard, keyboardSpacing, safeAreaBottom, pinToBottom, style, ...rest }: ContentSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
declare function ContentSheet({ children, modes, title, avoidKeyboard, keyboardSpacing, safeAreaBottom, pinToBottom, visible, maxHeightPercent, style, ...rest }: ContentSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
76
95
|
export default ContentSheet;
|
|
77
96
|
//# sourceMappingURL=ContentSheet.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { Modes } from '../../design-tokens';
|
|
4
|
+
export type CounterBadgeProps = {
|
|
5
|
+
/** The value shown inside the badge. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Modes used to resolve design tokens. Counter Badge exposes a single `Default` mode. */
|
|
8
|
+
modes?: Modes;
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
} & Omit<React.ComponentProps<typeof View>, 'style'>;
|
|
11
|
+
/**
|
|
12
|
+
* Counter Badge — a small token-driven pill that displays a value.
|
|
13
|
+
*
|
|
14
|
+
* All visual attributes resolve from the Figma `counterBadge/*` tokens via
|
|
15
|
+
* `getVariableByName`.
|
|
16
|
+
*/
|
|
17
|
+
declare function CounterBadge({ value, modes, style, ...rest }: CounterBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default CounterBadge;
|
|
19
|
+
//# sourceMappingURL=CounterBadge.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AccessibilityState, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type SafePressableProps, type WebAccessibilityProps } from '../../utils/web-platform-utils';
|
|
4
|
+
import type { Modes } from '../../design-tokens';
|
|
5
|
+
export type FavoriteToggleProps = SafePressableProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the toggle is favorited (active) — **controlled**. When provided,
|
|
8
|
+
* the component reflects this value and defers state ownership to the parent
|
|
9
|
+
* (update it in `onChange`). Omit it to use the component uncontrolled with
|
|
10
|
+
* `defaultActive`.
|
|
11
|
+
*/
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Initial favorited state for **uncontrolled** usage. Ignored when `isActive`
|
|
15
|
+
* is provided. Defaults to `false`.
|
|
16
|
+
*/
|
|
17
|
+
defaultActive?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Icon rendered inside the toggle. Defaults to the heart glyph
|
|
20
|
+
* (`ic_favorite`). Both Figma variants use the same filled heart; only its
|
|
21
|
+
* color changes with state (white when inactive, gold when active). Figma
|
|
22
|
+
* hardcodes the heart, so this prop is exposed purely for future reuse.
|
|
23
|
+
*/
|
|
24
|
+
icon?: string;
|
|
25
|
+
/** Fired on press with the next (toggled) active state. */
|
|
26
|
+
onChange?: (next: boolean) => void;
|
|
27
|
+
/** Raw press handler, fired alongside `onChange`. */
|
|
28
|
+
onPress?: () => void;
|
|
29
|
+
/** Modes used to resolve design tokens. */
|
|
30
|
+
modes?: Modes;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Accessibility label; defaults to `"Favorite"`. */
|
|
33
|
+
accessibilityLabel?: string;
|
|
34
|
+
accessibilityHint?: string;
|
|
35
|
+
accessibilityState?: AccessibilityState;
|
|
36
|
+
webAccessibilityProps?: WebAccessibilityProps;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
/**
|
|
39
|
+
* Explicit per-instance loading override. When `true`, renders a same-size
|
|
40
|
+
* circular skeleton instead of the toggle. Defaults to inheriting from the
|
|
41
|
+
* surrounding `<SkeletonGroup>`.
|
|
42
|
+
*/
|
|
43
|
+
loading?: boolean;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Circular glass favorite (heart) toggle, mirroring the Figma `Favorite Toggle`
|
|
47
|
+
* component set's boolean `isActive` variant:
|
|
48
|
+
* - inactive: translucent frosted circle (`#ffffff33` over a `blur/minimal`
|
|
49
|
+
* backdrop) with a white heart.
|
|
50
|
+
* - active: solid white circle with a gold (`#cea15a`) heart.
|
|
51
|
+
* Both variants share the identical filled-heart glyph; only the background and
|
|
52
|
+
* icon colors change between states.
|
|
53
|
+
*
|
|
54
|
+
* Controlled or uncontrolled: pass `isActive` (+ `onChange`) to control it, or
|
|
55
|
+
* omit `isActive` and use `defaultActive` to let the component own the state.
|
|
56
|
+
*
|
|
57
|
+
* Visual attributes resolve from the `favoriteToggle/*` / `color/favoriteToggle/*`
|
|
58
|
+
* tokens via `getVariableByName`. Those tokens are not yet in the committed
|
|
59
|
+
* variables snapshot, so the component currently runs on the Figma-node values
|
|
60
|
+
* as fallbacks; once the tokens are exported (under the `isActive` collection,
|
|
61
|
+
* modes `False`/`True`) the resolver takes over.
|
|
62
|
+
*/
|
|
63
|
+
declare function FavoriteToggle({ isActive: controlledActive, defaultActive, icon, onChange, onPress, modes, disabled, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, style, loading, ...rest }: FavoriteToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
declare const _default: React.MemoExoticComponent<typeof FavoriteToggle>;
|
|
65
|
+
export default _default;
|
|
66
|
+
//# sourceMappingURL=FavoriteToggle.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextInput as RNTextInput, type StyleProp, type ViewStyle, type TextStyle, type TextInputProps as RNTextInputProps } from 'react-native';
|
|
3
|
+
import type { Modes } from '../../design-tokens';
|
|
4
|
+
export type HelloJioInputProps = {
|
|
5
|
+
/** Placeholder shown when empty. Defaults to `"Ask me anything"`. */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** Controlled value. Pair with `onChangeText`. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Uncontrolled initial value. Ignored when `value` is provided. */
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
/** Called whenever the text changes. */
|
|
12
|
+
onChangeText?: (text: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Called when the user submits — either via the send button or the keyboard
|
|
15
|
+
* return key. Receives the current text. This is the primary action hook.
|
|
16
|
+
*/
|
|
17
|
+
onSubmit?: (text: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Leading icon name from the registry. Defaults to `"ic_hellojio"`.
|
|
20
|
+
* Ignored when `leading` is provided.
|
|
21
|
+
*/
|
|
22
|
+
leadingIconName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Slot replacing the default leading icon (Figma Slot "start"). Receives
|
|
25
|
+
* `modes` recursively.
|
|
26
|
+
*/
|
|
27
|
+
leading?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Slot replacing the default send `IconButton` (Figma Slot "end").
|
|
30
|
+
* Pass `null` to hide the trailing control entirely.
|
|
31
|
+
*/
|
|
32
|
+
trailing?: React.ReactNode | null;
|
|
33
|
+
/**
|
|
34
|
+
* Icon name for the default send button. Defaults to `"ic_send_message"`.
|
|
35
|
+
* Ignored when `trailing` is provided.
|
|
36
|
+
*/
|
|
37
|
+
sendIconName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* When `true`, renders the IdleJioPlus glass surface while unfocused.
|
|
40
|
+
* Focus still switches to the Active (solid white + border) state.
|
|
41
|
+
*/
|
|
42
|
+
jioPlus?: boolean;
|
|
43
|
+
/** Disables typing and the send button. */
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Design token modes. Visual Idle/Active/IdleJioPlus is derived from focus + `jioPlus`. */
|
|
46
|
+
modes?: Modes;
|
|
47
|
+
/** Container style override. */
|
|
48
|
+
style?: StyleProp<ViewStyle>;
|
|
49
|
+
/** Text input style override. */
|
|
50
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
51
|
+
accessibilityLabel?: string;
|
|
52
|
+
accessibilityHint?: string;
|
|
53
|
+
testID?: string;
|
|
54
|
+
onFocus?: RNTextInputProps['onFocus'];
|
|
55
|
+
onBlur?: RNTextInputProps['onBlur'];
|
|
56
|
+
} & Omit<RNTextInputProps, 'style' | 'value' | 'defaultValue' | 'onChangeText' | 'onFocus' | 'onBlur' | 'placeholder' | 'editable' | 'onSubmitEditing'>;
|
|
57
|
+
declare const _default: React.NamedExoticComponent<{
|
|
58
|
+
/** Placeholder shown when empty. Defaults to `"Ask me anything"`. */
|
|
59
|
+
placeholder?: string;
|
|
60
|
+
/** Controlled value. Pair with `onChangeText`. */
|
|
61
|
+
value?: string;
|
|
62
|
+
/** Uncontrolled initial value. Ignored when `value` is provided. */
|
|
63
|
+
defaultValue?: string;
|
|
64
|
+
/** Called whenever the text changes. */
|
|
65
|
+
onChangeText?: (text: string) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Called when the user submits — either via the send button or the keyboard
|
|
68
|
+
* return key. Receives the current text. This is the primary action hook.
|
|
69
|
+
*/
|
|
70
|
+
onSubmit?: (text: string) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Leading icon name from the registry. Defaults to `"ic_hellojio"`.
|
|
73
|
+
* Ignored when `leading` is provided.
|
|
74
|
+
*/
|
|
75
|
+
leadingIconName?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Slot replacing the default leading icon (Figma Slot "start"). Receives
|
|
78
|
+
* `modes` recursively.
|
|
79
|
+
*/
|
|
80
|
+
leading?: React.ReactNode;
|
|
81
|
+
/**
|
|
82
|
+
* Slot replacing the default send `IconButton` (Figma Slot "end").
|
|
83
|
+
* Pass `null` to hide the trailing control entirely.
|
|
84
|
+
*/
|
|
85
|
+
trailing?: React.ReactNode | null;
|
|
86
|
+
/**
|
|
87
|
+
* Icon name for the default send button. Defaults to `"ic_send_message"`.
|
|
88
|
+
* Ignored when `trailing` is provided.
|
|
89
|
+
*/
|
|
90
|
+
sendIconName?: string;
|
|
91
|
+
/**
|
|
92
|
+
* When `true`, renders the IdleJioPlus glass surface while unfocused.
|
|
93
|
+
* Focus still switches to the Active (solid white + border) state.
|
|
94
|
+
*/
|
|
95
|
+
jioPlus?: boolean;
|
|
96
|
+
/** Disables typing and the send button. */
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
/** Design token modes. Visual Idle/Active/IdleJioPlus is derived from focus + `jioPlus`. */
|
|
99
|
+
modes?: Modes;
|
|
100
|
+
/** Container style override. */
|
|
101
|
+
style?: StyleProp<ViewStyle>;
|
|
102
|
+
/** Text input style override. */
|
|
103
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
104
|
+
accessibilityLabel?: string;
|
|
105
|
+
accessibilityHint?: string;
|
|
106
|
+
testID?: string;
|
|
107
|
+
onFocus?: RNTextInputProps["onFocus"];
|
|
108
|
+
onBlur?: RNTextInputProps["onBlur"];
|
|
109
|
+
} & Omit<RNTextInputProps, "style" | "value" | "onFocus" | "onBlur" | "defaultValue" | "placeholder" | "editable" | "onChangeText" | "onSubmitEditing"> & React.RefAttributes<RNTextInput>>;
|
|
110
|
+
export default _default;
|
|
111
|
+
//# sourceMappingURL=HelloJioInput.d.ts.map
|
|
@@ -12,6 +12,15 @@ export type MoneyValueProps = {
|
|
|
12
12
|
hidden?: boolean;
|
|
13
13
|
/** When true, a blinking vertical cursor is shown at the end of the value text. */
|
|
14
14
|
focused?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* When true, tapping the component enters an inline edit mode where the value
|
|
17
|
+
* becomes a numeric TextInput. The user can type digits or delete the existing
|
|
18
|
+
* amount. Only numeric characters (including one decimal point) are accepted.
|
|
19
|
+
* On blur or submit the edit is committed and the display restores.
|
|
20
|
+
*/
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
/** Called when the value changes during editing (after commit on blur). */
|
|
23
|
+
onValueChange?: (newValue: string | number) => void;
|
|
15
24
|
/** Modes configuration mapped to Figma tokens. */
|
|
16
25
|
modes?: Modes;
|
|
17
26
|
style?: StyleProp<ViewStyle>;
|
|
@@ -32,6 +41,6 @@ export type MoneyValueProps = {
|
|
|
32
41
|
* the `focused` prop is provided to this component, it will display a natural
|
|
33
42
|
* blinking text cursor.
|
|
34
43
|
*/
|
|
35
|
-
declare function MoneyValue({ value, currency, negative, focused, hidden, modes, style, valueStyle, currencyStyle, negativeSignStyle, accessibilityLabel, accessibilityHint, onPress, ...rest }: MoneyValueProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function MoneyValue({ value, currency, negative, focused, hidden, editable, onValueChange, modes, style, valueStyle, currencyStyle, negativeSignStyle, accessibilityLabel, accessibilityHint, onPress, ...rest }: MoneyValueProps): import("react/jsx-runtime").JSX.Element;
|
|
36
45
|
export default MoneyValue;
|
|
37
46
|
//# sourceMappingURL=MoneyValue.d.ts.map
|
|
@@ -32,6 +32,30 @@ export interface PdpCcCardProps {
|
|
|
32
32
|
title?: string;
|
|
33
33
|
/** Subtitle rendered below the title (14px medium). */
|
|
34
34
|
subtitle?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Number of lines to limit the title to. The `Title` component defaults to
|
|
37
|
+
* `1` when this is unset, so the headline is a single line with an ellipsis
|
|
38
|
+
* by default. Pass a larger value (e.g. `2`) to allow the title to wrap onto
|
|
39
|
+
* that many lines before truncating, or set {@link disableTruncation} to
|
|
40
|
+
* remove the clamp entirely. The subtitle is never line-clamped.
|
|
41
|
+
*/
|
|
42
|
+
numberOfLines?: number;
|
|
43
|
+
/**
|
|
44
|
+
* When `true`, disables truncation for both the title and subtitle: the
|
|
45
|
+
* trailing ellipsis (`…`) is never shown and the `numberOfLines` clamp is
|
|
46
|
+
* ignored. The text is also never shrunk by a tight parent — it keeps its
|
|
47
|
+
* full intrinsic size and overflows (even breaking the parent layout) rather
|
|
48
|
+
* than ever clipping into an ellipsis. The text still wraps onto multiple
|
|
49
|
+
* lines.
|
|
50
|
+
*/
|
|
51
|
+
disableTruncation?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* When `true`, forces both the title and subtitle onto a single line with no
|
|
54
|
+
* wrapping (implies {@link disableTruncation}). On web the line overflows
|
|
55
|
+
* horizontally — brutally breaking the parent layout if it has to — instead
|
|
56
|
+
* of wrapping or truncating.
|
|
57
|
+
*/
|
|
58
|
+
singleLine?: boolean;
|
|
35
59
|
/**
|
|
36
60
|
* The metric columns rendered in the stats row. Vertical dividers are
|
|
37
61
|
* inserted automatically between adjacent metrics. Defaults to two sample
|
|
@@ -79,6 +103,6 @@ export interface PdpCcCardProps {
|
|
|
79
103
|
*
|
|
80
104
|
* All defaults can be overridden via `modes`.
|
|
81
105
|
*/
|
|
82
|
-
declare function PdpCcCard({ imageSource, imageWidth, imageHeight, media, title, subtitle, metrics, buttonLabel, buttonIcon, onButtonPress, button, showButton, onPress, width, modes, style, accessibilityLabel, }: PdpCcCardProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
declare function PdpCcCard({ imageSource, imageWidth, imageHeight, media, title, subtitle, numberOfLines, disableTruncation, singleLine, metrics, buttonLabel, buttonIcon, onButtonPress, button, showButton, onPress, width, modes, style, accessibilityLabel, }: PdpCcCardProps): import("react/jsx-runtime").JSX.Element;
|
|
83
107
|
export default PdpCcCard;
|
|
84
108
|
//# sourceMappingURL=PdpCcCard.d.ts.map
|
|
@@ -102,6 +102,14 @@ export type TableProps<T = Record<string, unknown>> = {
|
|
|
102
102
|
* for wide tables that exceed the viewport on mobile. @default false
|
|
103
103
|
*/
|
|
104
104
|
scrollable?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Fixed width (px) applied to every column — header and body alike — so
|
|
107
|
+
* all columns share the same width. An explicit per-column `width` (on
|
|
108
|
+
* `TableColumn`, or on an individual `Table.Cell`/`Table.HeaderCell`) still
|
|
109
|
+
* takes precedence when set. Omit to let columns flex to share the
|
|
110
|
+
* available space.
|
|
111
|
+
*/
|
|
112
|
+
columnWidth?: number;
|
|
105
113
|
/** Accessibility label for the table container. */
|
|
106
114
|
accessibilityLabel?: string;
|
|
107
115
|
/** Design token modes for theming (e.g. `{ "Color Mode": "Light" }`). */
|
|
@@ -126,7 +134,7 @@ export type TableProps<T = Record<string, unknown>> = {
|
|
|
126
134
|
*
|
|
127
135
|
* @component
|
|
128
136
|
*/
|
|
129
|
-
declare function Table<T = Record<string, unknown>>({ columns, data, children, showHeader, getRowKey, onRowPress, scrollable, accessibilityLabel, modes, style, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
declare function Table<T = Record<string, unknown>>({ columns, data, children, showHeader, getRowKey, onRowPress, scrollable, columnWidth, accessibilityLabel, modes, style, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
130
138
|
declare namespace Table {
|
|
131
139
|
var Header: typeof TableHeader;
|
|
132
140
|
var HeaderCell: typeof TableHeaderCell;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle, type TextStyle, type GestureResponderEvent } from 'react-native';
|
|
3
|
+
import type { Modes } from '../../design-tokens';
|
|
4
|
+
export type ValueBackMetricProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Header glyph slot, shown to the left of the title. Mirrors the Figma swap
|
|
7
|
+
* slot whose preferred instances are `Icon` and `Image`:
|
|
8
|
+
* - a registry icon name (e.g. `'ic_rupee_coin'`) renders the shared
|
|
9
|
+
* {@link Icon}, colour/size from the `icon/*` tokens (default 18px gold —
|
|
10
|
+
* retint via `modes`, e.g. `{ AppearanceBrand: 'Secondary' }`);
|
|
11
|
+
* - a custom node (an `<Icon/>`, an `<Image/>`, your brand logo) renders
|
|
12
|
+
* as-is with `modes` cascaded into it.
|
|
13
|
+
* The Figma design uses a dedicated JioPoints brand mark that is not in the
|
|
14
|
+
* icon registry, so `ic_rupee_coin` stands in by default.
|
|
15
|
+
*/
|
|
16
|
+
icon?: string | React.ReactNode;
|
|
17
|
+
/** Header title next to the icon. Defaults to `'JioPoints'`. */
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The prominent value line (16px/500). Pass a string, or any node to compose
|
|
21
|
+
* a richer value. Hidden when omitted.
|
|
22
|
+
*/
|
|
23
|
+
value?: string | React.ReactNode;
|
|
24
|
+
/** Muted caption below the value (12px, `#777`). Hidden when omitted. */
|
|
25
|
+
caption?: string;
|
|
26
|
+
/** Bottom link label (underlined, brand accent). Hidden when omitted. */
|
|
27
|
+
linkLabel?: string;
|
|
28
|
+
/** Fired when the link is pressed. Navigation is the consumer's job. */
|
|
29
|
+
onLinkPress?: (event: GestureResponderEvent) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Press handler for the whole card. When set, the card becomes pressable
|
|
32
|
+
* (rendered through a `Pressable` with `accessibilityRole="button"`).
|
|
33
|
+
* Independent of {@link onLinkPress} — the bottom link keeps its own handler.
|
|
34
|
+
*/
|
|
35
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
36
|
+
/** Disable interaction when `onPress` is set. */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Design-token modes for theming. */
|
|
39
|
+
modes?: Modes;
|
|
40
|
+
/** Override the container styles. */
|
|
41
|
+
style?: StyleProp<ViewStyle>;
|
|
42
|
+
/** Override the title text styles. */
|
|
43
|
+
titleStyle?: StyleProp<TextStyle>;
|
|
44
|
+
/** Override the value text styles. */
|
|
45
|
+
valueStyle?: StyleProp<TextStyle>;
|
|
46
|
+
/** Override the caption text styles. */
|
|
47
|
+
captionStyle?: StyleProp<TextStyle>;
|
|
48
|
+
/**
|
|
49
|
+
* Accessibility label. Defaults to the resolved `title`, `value`, `caption`
|
|
50
|
+
* and `linkLabel` joined together.
|
|
51
|
+
*/
|
|
52
|
+
accessibilityLabel?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* ValueBackMetric — a compact, left-aligned "value back" card.
|
|
56
|
+
*
|
|
57
|
+
* Stacks a branded header row (icon + `title`, e.g. "JioPoints"), a prominent
|
|
58
|
+
* `value`, a muted `caption`, and an optional bottom `linkLabel` (e.g. "Earn").
|
|
59
|
+
* `value`, `caption` and `linkLabel` each render only when provided; the header
|
|
60
|
+
* (icon + title) always shows.
|
|
61
|
+
*
|
|
62
|
+
* Colours, gaps and padding resolve from the `metricdata/*` tokens; the header
|
|
63
|
+
* glyph from the `icon/*` tokens (default 18px gold); the link entirely from
|
|
64
|
+
* the `link/*` + `text/foreground` tokens via the shared {@link Link}, with
|
|
65
|
+
* `Text Appearance: Secondary` and `Text Sizes: Small` seeded so it renders
|
|
66
|
+
* purple at 12px like the design (caller `modes` win). The per-part font
|
|
67
|
+
* sizes/weights come from the Figma `valueBackMetric/*` variables, which are
|
|
68
|
+
* not yet in the committed token snapshot, so they are encoded as constants
|
|
69
|
+
* matching the design.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```tsx
|
|
73
|
+
* <ValueBackMetric
|
|
74
|
+
* title="JioPoints"
|
|
75
|
+
* value="Value"
|
|
76
|
+
* caption="Earn 10 point with UPI"
|
|
77
|
+
* linkLabel="Earn"
|
|
78
|
+
* onPress={() => navigation.navigate('ValueBack')}
|
|
79
|
+
* onLinkPress={() => navigation.navigate('EarnPoints')}
|
|
80
|
+
* />
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare function ValueBackMetric({ icon, title, value, caption, linkLabel, onLinkPress, onPress, disabled, modes, style, titleStyle, valueStyle, captionStyle, accessibilityLabel, }: ValueBackMetricProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
declare const _default: React.MemoExoticComponent<typeof ValueBackMetric>;
|
|
85
|
+
export default _default;
|
|
86
|
+
//# sourceMappingURL=ValueBackMetric.d.ts.map
|
|
@@ -23,6 +23,7 @@ export { default as CardFeedback, type CardFeedbackProps } from './CardFeedback/
|
|
|
23
23
|
export { default as CardFinancialCondition, type CardFinancialConditionProps, } from './CardFinancialCondition/CardFinancialCondition';
|
|
24
24
|
export { default as CardInsight, type CardInsightProps } from './CardInsight/CardInsight';
|
|
25
25
|
export { default as CcCard, type CcCardProps, type CcCardBadge, type CcCardListItem } from './CcCard/CcCard';
|
|
26
|
+
export { default as CategoryCard, type CategoryCardProps } from './CategoryCard/CategoryCard';
|
|
26
27
|
export { default as Disclaimer } from './Disclaimer/Disclaimer';
|
|
27
28
|
export { default as Divider, type DividerProps, type DividerDirection } from './Divider/Divider';
|
|
28
29
|
export { default as Drawer, type DrawerProps, type DrawerHandle } from './Drawer/Drawer';
|
|
@@ -50,6 +51,7 @@ export { default as AllocationComparisonChart, type AllocationComparisonChartPro
|
|
|
50
51
|
export { default as MonthlyStatusGrid, CalendarGlyph, type MonthlyStatusGridProps, type MonthlyStatusGridMonth, type MonthlyStatus, type CalendarGlyphProps, } from './MonthlyStatusGrid/MonthlyStatusGrid';
|
|
51
52
|
export { default as Gauge, type GaugeProps } from './Gauge/Gauge';
|
|
52
53
|
export { default as HeroSection, type HeroSectionProps } from './HeroSection/HeroSection';
|
|
54
|
+
export { default as HelloJioInput, type HelloJioInputProps } from './HelloJioInput/HelloJioInput';
|
|
53
55
|
export { default as HoldingsCard, type HoldingsCardProps } from './HoldingsCard/HoldingsCard';
|
|
54
56
|
export { default as HStack, type HStackProps } from './HStack/HStack';
|
|
55
57
|
export { default as Icon, type IconProps } from './Icon/Icon';
|
|
@@ -157,4 +159,7 @@ export { default as SegmentedControl, type SegmentedControlProps, type Segmented
|
|
|
157
159
|
export { default as Toggle, type ToggleProps } from './Toggle/Toggle';
|
|
158
160
|
export { default as AutoplayControl, type AutoplayControlProps } from './AutoplayControl/AutoplayControl';
|
|
159
161
|
export { default as NumberPagination, type NumberPaginationProps } from './NumberPagination/NumberPagination';
|
|
162
|
+
export { default as CounterBadge, type CounterBadgeProps } from './CounterBadge/CounterBadge';
|
|
163
|
+
export { default as FavoriteToggle, type FavoriteToggleProps } from './FavoriteToggle/FavoriteToggle';
|
|
164
|
+
export { default as ValueBackMetric, type ValueBackMetricProps } from './ValueBackMetric/ValueBackMetric';
|
|
160
165
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Auto-generated from SVG files in src/icons/
|
|
5
5
|
* DO NOT EDIT MANUALLY - Run "npm run icons:generate" to regenerate
|
|
6
6
|
*
|
|
7
|
-
* Generated: 2026-07-
|
|
7
|
+
* Generated: 2026-07-15T20:21:39.992Z
|
|
8
8
|
*/
|
|
9
9
|
export declare const iconRegistry: Record<string, {
|
|
10
10
|
path: string;
|