jfs-components 0.0.42 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/lib/commonjs/components/Button/Button.js +15 -1
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +208 -0
  3. package/lib/commonjs/components/MoneyValue/MoneyValue.js +81 -49
  4. package/lib/commonjs/components/NoteInput/NoteInput.js +120 -0
  5. package/lib/commonjs/components/NoteInput/index.js +13 -0
  6. package/lib/commonjs/components/Numpad/Numpad.js +108 -0
  7. package/lib/commonjs/components/StatusHero/StatusHero.js +148 -0
  8. package/lib/commonjs/components/Tabs/TabItem.js +79 -0
  9. package/lib/commonjs/components/Tabs/Tabs.js +88 -0
  10. package/lib/commonjs/components/Toast/Toast.js +93 -0
  11. package/lib/commonjs/components/Toast/ToastProvider.js +61 -0
  12. package/lib/commonjs/components/Toast/useToast.js +61 -0
  13. package/lib/commonjs/components/index.js +81 -0
  14. package/lib/commonjs/design-tokens/JFS Variables-variables-full.json +1 -1
  15. package/lib/commonjs/icons/registry.js +1 -1
  16. package/lib/module/components/Button/Button.js +14 -1
  17. package/lib/module/components/Checkbox/Checkbox.js +205 -0
  18. package/lib/module/components/MoneyValue/MoneyValue.js +81 -49
  19. package/lib/module/components/NoteInput/NoteInput.js +115 -0
  20. package/lib/module/components/NoteInput/index.js +3 -0
  21. package/lib/module/components/Numpad/Numpad.js +103 -0
  22. package/lib/module/components/StatusHero/StatusHero.js +142 -0
  23. package/lib/module/components/Tabs/TabItem.js +74 -0
  24. package/lib/module/components/Tabs/Tabs.js +78 -0
  25. package/lib/module/components/Toast/Toast.js +88 -0
  26. package/lib/module/components/Toast/ToastProvider.js +55 -0
  27. package/lib/module/components/Toast/useToast.js +54 -0
  28. package/lib/module/components/index.js +10 -1
  29. package/lib/module/design-tokens/JFS Variables-variables-full.json +1 -1
  30. package/lib/module/icons/registry.js +1 -1
  31. package/lib/typescript/src/components/Button/Button.d.ts +6 -1
  32. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +30 -0
  33. package/lib/typescript/src/components/MoneyValue/MoneyValue.d.ts +18 -26
  34. package/lib/typescript/src/components/NoteInput/NoteInput.d.ts +23 -0
  35. package/lib/typescript/src/components/NoteInput/index.d.ts +3 -0
  36. package/lib/typescript/src/components/Numpad/Numpad.d.ts +35 -0
  37. package/lib/typescript/src/components/StatusHero/StatusHero.d.ts +47 -0
  38. package/lib/typescript/src/components/Tabs/TabItem.d.ts +29 -0
  39. package/lib/typescript/src/components/Tabs/Tabs.d.ts +44 -0
  40. package/lib/typescript/src/components/Toast/Toast.d.ts +14 -0
  41. package/lib/typescript/src/components/Toast/ToastProvider.d.ts +11 -0
  42. package/lib/typescript/src/components/Toast/useToast.d.ts +24 -0
  43. package/lib/typescript/src/components/index.d.ts +9 -0
  44. package/lib/typescript/src/icons/registry.d.ts +1 -1
  45. package/package.json +1 -1
  46. package/src/components/Button/Button.tsx +14 -1
  47. package/src/components/Checkbox/Checkbox.tsx +238 -0
  48. package/src/components/MoneyValue/MoneyValue.tsx +134 -79
  49. package/src/components/NoteInput/NoteInput.tsx +146 -0
  50. package/src/components/NoteInput/index.ts +2 -0
  51. package/src/components/Numpad/Numpad.tsx +162 -0
  52. package/src/components/StatusHero/StatusHero.tsx +156 -0
  53. package/src/components/Tabs/TabItem.tsx +96 -0
  54. package/src/components/Tabs/Tabs.tsx +105 -0
  55. package/src/components/Toast/Toast.tsx +105 -0
  56. package/src/components/Toast/ToastProvider.tsx +75 -0
  57. package/src/components/Toast/useToast.ts +80 -0
  58. package/src/components/index.ts +9 -0
  59. package/src/design-tokens/JFS Variables-variables-full.json +1 -1
  60. package/src/icons/registry.ts +1 -1
