jfs-components 0.1.23 → 0.1.28

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 (99) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/lib/commonjs/components/AutoplayControl/AutoplayControl.js +66 -0
  3. package/lib/commonjs/components/CardCTA/CardCTA.js +32 -25
  4. package/lib/commonjs/components/Carousel/Carousel.js +112 -19
  5. package/lib/commonjs/components/ChipSelect/ChipSelect.js +2 -1
  6. package/lib/commonjs/components/ContentSheet/ContentSheet.js +39 -5
  7. package/lib/commonjs/components/FormUpload/Additem.js +168 -0
  8. package/lib/commonjs/components/FormUpload/FormUpload.js +198 -0
  9. package/lib/commonjs/components/Grid/Grid.js +206 -0
  10. package/lib/commonjs/components/ListItem/ListItem.js +11 -4
  11. package/lib/commonjs/components/MetricData/MetricData.js +132 -0
  12. package/lib/commonjs/components/NumberPagination/NumberPagination.js +144 -0
  13. package/lib/commonjs/components/ProfileCard/ProfileCard.js +208 -0
  14. package/lib/commonjs/components/Rating/Rating.js +137 -0
  15. package/lib/commonjs/components/UpiHandle/UpiHandle.js +23 -11
  16. package/lib/commonjs/components/index.js +42 -0
  17. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  18. package/lib/commonjs/design-tokens/figma-modes.generated.js +23 -10
  19. package/lib/commonjs/icons/components/IconBrokenimage.js +19 -0
  20. package/lib/commonjs/icons/components/IconImage.js +19 -0
  21. package/lib/commonjs/icons/components/IconMic.js +19 -0
  22. package/lib/commonjs/icons/components/IconMicoff.js +19 -0
  23. package/lib/commonjs/icons/components/IconPause.js +19 -0
  24. package/lib/commonjs/icons/components/IconPlay.js +19 -0
  25. package/lib/commonjs/icons/components/index.js +66 -0
  26. package/lib/commonjs/icons/registry.js +2 -2
  27. package/lib/module/components/AutoplayControl/AutoplayControl.js +60 -0
  28. package/lib/module/components/CardCTA/CardCTA.js +32 -25
  29. package/lib/module/components/Carousel/Carousel.js +111 -19
  30. package/lib/module/components/ChipSelect/ChipSelect.js +2 -1
  31. package/lib/module/components/ContentSheet/ContentSheet.js +41 -7
  32. package/lib/module/components/FormUpload/Additem.js +162 -0
  33. package/lib/module/components/FormUpload/FormUpload.js +192 -0
  34. package/lib/module/components/Grid/Grid.js +201 -0
  35. package/lib/module/components/ListItem/ListItem.js +11 -4
  36. package/lib/module/components/MetricData/MetricData.js +127 -0
  37. package/lib/module/components/NumberPagination/NumberPagination.js +138 -0
  38. package/lib/module/components/ProfileCard/ProfileCard.js +202 -0
  39. package/lib/module/components/Rating/Rating.js +132 -0
  40. package/lib/module/components/UpiHandle/UpiHandle.js +23 -11
  41. package/lib/module/components/index.js +7 -1
  42. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  43. package/lib/module/design-tokens/figma-modes.generated.js +23 -10
  44. package/lib/module/icons/components/IconBrokenimage.js +12 -0
  45. package/lib/module/icons/components/IconImage.js +12 -0
  46. package/lib/module/icons/components/IconMic.js +12 -0
  47. package/lib/module/icons/components/IconMicoff.js +12 -0
  48. package/lib/module/icons/components/IconPause.js +12 -0
  49. package/lib/module/icons/components/IconPlay.js +12 -0
  50. package/lib/module/icons/components/index.js +6 -0
  51. package/lib/module/icons/registry.js +2 -2
  52. package/lib/typescript/src/components/AutoplayControl/AutoplayControl.d.ts +15 -0
  53. package/lib/typescript/src/components/Carousel/Carousel.d.ts +8 -1
  54. package/lib/typescript/src/components/ChipSelect/ChipSelect.d.ts +6 -1
  55. package/lib/typescript/src/components/ContentSheet/ContentSheet.d.ts +7 -1
  56. package/lib/typescript/src/components/FormUpload/Additem.d.ts +96 -0
  57. package/lib/typescript/src/components/FormUpload/FormUpload.d.ts +85 -0
  58. package/lib/typescript/src/components/Grid/Grid.d.ts +87 -0
  59. package/lib/typescript/src/components/MetricData/MetricData.d.ts +53 -0
  60. package/lib/typescript/src/components/NumberPagination/NumberPagination.d.ts +21 -0
  61. package/lib/typescript/src/components/ProfileCard/ProfileCard.d.ts +89 -0
  62. package/lib/typescript/src/components/Rating/Rating.d.ts +30 -0
  63. package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +7 -1
  64. package/lib/typescript/src/components/index.d.ts +34 -28
  65. package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +10 -4
  66. package/lib/typescript/src/icons/components/IconBrokenimage.d.ts +3 -0
  67. package/lib/typescript/src/icons/components/IconImage.d.ts +3 -0
  68. package/lib/typescript/src/icons/components/IconMic.d.ts +3 -0
  69. package/lib/typescript/src/icons/components/IconMicoff.d.ts +3 -0
  70. package/lib/typescript/src/icons/components/IconPause.d.ts +3 -0
  71. package/lib/typescript/src/icons/components/IconPlay.d.ts +3 -0
  72. package/lib/typescript/src/icons/components/index.d.ts +6 -0
  73. package/lib/typescript/src/icons/registry.d.ts +1 -1
  74. package/package.json +1 -1
  75. package/src/components/AutoplayControl/AutoplayControl.tsx +77 -0
  76. package/src/components/CardCTA/CardCTA.tsx +30 -15
  77. package/src/components/Carousel/Carousel.tsx +133 -23
  78. package/src/components/ChipSelect/ChipSelect.tsx +7 -1
  79. package/src/components/ContentSheet/ContentSheet.tsx +50 -0
  80. package/src/components/FormUpload/Additem.tsx +262 -0
  81. package/src/components/FormUpload/FormUpload.tsx +313 -0
  82. package/src/components/Grid/Grid.tsx +368 -0
  83. package/src/components/ListItem/ListItem.tsx +11 -4
  84. package/src/components/MetricData/MetricData.tsx +185 -0
  85. package/src/components/NumberPagination/NumberPagination.tsx +170 -0
  86. package/src/components/ProfileCard/ProfileCard.tsx +268 -0
  87. package/src/components/Rating/Rating.tsx +174 -0
  88. package/src/components/UpiHandle/UpiHandle.tsx +35 -24
  89. package/src/components/index.ts +329 -182
  90. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  91. package/src/design-tokens/figma-modes.generated.ts +23 -10
  92. package/src/icons/components/IconBrokenimage.tsx +11 -0
  93. package/src/icons/components/IconImage.tsx +11 -0
  94. package/src/icons/components/IconMic.tsx +11 -0
  95. package/src/icons/components/IconMicoff.tsx +11 -0
  96. package/src/icons/components/IconPause.tsx +11 -0
  97. package/src/icons/components/IconPlay.tsx +11 -0
  98. package/src/icons/components/index.ts +6 -0
  99. package/src/icons/registry.ts +25 -1