@@ -23,6 +23,11 @@ export type ButtonProps = SafePressableProps & {
23
23
  renderContent?: (styles: StyleProp<TextStyle>) => React.ReactNode;
24
24
  leading?: React.ReactNode;
25
25
  trailing?: React.ReactNode;
26
+ /**
27
+ * Name of the icon to display on the right side of the button.
28
+ * Takes precedence over `trailing` if both are provided.
29
+ */
30
+ icon?: string;
26
31
  modes?: Record<string, any>;
27
32
  onPress?: () => void;
28
33
  disabled?: boolean;
@@ -55,6 +60,6 @@ export type ButtonProps = SafePressableProps & {
55
60
  * @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
56
61
  * @param {Object} [props.accessibilityState] - Additional accessibility state information
57
62
  */
58
- declare function Button({ label, children, renderContent, leading, trailing, modes, onPress, disabled, style, labelStyle, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
63
+ declare function Button({ label, children, renderContent, leading, trailing, icon, modes, onPress, disabled, style, labelStyle, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
59
64
  export default Button;
60
65
  //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1,30 @@
1
+ import { type StyleProp, type ViewStyle } from 'react-native';
2
+ export interface CheckboxProps {
3
+ /** Whether the checkbox is checked (controlled) */
4
+ checked?: boolean;
5
+ /** Initial checked state (uncontrolled) */
6
+ defaultChecked?: boolean;
7
+ /** Callback when the checked state changes */
8
+ onValueChange?: (checked: boolean) => void;
9
+ /** Whether the checkbox is disabled */
10
+ disabled?: boolean;
11
+ /** Design token modes for theming */
12
+ modes?: Record<string, any>;
13
+ /** Override container styles */
14
+ style?: StyleProp<ViewStyle>;
15
+ /** Accessibility label for screen readers */
16
+ accessibilityLabel?: string;
17
+ }
18
+ /**
19
+ * Checkbox component that maps directly to the Figma design using design tokens.
20
+ *
21
+ * Supports 8 visual states: Idle, Hover, Focus, Selected, Selected Hover,
22
+ * Focus Selected, Disabled, and Disabled Active. All styling is driven by
23
+ * design tokens with optional mode overrides.
24
+ *
25
+ * @component
26
+ * @param {CheckboxProps} props
27
+ */
28
+ declare function Checkbox({ checked: controlledChecked, defaultChecked, onValueChange, disabled, modes, style, accessibilityLabel, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
29
+ export default Checkbox;
30
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -1,9 +1,17 @@
1
1
  import React from 'react';
2
- import { View, type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
- type MoneyValueProps = {
2
+ import { Pressable, type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ export type MoneyValueProps = {
4
+ /** Monetary value to display. */
4
5
  value?: string | number;
6
+ /** Currency symbol or ISO code (e.g. "INR"). */
5
7
  currency?: string;
8
+ /** Explicitly override negative display. If undefined, auto-detects from value. */
6
9
  negative?: boolean;
10
+ /** When true, masks the value for privacy (e.g. •••). */
11
+ hidden?: boolean;
12
+ /** When true, a blinking vertical cursor is shown at the end of the value text. */
13
+ focused?: boolean;
14
+ /** Modes configuration mapped to Figma tokens. */
7
15
  modes?: Record<string, any>;
8
16
  style?: StyleProp<ViewStyle>;
9
17
  valueStyle?: StyleProp<TextStyle>;
@@ -11,34 +19,18 @@ type MoneyValueProps = {
11
19
  negativeSignStyle?: StyleProp<TextStyle>;
12
20
  accessibilityLabel?: string;
13
21
  accessibilityHint?: string;
14
- } & React.ComponentProps<typeof View>;
22
+ } & React.ComponentProps<typeof Pressable>;
15
23
  /**
16
24
  * MoneyValue component that mirrors the Figma MoneyValue design.
17
25
  *
18
- * The styling is fully resolved from Figma design tokens using `getVariableByName`
19
- * and an optional `modes` configuration, consistent with other components in this library.
26
+ * The styling is fully resolved from Figma design tokens using `getVariableByName`.
27
+ * Supports separate typography scaling for currency and value.
20
28
  *
21
- * Currency can be provided either as a symbol (e.g. "₹") or as an ISO code
22
- * (e.g. "INR", "USD"). When an ISO code is provided, it will be mapped to the
23
- * appropriate symbol, with special care to support INR and other major currencies.
24
- *
25
- * Negative values are auto-detected from the value prop (e.g., -500 or "-500").
26
- * The `negative` prop can be used to explicitly override this behavior.
27
- *
28
- * @component
29
- * @param {Object} props
30
- * @param {string|number} [props.value="500"] - Monetary value to display. Negative values are auto-detected.
31
- * @param {string} [props.currency="₹"] - Currency symbol or ISO code (e.g. "INR").
32
- * @param {boolean} [props.negative] - Explicitly override negative display. If undefined, auto-detects from value.
33
- * @param {Object} [props.modes={}] - Modes object passed directly to `getVariableByName`.
34
- * Example: {"MoneyValue / Theme": "Default"}
35
- * @param {Object} [props.style] - Optional container style overrides.
36
- * @param {Object} [props.valueStyle] - Optional value text style overrides.
37
- * @param {Object} [props.currencyStyle] - Optional currency text style overrides.
38
- * @param {Object} [props.negativeSignStyle] - Optional negative sign text style overrides.
39
- * @param {string} [props.accessibilityLabel] - Accessibility label for screen readers. If not provided, generates from value and currency
40
- * @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
29
+ * To make this component editable without coupling it to a Numpad component,
30
+ * use the `onPress` prop and manage the data state in the parent layer. When
31
+ * the `focused` prop is provided to this component, it will display a natural
32
+ * blinking text cursor.
41
33
  */
42
- declare function MoneyValue({ value, currency, negative, modes, style, valueStyle, currencyStyle, negativeSignStyle, accessibilityLabel, accessibilityHint, ...rest }: MoneyValueProps): import("react/jsx-runtime").JSX.Element;
34
+ declare function MoneyValue({ value, currency, negative, focused, hidden, modes, style, valueStyle, currencyStyle, negativeSignStyle, accessibilityLabel, accessibilityHint, onPress, ...rest }: MoneyValueProps): import("react/jsx-runtime").JSX.Element;
43
35
  export default MoneyValue;
44
36
  //# sourceMappingURL=MoneyValue.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { type StyleProp, type ViewStyle, type TextStyle, type TextInputProps } from 'react-native';
2
+ export type NoteInputProps = {
3
+ /** The value of the text input */
4
+ value?: string;
5
+ /** The placeholder when empty ("Add note" by default) */
6
+ placeholder?: string;
7
+ /** Callback when text changes */
8
+ onChangeText?: (text: string) => void;
9
+ /** Design token modes (e.g., {'InputState': 'Idle', 'Color Mode': 'Light'}) */
10
+ modes?: Record<string, any>;
11
+ /** Custom container style */
12
+ style?: StyleProp<ViewStyle>;
13
+ /** Custom text input style */
14
+ textStyle?: StyleProp<TextStyle>;
15
+ /** State of the component */
16
+ state?: 'Editing' | 'Idle';
17
+ } & Omit<TextInputProps, 'style' | 'value' | 'onChangeText' | 'placeholder'>;
18
+ /**
19
+ * NoteInput component representing an interactive "Add note" badge style field.
20
+ * Allows the user to click, clears the placeholder text, and shows a blinking cursor when focused.
21
+ */
22
+ export default function NoteInput({ value, placeholder, onChangeText, modes, style, textStyle, state: explicitState, onFocus, onBlur, ...rest }: NoteInputProps): import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=NoteInput.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { default } from './NoteInput';
2
+ export type { NoteInputProps } from './NoteInput';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
2
+ export type NumpadKeyValue = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '.' | 'backspace';
3
+ export interface NumpadProps {
4
+ /** Design token modes for theming (e.g., {"Color Mode": "Light"}) */
5
+ modes?: Record<string, any>;
6
+ /** Callback fired when any key is pressed */
7
+ onKeyPress?: (key: NumpadKeyValue) => void;
8
+ /** Whether to show the decimal point key (default: true) */
9
+ showDecimal?: boolean;
10
+ /**
11
+ * When true, digit positions (0-9) are randomised on each mount for
12
+ * anti-keylogging / shoulder-surfing protection. The decimal and
13
+ * backspace keys keep their fixed positions.
14
+ */
15
+ shuffle?: boolean;
16
+ /** Override container styles */
17
+ style?: StyleProp<ViewStyle>;
18
+ /** Override individual key styles */
19
+ keyStyle?: StyleProp<ViewStyle>;
20
+ /** Override text styles on digit / decimal keys */
21
+ keyTextStyle?: StyleProp<TextStyle>;
22
+ }
23
+ /**
24
+ * Secure numpad component for the JFS finance system.
25
+ *
26
+ * Renders a 3×4 grid of digit keys (0-9), an optional decimal key, and a
27
+ * backspace key. Digit positions are shuffled by default to guard against
28
+ * keylogging and shoulder-surfing attacks on mobile devices.
29
+ *
30
+ * @component
31
+ * @param {NumpadProps} props
32
+ */
33
+ declare function Numpad({ modes, onKeyPress, showDecimal, shuffle, style, keyStyle, keyTextStyle, }: NumpadProps): import("react/jsx-runtime").JSX.Element;
34
+ export default Numpad;
35
+ //# sourceMappingURL=Numpad.d.ts.map
@@ -0,0 +1,47 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ViewStyle } from 'react-native';
3
+ export type StatusHeroProps = {
4
+ /**
5
+ * Custom media slot content.
6
+ * Defaults to an IconCapsule above a MoneyValue.
7
+ * Modes are automatically injected if the slot is a valid React element.
8
+ */
9
+ renderMedia?: ReactNode;
10
+ /** Title text displayed below the media slot */
11
+ title?: string;
12
+ /** Whether to render the title */
13
+ showTitle?: boolean;
14
+ /** Body/subtitle text displayed below the title */
15
+ subtitle?: string;
16
+ /** Icon name used in the default media slot */
17
+ iconName?: string;
18
+ /** Monetary value shown in the default MoneyValue inside the media slot */
19
+ value?: string;
20
+ /** Currency symbol or ISO code for the default MoneyValue */
21
+ currency?: string;
22
+ /** Mode configuration for design tokens */
23
+ modes?: Record<string, any>;
24
+ style?: ViewStyle;
25
+ };
26
+ /**
27
+ * StatusHero component that displays a hero section for payment/transaction status screens.
28
+ *
29
+ * Contains a media slot (defaults to IconCapsule + MoneyValue) and a content area
30
+ * with an optional title and a subtitle. All visual values are resolved from Figma
31
+ * design tokens via `getVariableByName`.
32
+ *
33
+ * @component
34
+ * @example
35
+ * ```tsx
36
+ * <StatusHero
37
+ * iconName="ic_confirm"
38
+ * value="50"
39
+ * currency="INR"
40
+ * title="You're set to make payments"
41
+ * subtitle="₹50 will be auto-invested daily, stay consistent & stay golden."
42
+ * modes={{ 'Color Mode': 'Light' }}
43
+ * />
44
+ * ```
45
+ */
46
+ export default function StatusHero({ renderMedia, title, showTitle, subtitle, iconName, value, currency, modes: propModes, style, }: StatusHeroProps): import("react/jsx-runtime").JSX.Element;
47
+ //# sourceMappingURL=StatusHero.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
2
+ export interface TabItemProps {
3
+ /** Label text to display */
4
+ label?: string;
5
+ /** Whether this tab item is currently active/selected */
6
+ active?: boolean;
7
+ /** Callback when this tab item is pressed */
8
+ onPress?: () => void;
9
+ /** Design token modes for theming */
10
+ modes?: Record<string, any>;
11
+ /** Override container styles */
12
+ style?: StyleProp<ViewStyle>;
13
+ /** Override label text styles */
14
+ labelStyle?: StyleProp<TextStyle>;
15
+ /** Accessibility label for screen readers */
16
+ accessibilityLabel?: string;
17
+ }
18
+ /**
19
+ * Individual tab item used inside the Tabs container.
20
+ *
21
+ * Supports idle and active states driven by design tokens.
22
+ * When active, a bottom indicator bar is shown beneath the label.
23
+ *
24
+ * @component
25
+ * @param {TabItemProps} props
26
+ */
27
+ declare function TabItem({ label, active, onPress, modes, style, labelStyle, accessibilityLabel, }: TabItemProps): import("react/jsx-runtime").JSX.Element;
28
+ export default TabItem;
29
+ //# sourceMappingURL=TabItem.d.ts.map
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import TabItem from './TabItem';
4
+ export interface TabsProps {
5
+ /**
6
+ * Tab item children. Each child should be a <TabItem> component.
7
+ * Modes are automatically forwarded to all TabItem children.
8
+ */
9
+ children: React.ReactNode;
10
+ /** Design token modes for theming */
11
+ modes?: Record<string, any>;
12
+ /**
13
+ * When true, the tabs row scrolls horizontally (useful for many items).
14
+ * @default false
15
+ */
16
+ scrollable?: boolean;
17
+ /** Override container styles */
18
+ style?: StyleProp<ViewStyle>;
19
+ }
20
+ /**
21
+ * Tabs container component that lays out TabItem children horizontally.
22
+ *
23
+ * The "Tab items" slot maps to React children — each child should be a
24
+ * `<TabItem>` element. The `modes` prop is automatically forwarded to
25
+ * every TabItem child so theming is consistent.
26
+ *
27
+ * @component
28
+ * @param {TabsProps} props
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * const [activeIndex, setActiveIndex] = useState(0);
33
+ *
34
+ * <Tabs modes={{ 'Color Mode': 'Light' }}>
35
+ * <TabItem label="Tab 1" active={activeIndex === 0} onPress={() => setActiveIndex(0)} />
36
+ * <TabItem label="Tab 2" active={activeIndex === 1} onPress={() => setActiveIndex(1)} />
37
+ * <TabItem label="Tab 3" active={activeIndex === 2} onPress={() => setActiveIndex(2)} />
38
+ * </Tabs>
39
+ * ```
40
+ */
41
+ declare function Tabs({ children, modes, scrollable, style, }: TabsProps): import("react/jsx-runtime").JSX.Element;
42
+ export { TabItem };
43
+ export default Tabs;
44
+ //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { type StyleProp, type ViewStyle } from 'react-native';
2
+ import { type ToastPlacement } from './useToast';
3
+ export interface ToastProps {
4
+ id: string;
5
+ title: string;
6
+ timeout?: number | undefined;
7
+ onClose?: (() => void) | undefined;
8
+ modes?: Record<string, any> | undefined;
9
+ placement?: ToastPlacement | undefined;
10
+ style?: StyleProp<ViewStyle> | undefined;
11
+ }
12
+ declare function Toast({ id, title, timeout, onClose, modes, placement, style, }: ToastProps): import("react/jsx-runtime").JSX.Element;
13
+ export default Toast;
14
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { type ToastPlacement } from './useToast';
3
+ export interface ToastProviderProps {
4
+ children: React.ReactNode;
5
+ maxVisibleToasts?: number;
6
+ placement?: ToastPlacement;
7
+ modes?: Record<string, any>;
8
+ }
9
+ declare function ToastProvider({ children, maxVisibleToasts, placement, modes, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
10
+ export default ToastProvider;
11
+ //# sourceMappingURL=ToastProvider.d.ts.map
@@ -0,0 +1,24 @@
1
+ export type ToastPlacement = 'top' | 'bottom';
2
+ export interface ToastOptions {
3
+ title: string;
4
+ timeout?: number;
5
+ onClose?: () => void;
6
+ modes?: Record<string, any>;
7
+ }
8
+ export interface ToastEntry {
9
+ id: string;
10
+ title: string;
11
+ timeout: number;
12
+ onClose?: (() => void) | undefined;
13
+ modes?: Record<string, any> | undefined;
14
+ }
15
+ export declare function addToast(options: ToastOptions): string;
16
+ export declare function closeToast(id: string): void;
17
+ export declare function closeAll(): void;
18
+ export declare function useToast(): {
19
+ toasts: ToastEntry[];
20
+ addToast: typeof addToast;
21
+ closeToast: typeof closeToast;
22
+ closeAll: typeof closeAll;
23
+ };
24
+ //# sourceMappingURL=useToast.d.ts.map
@@ -7,6 +7,7 @@ export { default as BottomNav } from './BottomNav/BottomNav';
7
7
  export { default as BottomNavItem } from './BottomNavItem/BottomNavItem';
8
8
  export { default as Button, type ButtonProps } from './Button/Button';
9
9
  export { default as Card } from './Card/Card';
10
+ export { default as Checkbox, type CheckboxProps } from './Checkbox/Checkbox';
10
11
  export { default as CardFeedback } from './CardFeedback/CardFeedback';
11
12
  export { default as Disclaimer } from './Disclaimer/Disclaimer';
12
13
  export { default as Divider, type DividerProps, type DividerDirection } from './Divider/Divider';
@@ -25,7 +26,9 @@ export { default as ListItem } from './ListItem/ListItem';
25
26
  export { default as MediaCard } from './MediaCard/MediaCard';
26
27
  export { default as MerchantProfile, type MerchantProfileProps } from './MerchantProfile/MerchantProfile';
27
28
  export { default as MoneyValue } from './MoneyValue/MoneyValue';
29
+ export { default as NoteInput } from './NoteInput/NoteInput';
28
30
  export { default as NavArrow } from './NavArrow/NavArrow';
31
+ export { default as Numpad, type NumpadProps, type NumpadKeyValue } from './Numpad/Numpad';
29
32
  export { default as PageTitle } from './PageTitle/PageTitle';
30
33
  export { default as Screen, type ScreenProps } from './Screen/Screen';
31
34
  export { default as Section } from './Section/Section';
@@ -33,6 +36,7 @@ export { default as Stepper } from './Stepper/Stepper';
33
36
  export { Step } from './Stepper/Step';
34
37
  export { StepLabel } from './Stepper/StepLabel';
35
38
  export { default as TextInput } from './TextInput/TextInput';
39
+ export { default as StatusHero, type StatusHeroProps } from './StatusHero/StatusHero';
36
40
  export { default as ThreadHero, type ThreadHeroProps } from './ThreadHero/ThreadHero';
37
41
  export { Tooltip } from './Tooltip/Tooltip';
38
42
  export { default as TransactionDetails } from './TransactionDetails/TransactionDetails';
@@ -50,4 +54,9 @@ export { default as InputSearch, type InputSearchProps } from './InputSearch/Inp
50
54
  export { default as SupportText, type SupportTextProps } from './SupportText/SupportText';
51
55
  export { default as SupportTextIcon, type SupportTextIconProps } from './SupportText/SupportTextIcon';
52
56
  export { default as RadioButton, type RadioButtonProps } from './RadioButton/RadioButton';
57
+ export { default as Tabs, type TabsProps } from './Tabs/Tabs';
58
+ export { default as TabItem, type TabItemProps } from './Tabs/TabItem';
59
+ export { default as Toast, type ToastProps } from './Toast/Toast';
60
+ export { default as ToastProvider, type ToastProviderProps } from './Toast/ToastProvider';
61
+ export { useToast, addToast, closeToast, closeAll, type ToastOptions, type ToastEntry, type ToastPlacement } from './Toast/useToast';
53
62
  //# 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-02-18T13:27:13.799Z
7
+ * Generated: 2026-02-25T22:30:05.664Z
8
8
  */
9
9
  export declare const iconRegistry: Record<string, {
10
10
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jfs-components",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "React Native Jio Finance Components Library",
5
5
  "author": "sunshuaiqi@gmail.com",
6
6
  "license": "MIT",
@@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react'
2
2
  import { Pressable, Text, View, type AccessibilityState, type StyleProp, type ViewStyle, type TextStyle } from 'react-native'
3
3
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
4
4
  import { usePressableWebSupport, type SafePressableProps, type WebAccessibilityProps } from '../../utils/web-platform-utils'
5
+ import Icon from '../../icons/Icon'
5
6
 
6
7
  export type ButtonProps = SafePressableProps & {
7
8
  label?: string;
@@ -25,6 +26,11 @@ export type ButtonProps = SafePressableProps & {
25
26
  renderContent?: (styles: StyleProp<TextStyle>) => React.ReactNode;
26
27
  leading?: React.ReactNode;
27
28
  trailing?: React.ReactNode;
29
+ /**
30
+ * Name of the icon to display on the right side of the button.
31
+ * Takes precedence over `trailing` if both are provided.
32
+ */
33
+ icon?: string;
28
34
  modes?: Record<string, any>;
29
35
  onPress?: () => void;
30
36
  disabled?: boolean;
@@ -64,6 +70,7 @@ function Button({
64
70
  renderContent,
65
71
  leading,
66
72
  trailing,
73
+ icon,
67
74
  modes = {},
68
75
  onPress,
69
76
  disabled = false,
@@ -90,6 +97,8 @@ function Button({
90
97
  const lineHeight = getVariableByName('button/lineHeight', modes) || 19
91
98
  const fontSize = getVariableByName('button/fontSize', modes) || 16
92
99
  const textColor = getVariableByName('button/foreground', modes) || '#0f0d0a'
100
+ const iconColor = getVariableByName('button/icon/color', modes) ?? textColor
101
+ const iconSize = getVariableByName('button/icon/size', modes) ?? 18
93
102
 
94
103
  const baseLabelTextStyle: TextStyle = {
95
104
  color: textColor,
@@ -230,7 +239,11 @@ function Button({
230
239
  </View>
231
240
  ) : null}
232
241
  {content}
233
- {trailing ? (
242
+ {icon ? (
243
+ <View style={trailingAccessoryStyle}>
244
+ <Icon name={icon} size={iconSize as number} color={iconColor as string} accessibilityElementsHidden={true} importantForAccessibility="no" />
245
+ </View>
246
+ ) : trailing ? (
234
247
  <View style={trailingAccessoryStyle}>
235
248
  {trailing}
236
249
  </View>