@@ -0,0 +1,15 @@
1
+ import { type StyleProp, type ViewStyle } from 'react-native';
2
+ import type { Modes } from '../../design-tokens';
3
+ export type AutoplayControlProps = {
4
+ state?: 'pause' | 'play';
5
+ modes?: Modes;
6
+ onPress?: () => void;
7
+ disabled?: boolean;
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ /**
11
+ * AutoplayControl is a button component that toggles between play and pause states.
12
+ * All styling values are resolved from Figma design tokens.
13
+ */
14
+ export default function AutoplayControl({ state, modes, onPress, disabled, style, }: AutoplayControlProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=AutoplayControl.d.ts.map
@@ -28,12 +28,19 @@ export interface CarouselProps {
28
28
  paddingHorizontal?: number;
29
29
  /** Explicit vertical padding (px) for the outer container. Overrides `carousel/padding/vertical`. */
30
30
  paddingVertical?: number;
31
+ /**
32
+ * Carousel visual type.
33
+ * - `'Default'` — standard carousel with dot pagination below.
34
+ * - `'Numbered'` — full-bleed carousel with floating AutoplayControl and
35
+ * NumberPagination overlaid at the bottom center.
36
+ */
37
+ type?: 'Default' | 'Numbered';
31
38
  /** Called when the active index changes. */
32
39
  onIndexChange?: (index: number) => void;
33
40
  /** Style overrides for the outermost container. */
34
41
  style?: StyleProp<ViewStyle>;
35
42
  }
36
- export declare function Carousel({ children, modes, autoPlay, autoPlayInterval, showPagination, loop, gap: gapProp, itemWidth: itemWidthProp, paddingHorizontal: paddingHorizontalProp, paddingVertical: paddingVerticalProp, onIndexChange, style, }: CarouselProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function Carousel({ children, modes, autoPlay, autoPlayInterval, showPagination, loop, gap: gapProp, itemWidth: itemWidthProp, paddingHorizontal: paddingHorizontalProp, paddingVertical: paddingVerticalProp, type, onIndexChange, style, }: CarouselProps): import("react/jsx-runtime").JSX.Element;
37
44
  export declare namespace Carousel {
38
45
  var Item: typeof import("./Carousel").Item;
39
46
  var Pagination: typeof import("./Carousel").Pagination;
@@ -17,6 +17,11 @@ export type ChipSelectProps = {
17
17
  * @default "ic_calendar_week"
18
18
  */
19
19
  icon?: string;
20
+ /**
21
+ * Whether to show the close icon when active.
22
+ * @default true
23
+ */
24
+ showCloseIcon?: boolean;
20
25
  /**
21
26
  * Modes for design token resolution.
22
27
  */
@@ -38,6 +43,6 @@ export type ChipSelectProps = {
38
43
  * ChipSelect component for selecting options (e.g. Date selection).
39
44
  * Based on Figma Node 1901-4727.
40
45
  */
41
- declare function ChipSelect({ label, active, icon, modes, style, labelSlot, onPress, }: ChipSelectProps): import("react/jsx-runtime").JSX.Element;
46
+ declare function ChipSelect({ label, active, icon, showCloseIcon, modes, style, labelSlot, onPress, }: ChipSelectProps): import("react/jsx-runtime").JSX.Element;
42
47
  export default ChipSelect;
43
48
  //# sourceMappingURL=ChipSelect.d.ts.map
@@ -15,6 +15,12 @@ export type ContentSheetProps = {
15
15
  * the same theme without you wiring `modes` onto each one.
16
16
  */
17
17
  modes?: Modes;
18
+ /**
19
+ * Optional title rendered in a centered, sticky header at the top of the
20
+ * sheet. Uses the same `drawer/title*` token family as the `Drawer` title so
21
+ * the two surfaces stay visually consistent.
22
+ */
23
+ title?: string;
18
24
  /**
19
25
  * Keep the sheet above the on-screen keyboard. When the keyboard opens the
20
26
  * sheet rises by exactly the keyboard height; when it closes the sheet drops
@@ -66,6 +72,6 @@ export type ContentSheetProps = {
66
72
  * - **Token-driven** styling via `getVariableByName` + `modes`, with `modes`
67
73
  * cascaded to all slot children.
68
74
  */
69
- declare function ContentSheet({ children, modes, avoidKeyboard, keyboardSpacing, safeAreaBottom, pinToBottom, style, ...rest }: ContentSheetProps): import("react/jsx-runtime").JSX.Element;
75
+ declare function ContentSheet({ children, modes, title, avoidKeyboard, keyboardSpacing, safeAreaBottom, pinToBottom, style, ...rest }: ContentSheetProps): import("react/jsx-runtime").JSX.Element;
70
76
  export default ContentSheet;
71
77
  //# sourceMappingURL=ContentSheet.d.ts.map
@@ -0,0 +1,96 @@
1
+ import React from 'react';
2
+ import { type ImageSourcePropType } from 'react-native';
3
+ import type { Modes } from '../../design-tokens';
4
+ export type PickedAsset = {
5
+ /** URI to the selected file (image, video, or document). */
6
+ uri: string;
7
+ /** Original file name, when available. */
8
+ name?: string;
9
+ /** MIME type, when available. */
10
+ type?: string;
11
+ /** File size in bytes, when available. */
12
+ size?: number;
13
+ /** Image/video width in pixels, when available. */
14
+ width?: number;
15
+ /** Image/video height in pixels, when available. */
16
+ height?: number;
17
+ };
18
+ export type AdditemPickerResult = {
19
+ /** `true` when the user cancelled the picker. */
20
+ didCancel?: boolean;
21
+ /** Selected assets. Empty when cancelled. */
22
+ assets: PickedAsset[];
23
+ /** Native error message, when something went wrong. */
24
+ error?: string;
25
+ };
26
+ /**
27
+ * Callback that opens a platform picker and resolves with the selected assets.
28
+ * This is the integration point for libraries like `react-native-image-picker`,
29
+ * `expo-image-picker`, or `react-native-document-picker`.
30
+ */
31
+ export type AdditemPicker = () => Promise<AdditemPickerResult>;
32
+ export type AdditemState = 'empty' | 'preview';
33
+ export type AdditemProps = {
34
+ /**
35
+ * Visual state of the item.
36
+ * - `'empty'` — shows the add/upload icon (default).
37
+ * - `'preview'` — shows `imageSource` and a remove icon overlay.
38
+ */
39
+ state?: AdditemState;
40
+ /**
41
+ * Image to preview when `state` is `'preview'`. Accepts the same shapes as
42
+ * the library's `Image` component (remote URI string, `{ uri }`, or `require()`).
43
+ */
44
+ imageSource?: ImageSourcePropType | string | undefined;
45
+ /**
46
+ * Called when the cell is pressed. In `'empty'` mode this is typically where
47
+ * the picker is launched; in `'preview'` mode it can open a preview/lightbox.
48
+ */
49
+ onPress?: () => void;
50
+ /**
51
+ * Called when the remove icon overlay is pressed in `'preview'` mode.
52
+ * Receives the press event so the parent can stop propagation if needed.
53
+ */
54
+ onRemove?: () => void;
55
+ /**
56
+ * Optional picker to invoke when the empty cell is pressed. When provided,
57
+ * `onPress` is ignored for the empty state and the cell becomes a real
58
+ * upload trigger that resolves with picked assets via `onAssetsPicked`.
59
+ */
60
+ picker?: AdditemPicker;
61
+ /**
62
+ * Called after a successful picker invocation with the selected assets.
63
+ */
64
+ onAssetsPicked?: (assets: PickedAsset[]) => void;
65
+ /**
66
+ * Modes for design-token resolution. Defaults to Neutral / Low / Icon Capsule
67
+ * Size S for the inner `IconCapsule` icons; any key supplied here overrides
68
+ * those defaults.
69
+ */
70
+ modes?: Modes;
71
+ /**
72
+ * Accessibility label. Defaults to a descriptive label based on state.
73
+ */
74
+ accessibilityLabel?: string;
75
+ /**
76
+ * Disables press interaction. Also dims the cell.
77
+ */
78
+ isDisabled?: boolean;
79
+ /** Test identifier. */
80
+ testID?: string;
81
+ };
82
+ /**
83
+ * `Additem` — a small, reusable upload/preview cell used inside form uploaders.
84
+ *
85
+ * In its default `'empty'` state it shows a centered add/upload icon. In
86
+ * `'preview'` state it renders a thumbnail with a removable overlay. The
87
+ * component is intentionally unopinionated about *how* files are picked: pass a
88
+ * `picker` callback that wraps `react-native-image-picker`,
89
+ * `expo-image-picker`, `react-native-document-picker`, or any custom selector,
90
+ * and the cell will invoke it, surface the result via `onAssetsPicked`, and
91
+ * handle cancellation/errors gracefully.
92
+ */
93
+ declare function Additem({ state, imageSource, onPress, onRemove, picker, onAssetsPicked, modes: propModes, accessibilityLabel, isDisabled, testID, }: AdditemProps): import("react/jsx-runtime").JSX.Element;
94
+ declare const _default: React.MemoExoticComponent<typeof Additem>;
95
+ export default _default;
96
+ //# sourceMappingURL=Additem.d.ts.map
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type AdditemProps, type PickedAsset } from './Additem';
4
+ import type { Modes } from '../../design-tokens';
5
+ export type FormUploadAttachment = PickedAsset;
6
+ export type FormUploadProps = {
7
+ /** Label rendered above the upload row. */
8
+ label?: string;
9
+ /**
10
+ * Helper text rendered below the upload row. When `errorMessage` is provided,
11
+ * it replaces the support text and renders in the error status.
12
+ */
13
+ supportText?: string;
14
+ /**
15
+ * Field name. When used inside `<Form>`, this is the key used to look up
16
+ * server-side `validationErrors`.
17
+ */
18
+ name?: string;
19
+ /**
20
+ * Controlled list of attachments. Each item maps to an `Additem` cell:
21
+ * render attachments as `'preview'` cells and leave the last slot as the
22
+ * `'empty'` upload trigger.
23
+ */
24
+ attachments?: FormUploadAttachment[];
25
+ /**
26
+ * Maximum number of attachments allowed. When omitted, the component renders
27
+ * a single empty upload trigger. Once `attachments.length` reaches `maxCount`,
28
+ * the empty trigger is hidden.
29
+ */
30
+ maxCount?: number;
31
+ /**
32
+ * Called when the attachment list should change (add or remove). The parent
33
+ * is responsible for updating the `attachments` array.
34
+ */
35
+ onAttachmentsChange?: (attachments: FormUploadAttachment[]) => void;
36
+ /**
37
+ * Optional picker injected by the parent. This keeps the component free of
38
+ * native-library dependencies while still providing real upload behaviour on
39
+ * iOS/Android. The picker should wrap `react-native-image-picker`,
40
+ * `expo-image-picker`, `react-native-document-picker`, etc.
41
+ */
42
+ picker?: AdditemProps['picker'];
43
+ /**
44
+ * Error message shown below the row. When provided inside `<Form>`, the form
45
+ * context error is used automatically unless this prop is set explicitly.
46
+ */
47
+ errorMessage?: string;
48
+ /** Marks the field as invalid. Also set automatically by `<Form>` errors. */
49
+ isInvalid?: boolean;
50
+ /** Disables all upload interaction. */
51
+ isDisabled?: boolean;
52
+ /**
53
+ * Custom children/slot rendered in place of the generated `Additem` cells.
54
+ * Useful when the consumer wants full control over the upload row. `modes`
55
+ * cascade into slot children automatically.
56
+ */
57
+ children?: React.ReactNode;
58
+ /** Modes for design-token resolution. */
59
+ modes?: Modes;
60
+ /** Style overrides for the outermost wrapper. */
61
+ style?: StyleProp<ViewStyle>;
62
+ /** Style overrides for the upload row container. */
63
+ rowStyle?: StyleProp<ViewStyle>;
64
+ /** Accessibility label. Defaults to `label`. */
65
+ accessibilityLabel?: string;
66
+ /** Test identifier. */
67
+ testID?: string;
68
+ };
69
+ /**
70
+ * `FormUpload` — a form-aware upload row built from reusable `Additem` cells.
71
+ *
72
+ * The component mirrors the Figma "FormUpload" design: a label, a horizontal
73
+ * row of upload/preview cells, and support text. It integrates with the
74
+ * existing `<Form>` context so server-side validation errors automatically
75
+ * show below the row, and it clears those errors when attachments change.
76
+ *
77
+ * Upload behaviour is provided through the `picker` prop so the library stays
78
+ * free of native image-picker dependencies. Pass any picker that returns the
79
+ * `AdditemPickerResult` shape and the empty cell becomes a real upload trigger
80
+ * on both iOS and Android.
81
+ */
82
+ declare function FormUpload({ label, supportText, name, attachments, maxCount, onAttachmentsChange, picker, errorMessage, isInvalid, isDisabled, children, modes: propModes, style, rowStyle, accessibilityLabel, testID, }: FormUploadProps): import("react/jsx-runtime").JSX.Element;
83
+ declare const _default: React.MemoExoticComponent<typeof FormUpload>;
84
+ export default _default;
85
+ //# sourceMappingURL=FormUpload.d.ts.map
@@ -0,0 +1,87 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import type { Modes } from '../../design-tokens';
4
+ export type GridJustifyContent = 'start' | 'stretch' | 'space-between';
5
+ export type GridAlignItems = 'start' | 'stretch' | 'center';
6
+ export type GridProps = {
7
+ /**
8
+ * Number of columns per row. Defaults to `1`. Children flow left-to-right,
9
+ * top-to-bottom into this many columns.
10
+ */
11
+ columns?: number;
12
+ /**
13
+ * Fixed row count. When set, the grid always renders `columns × rows` cells.
14
+ * Missing cells render as empty placeholders so the geometry stays stable.
15
+ * When omitted, the row count is derived from the number of children.
16
+ */
17
+ rows?: number;
18
+ /**
19
+ * Fractional column track weights — the React Native equivalent of CSS
20
+ * `grid-template-columns: 1fr 2fr 1fr`. Each value becomes a `flex` grow
21
+ * weight on the matching column. Shorter arrays repeat the last weight;
22
+ * omitted values default to equal `1fr` columns.
23
+ */
24
+ columnFrs?: readonly number[];
25
+ /**
26
+ * Fractional row track weights. When provided, each row container receives
27
+ * a matching `flexGrow` weight. Useful when the grid should fill a fixed
28
+ * height and rows should share space proportionally.
29
+ */
30
+ rowFrs?: readonly number[];
31
+ /** Override the resolved column gap token. */
32
+ columnGap?: number;
33
+ /** Override the resolved row gap token. */
34
+ rowGap?: number;
35
+ /**
36
+ * Shorthand gap override applied when `columnGap` / `rowGap` are not set
37
+ * individually. Falls back to the `Grid/gap` token.
38
+ */
39
+ gap?: number;
40
+ /** Uniform padding override for all sides. */
41
+ padding?: number;
42
+ paddingHorizontal?: number;
43
+ paddingVertical?: number;
44
+ paddingTop?: number;
45
+ paddingBottom?: number;
46
+ paddingLeft?: number;
47
+ paddingRight?: number;
48
+ /**
49
+ * How cells are distributed along each row.
50
+ * - `'stretch'` (default) — cells expand using `columnFrs`.
51
+ * - `'start'` — cells hug the leading edge; trailing space stays empty.
52
+ * - `'space-between'` — leftover space is distributed between cells
53
+ * (first cell flush-left, last cell flush-right).
54
+ */
55
+ justifyContent?: GridJustifyContent;
56
+ /** Cross-axis alignment applied to every cell wrapper. Defaults to `'stretch'`. */
57
+ alignItems?: GridAlignItems;
58
+ /**
59
+ * Slot content. Each child becomes one grid cell. `modes` cascade into all
60
+ * slot children automatically.
61
+ */
62
+ children?: React.ReactNode;
63
+ /** Design token modes (e.g. `{ 'Slot gap': 'M' }`). */
64
+ modes?: Modes;
65
+ /** Style override for the outer container. */
66
+ style?: StyleProp<ViewStyle>;
67
+ /** Style override for the inner rows wrapper. */
68
+ contentStyle?: StyleProp<ViewStyle>;
69
+ /** Style applied to every cell wrapper. */
70
+ cellStyle?: StyleProp<ViewStyle>;
71
+ /** Accessibility label for the grid container. */
72
+ accessibilityLabel?: string;
73
+ testID?: string;
74
+ };
75
+ /**
76
+ * `Grid` — a token-driven layout grid for React Native.
77
+ *
78
+ * Mirrors the Figma "Grid" component: a padded container with configurable
79
+ * columns, rows, fractional column tracks (`columnFrs`), and gap tokens.
80
+ * Each slot child maps to one cell — no separate `GridItem` wrapper is needed.
81
+ *
82
+ * @component
83
+ */
84
+ declare function Grid({ columns, rows, columnFrs, rowFrs, columnGap: columnGapProp, rowGap: rowGapProp, gap: gapProp, padding: paddingProp, paddingHorizontal: paddingHorizontalProp, paddingVertical: paddingVerticalProp, paddingTop: paddingTopProp, paddingBottom: paddingBottomProp, paddingLeft: paddingLeftProp, paddingRight: paddingRightProp, justifyContent, alignItems, children, modes: propModes, style, contentStyle, cellStyle, accessibilityLabel, testID, }: GridProps): import("react/jsx-runtime").JSX.Element;
85
+ declare const _default: React.MemoExoticComponent<typeof Grid>;
86
+ export default _default;
87
+ //# sourceMappingURL=Grid.d.ts.map
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ import type { Modes } from '../../design-tokens';
4
+ export type MetricDataProps = {
5
+ /** Top label (small, 12px). Hidden when omitted. */
6
+ title?: string;
7
+ /**
8
+ * The prominent value (20px bold). Pass a string, or any node (e.g. a
9
+ * `MoneyValue`) to compose a richer value.
10
+ */
11
+ value?: string | React.ReactNode;
12
+ /** Sub-label below the value (12px, muted). Hidden when omitted. */
13
+ caption?: string;
14
+ /**
15
+ * Optional glyph shown to the left of the value. Pass a registry icon name
16
+ * (e.g. `'ic_card'`) or a custom node. Rendered at 18px, tinted to the value
17
+ * colour. Hidden when omitted.
18
+ */
19
+ icon?: string | React.ReactNode;
20
+ /** Design-token modes for theming. */
21
+ modes?: Modes;
22
+ /** Override the container styles. */
23
+ style?: StyleProp<ViewStyle>;
24
+ /** Override the title text styles. */
25
+ titleStyle?: StyleProp<TextStyle>;
26
+ /** Override the value text styles. */
27
+ valueStyle?: StyleProp<TextStyle>;
28
+ /** Override the caption text styles. */
29
+ captionStyle?: StyleProp<TextStyle>;
30
+ /**
31
+ * Accessibility label. Defaults to the resolved `title`, `value` and
32
+ * `caption` text joined together.
33
+ */
34
+ accessibilityLabel?: string;
35
+ };
36
+ /**
37
+ * MetricData — a compact, centered metric block.
38
+ *
39
+ * Stacks a small `title`, a prominent `value` (with an optional leading
40
+ * `icon`), and a muted `caption`. Typography, colours, gaps and padding all
41
+ * resolve from the `metricdata/*` design tokens. `title`, `caption` and `icon`
42
+ * are optional; only `value` is shown by default.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <MetricData title="Balance" value="₹1,20,000" caption="as of today" />
47
+ * <MetricData title="Cards" value="12" icon="ic_card" caption="active" />
48
+ * ```
49
+ */
50
+ declare function MetricData({ title, value, caption, icon, modes, style, titleStyle, valueStyle, captionStyle, accessibilityLabel, }: MetricDataProps): import("react/jsx-runtime").JSX.Element;
51
+ declare const _default: React.MemoExoticComponent<typeof MetricData>;
52
+ export default _default;
53
+ //# sourceMappingURL=MetricData.d.ts.map
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import type { Modes } from '../../design-tokens';
4
+ export type NumberPaginationProps = {
5
+ /** The 1-based active page index. Ignored if `children` is supplied. Defaults to 1. */
6
+ activePage?: number;
7
+ /** The total number of pages. Ignored if `children` is supplied. Defaults to 1. */
8
+ totalPages?: number;
9
+ /** Callback fired when a page button is pressed. Ignored if `children` is supplied. */
10
+ onPageChange?: (page: number) => void;
11
+ /** Custom children to override the default page buttons. */
12
+ children?: React.ReactNode;
13
+ modes?: Modes;
14
+ style?: StyleProp<ViewStyle>;
15
+ };
16
+ /**
17
+ * NumberPagination component displays a horizontal list of page numbers on a frosted glass surface.
18
+ * All styling is driven by Figma design tokens with support for custom children slot.
19
+ */
20
+ export default function NumberPagination({ activePage, totalPages, onPageChange, children, modes, style, }: NumberPaginationProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=NumberPagination.d.ts.map
@@ -0,0 +1,89 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type ViewStyle, type ImageSourcePropType } from 'react-native';
3
+ import type { Modes } from '../../design-tokens';
4
+ /**
5
+ * A single UPI handle pill rendered under the profile name.
6
+ */
7
+ export interface ProfileCardUpiHandle {
8
+ /** Handle text, e.g. `"username@jio"` or a phone number. */
9
+ label: string;
10
+ /** Trailing registry icon (e.g. `'ic_copy'`, `'ic_confirm'`). */
11
+ iconName?: string;
12
+ /** Toggles the trailing icon. Defaults to `true`. */
13
+ showIcon?: boolean;
14
+ /** Makes the pill pressable (e.g. copy-to-clipboard). */
15
+ onPress?: () => void;
16
+ }
17
+ export interface ProfileCardProps {
18
+ /** User's display name shown in the header. */
19
+ name?: string;
20
+ /** Monogram initials for the avatar (used when `avatarSource` is not set). */
21
+ monogram?: string;
22
+ /** Avatar image source. When set, the avatar renders the image instead of the monogram. */
23
+ avatarSource?: ImageSourcePropType | string;
24
+ /**
25
+ * Registry icon for the small badge attached to the avatar's bottom-right
26
+ * corner. Pass `null` to hide the badge. Defaults to `'ic_qr_code'`.
27
+ */
28
+ badgeIcon?: string | null;
29
+ /** UPI handle pills rendered under the name. Pass `[]` to render none. */
30
+ upiHandles?: ProfileCardUpiHandle[];
31
+ /**
32
+ * Full override for the header row (avatar + name + handles). Takes
33
+ * precedence over the declarative header props. `modes` cascade into it.
34
+ */
35
+ header?: React.ReactNode;
36
+ /**
37
+ * Card body (the Figma "slot"). Rendered below the header divider; `modes`
38
+ * (including the profile-card context) cascade into every child, so nested
39
+ * `ListItem`s, `Divider`s, `Text`s and `Button`s resolve the on-dark
40
+ * profile-card token values automatically.
41
+ */
42
+ children?: React.ReactNode;
43
+ /** Toggles the divider between the header and the body. Defaults to `true`. */
44
+ showDivider?: boolean;
45
+ /** Card width. Defaults to the Figma spec (`344`). Pass `'100%'` to fill the parent. */
46
+ width?: number | `${number}%`;
47
+ /** Modes object for design-token resolution, cascaded to all children. */
48
+ modes?: Modes;
49
+ /** Style overrides for the card container. */
50
+ style?: StyleProp<ViewStyle>;
51
+ /** Accessibility label for the card. */
52
+ accessibilityLabel?: string;
53
+ }
54
+ /**
55
+ * ProfileCard — Figma node 6914:38498 ("Profile Card").
56
+ *
57
+ * A dark, rounded profile summary card composed from the shared primitives:
58
+ *
59
+ * - **Header** — a {@link ListItem} whose leading slot is an {@link Attached}
60
+ * monogram {@link Avatar} with a small {@link IconCapsule} badge at its
61
+ * bottom-right, the user's name as the title, and a row of
62
+ * {@link UpiHandle} pills in the support slot.
63
+ * - **Divider** — separates the header from the body.
64
+ * - **Body slot** — arbitrary children (typically `ListItem`s separated by
65
+ * `Divider`s). All profile-card context modes cascade into the slot, so
66
+ * nested components automatically resolve their on-dark token values.
67
+ *
68
+ * The card supports the `Profile Card Appearance` collection
69
+ * (`Default` | `Premium`) via the `modes` prop, which recolors the container,
70
+ * avatar, pills and divider in one go.
71
+ *
72
+ * @example
73
+ * ```tsx
74
+ * <ProfileCard
75
+ * name="Shruti Chandarshekhar Rai"
76
+ * monogram="SR"
77
+ * upiHandles={[
78
+ * { label: 'shrutirai-1@jio', iconName: 'ic_copy', onPress: copyHandle },
79
+ * { label: '9184844184', iconName: 'ic_confirm' },
80
+ * ]}
81
+ * >
82
+ * <ListItem layout="Horizontal" title="JioFinance+" navArrow={false} />
83
+ * </ProfileCard>
84
+ * ```
85
+ */
86
+ declare function ProfileCard({ name, monogram, avatarSource, badgeIcon, upiHandles, header, children, showDivider, width, modes: propModes, style, accessibilityLabel, }: ProfileCardProps): import("react/jsx-runtime").JSX.Element;
87
+ declare const _default: React.MemoExoticComponent<typeof ProfileCard>;
88
+ export default _default;
89
+ //# sourceMappingURL=ProfileCard.d.ts.map
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { View, type StyleProp, type ViewStyle } from 'react-native';
3
+ import type { Modes } from '../../design-tokens';
4
+ export type RatingProps = {
5
+ /** Number of filled stars. Rounded to the nearest whole star for display. */
6
+ value?: number;
7
+ /** Total number of stars to render. */
8
+ max?: number;
9
+ /**
10
+ * Called with the new rating (1..max) when a star is pressed. Providing this
11
+ * makes the control interactive; omit it (or set `readOnly`) for a display.
12
+ */
13
+ onChange?: (value: number) => void;
14
+ /** Force a read-only display even when `onChange` is provided. */
15
+ readOnly?: boolean;
16
+ /** Override the star edge length. Defaults to the `ratingStar/width` token. */
17
+ starSize?: number;
18
+ /** Override the spacing between stars. Defaults to the `rating/gap` token. */
19
+ gap?: number;
20
+ /** Design token modes forwarded to token lookups. */
21
+ modes?: Modes;
22
+ /** Optional container style overrides. */
23
+ style?: StyleProp<ViewStyle>;
24
+ /** Accessibility label for the whole rating. Defaults to "X of Y stars". */
25
+ accessibilityLabel?: string;
26
+ } & Omit<React.ComponentProps<typeof View>, 'style'>;
27
+ declare function Rating({ value, max, onChange, readOnly, starSize, gap, modes: propModes, style, accessibilityLabel, ...rest }: RatingProps): import("react/jsx-runtime").JSX.Element;
28
+ declare const _default: React.MemoExoticComponent<typeof Rating>;
29
+ export default _default;
30
+ //# sourceMappingURL=Rating.d.ts.map
@@ -12,6 +12,12 @@ type UpiHandleProps = {
12
12
  * inline SVG XML string, a `require()` asset, an SVG React component, or
13
13
  * an already-rendered element. See {@link UnifiedSource}. Avatars are
14
14
  * intentionally **not** tinted — the source renders as-is.
15
+ *
16
+ * The leading avatar is driven entirely by this prop: providing a `source`
17
+ * (or the deprecated `avatarSource`) force-sets the Figma "UPI Handle Image"
18
+ * collection to `True` and renders the avatar; omitting it force-sets the
19
+ * mode to `False` and hides it. This override wins over any `UPI Handle
20
+ * Image` value passed via `modes`.
15
21
  */
16
22
  source?: UnifiedSource;
17
23
  /**
@@ -41,7 +47,7 @@ type UpiHandleProps = {
41
47
  * @param {Object} [props.modes={}] - Modes object passed directly to `getVariableByName`.
42
48
  * @param {boolean} [props.showIcon=true] - Toggles the trailing icon visibility.
43
49
  * @param {string} [props.iconName='ic_scan_qr_code'] - Icon name from the actions set.
44
- * @param {UnifiedSource} [props.source] - Unified avatar source (URI, inline SVG XML, `require()` asset, SVG React component, or React element). Smart-detects raster vs SVG so the same prop works on iOS, Android and web.
50
+ * @param {UnifiedSource} [props.source] - Unified avatar source (URI, inline SVG XML, `require()` asset, SVG React component, or React element). Smart-detects raster vs SVG so the same prop works on iOS, Android and web. Providing a source force-sets `UPI Handle Image: True` (avatar shown); omitting it force-sets `False` (avatar hidden), overriding any `UPI Handle Image` value passed via `modes`.
45
51
  * @param {ImageSourcePropType|UnifiedSource} [props.avatarSource] - Deprecated alias for `source`; kept for back-compat.
46
52
  * @param {Function} [props.onClick] - Click/tap handler. Works as an alias for `onPress`.
47
53
  * @param {string} [props.accessibilityLabel] - Accessibility label for screen readers