jfs-components 0.0.78 → 0.0.84
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 +11 -0
- package/lib/commonjs/components/AppBar/AppBar.js +56 -6
- package/lib/commonjs/components/Attached/Attached.js +183 -0
- package/lib/commonjs/components/Card/Card.js +25 -2
- package/lib/commonjs/components/Checkbox/Checkbox.js +18 -2
- package/lib/commonjs/components/Drawer/Drawer.js +6 -1
- package/lib/commonjs/components/DropdownInput/DropdownInput.js +30 -6
- package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +17 -11
- package/lib/commonjs/components/FormField/FormField.js +1 -14
- package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +9 -7
- package/lib/commonjs/components/ListItem/ListItem.js +26 -24
- package/lib/commonjs/components/MessageField/MessageField.js +1 -13
- package/lib/commonjs/components/PaymentFeedback/PaymentFeedback.js +12 -9
- package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +237 -0
- package/lib/commonjs/components/Slot/Slot.js +73 -0
- package/lib/commonjs/components/Spinner/Spinner.js +217 -0
- package/lib/commonjs/components/TextInput/TextInput.js +33 -18
- package/lib/commonjs/components/index.js +28 -0
- package/lib/commonjs/icons/components/IconArrowdown.js +19 -0
- package/lib/commonjs/icons/components/IconArrowup.js +19 -0
- package/lib/commonjs/icons/components/IconChevrondowncircle.js +19 -0
- package/lib/commonjs/icons/components/IconChevronleftcircle.js +19 -0
- package/lib/commonjs/icons/components/IconChevronrightcircle.js +19 -0
- package/lib/commonjs/icons/components/IconChevronupcircle.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavback.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavcenter.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavhome.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavtask.js +19 -0
- package/lib/commonjs/icons/components/IconSignin.js +19 -0
- package/lib/commonjs/icons/components/IconSignout.js +19 -0
- package/lib/commonjs/icons/components/index.js +132 -0
- package/lib/commonjs/icons/registry.js +2 -2
- package/lib/module/components/AppBar/AppBar.js +56 -6
- package/lib/module/components/Attached/Attached.js +178 -0
- package/lib/module/components/Card/Card.js +25 -2
- package/lib/module/components/Checkbox/Checkbox.js +18 -2
- package/lib/module/components/Drawer/Drawer.js +6 -1
- package/lib/module/components/DropdownInput/DropdownInput.js +30 -6
- package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +17 -11
- package/lib/module/components/FormField/FormField.js +3 -16
- package/lib/module/components/FullscreenModal/FullscreenModal.js +9 -7
- package/lib/module/components/ListItem/ListItem.js +26 -24
- package/lib/module/components/MessageField/MessageField.js +3 -15
- package/lib/module/components/PaymentFeedback/PaymentFeedback.js +13 -9
- package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +234 -0
- package/lib/module/components/Slot/Slot.js +68 -0
- package/lib/module/components/Spinner/Spinner.js +212 -0
- package/lib/module/components/TextInput/TextInput.js +34 -19
- package/lib/module/components/index.js +4 -0
- package/lib/module/icons/components/IconArrowdown.js +12 -0
- package/lib/module/icons/components/IconArrowup.js +12 -0
- package/lib/module/icons/components/IconChevrondowncircle.js +12 -0
- package/lib/module/icons/components/IconChevronleftcircle.js +12 -0
- package/lib/module/icons/components/IconChevronrightcircle.js +12 -0
- package/lib/module/icons/components/IconChevronupcircle.js +12 -0
- package/lib/module/icons/components/IconOsnavback.js +12 -0
- package/lib/module/icons/components/IconOsnavcenter.js +12 -0
- package/lib/module/icons/components/IconOsnavhome.js +12 -0
- package/lib/module/icons/components/IconOsnavtask.js +12 -0
- package/lib/module/icons/components/IconSignin.js +12 -0
- package/lib/module/icons/components/IconSignout.js +12 -0
- package/lib/module/icons/components/index.js +12 -0
- package/lib/module/icons/registry.js +2 -2
- package/lib/typescript/src/components/AppBar/AppBar.d.ts +12 -1
- package/lib/typescript/src/components/Attached/Attached.d.ts +64 -0
- package/lib/typescript/src/components/Card/Card.d.ts +9 -2
- package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +3 -2
- package/lib/typescript/src/components/ListItem/ListItem.d.ts +16 -6
- package/lib/typescript/src/components/PaymentFeedback/PaymentFeedback.d.ts +5 -1
- package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +66 -0
- package/lib/typescript/src/components/Slot/Slot.d.ts +52 -0
- package/lib/typescript/src/components/Spinner/Spinner.d.ts +45 -0
- package/lib/typescript/src/components/index.d.ts +4 -0
- package/lib/typescript/src/icons/components/IconArrowdown.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconArrowup.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevrondowncircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevronleftcircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevronrightcircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevronupcircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavback.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavcenter.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavhome.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavtask.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconSignin.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconSignout.d.ts +3 -0
- package/lib/typescript/src/icons/components/index.d.ts +12 -0
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +3 -2
- package/src/components/AppBar/AppBar.tsx +79 -12
- package/src/components/Attached/Attached.tsx +237 -0
- package/src/components/Card/Card.tsx +28 -1
- package/src/components/Checkbox/Checkbox.tsx +14 -2
- package/src/components/Drawer/Drawer.tsx +4 -0
- package/src/components/DropdownInput/DropdownInput.tsx +54 -20
- package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +13 -9
- package/src/components/FormField/FormField.tsx +3 -19
- package/src/components/FullscreenModal/FullscreenModal.tsx +6 -3
- package/src/components/ListItem/ListItem.tsx +42 -25
- package/src/components/MessageField/MessageField.tsx +3 -18
- package/src/components/PaymentFeedback/PaymentFeedback.tsx +15 -8
- package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +316 -0
- package/src/components/Slot/Slot.tsx +91 -0
- package/src/components/Spinner/Spinner.tsx +273 -0
- package/src/components/TextInput/TextInput.tsx +37 -19
- package/src/components/index.ts +4 -0
- package/src/icons/components/IconArrowdown.tsx +11 -0
- package/src/icons/components/IconArrowup.tsx +11 -0
- package/src/icons/components/IconChevrondowncircle.tsx +11 -0
- package/src/icons/components/IconChevronleftcircle.tsx +11 -0
- package/src/icons/components/IconChevronrightcircle.tsx +11 -0
- package/src/icons/components/IconChevronupcircle.tsx +11 -0
- package/src/icons/components/IconOsnavback.tsx +11 -0
- package/src/icons/components/IconOsnavcenter.tsx +11 -0
- package/src/icons/components/IconOsnavhome.tsx +11 -0
- package/src/icons/components/IconOsnavtask.tsx +11 -0
- package/src/icons/components/IconSignin.tsx +11 -0
- package/src/icons/components/IconSignout.tsx +11 -0
- package/src/icons/components/index.ts +12 -0
- package/src/icons/registry.ts +49 -1
|
@@ -19,8 +19,19 @@ export type AppBarProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Slot for the middle content.
|
|
21
21
|
* Often used for "Page Title" in SubPage.
|
|
22
|
+
*
|
|
23
|
+
* On `SubPage` this is rendered as an absolutely-centered box (matching the
|
|
24
|
+
* Figma "slot wrap"): it stays centered in the bar regardless of how wide
|
|
25
|
+
* the leading/actions slots are, and its content fills/shrinks responsively
|
|
26
|
+
* within {@link middleSlotWidth}.
|
|
22
27
|
*/
|
|
23
28
|
middleSlot?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Width of the centered `SubPage` middle slot, in px.
|
|
31
|
+
* Defaults to the Figma value (192). Has no effect on `MainPage`.
|
|
32
|
+
* @default 192
|
|
33
|
+
*/
|
|
34
|
+
middleSlotWidth?: number;
|
|
24
35
|
/**
|
|
25
36
|
* Slot for the actions on the right.
|
|
26
37
|
*/
|
|
@@ -40,6 +51,6 @@ export type AppBarProps = {
|
|
|
40
51
|
accessibilityLabel?: string;
|
|
41
52
|
accessibilityHint?: string;
|
|
42
53
|
} & Omit<React.ComponentProps<typeof View>, 'style' | 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint'>;
|
|
43
|
-
export default function AppBar({ type, leadingSlot, middleSlot, actionsSlot, modes: propModes, onLeadingPress, style, accessibilityLabel, accessibilityHint, ...rest }: AppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export default function AppBar({ type, leadingSlot, middleSlot, middleSlotWidth, actionsSlot, modes: propModes, onLeadingPress, style, accessibilityLabel, accessibilityHint, ...rest }: AppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
44
55
|
export {};
|
|
45
56
|
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Anchor point on the main content where the attached `badge` is centered.
|
|
5
|
+
* Mirrors the nine Figma `position` variants (corners, edge midpoints, center).
|
|
6
|
+
*/
|
|
7
|
+
export type AttachedPosition = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
|
|
8
|
+
export type AttachedProps = Omit<ViewProps, 'children'> & {
|
|
9
|
+
/**
|
|
10
|
+
* Main content the badge attaches to (the Figma "main slot"). Any node —
|
|
11
|
+
* typically an `IconCapsule`, `Avatar`, image, etc. `modes` are cascaded to
|
|
12
|
+
* every child via {@link cloneChildrenWithModes}.
|
|
13
|
+
*/
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The element attached on top of `children` (the Figma "slot"). Centered on
|
|
17
|
+
* the anchor point given by `position` so it straddles the edge/corner.
|
|
18
|
+
* `modes` are cascaded into it as well.
|
|
19
|
+
*/
|
|
20
|
+
badge?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Enforces a fixed square size (in px) on the `badge` slot, regardless of
|
|
23
|
+
* what node is passed. The badge is wrapped in a box of
|
|
24
|
+
* `badgeSize × badgeSize` with `overflow: 'hidden'`, and the badge content is
|
|
25
|
+
* stretched to fill it. Use this to guarantee the design-token size even when
|
|
26
|
+
* a consumer drops in an arbitrary node (e.g. an `Image`) whose intrinsic
|
|
27
|
+
* size/aspect-ratio would otherwise win.
|
|
28
|
+
*
|
|
29
|
+
* When omitted, the badge keeps its own intrinsic size (legacy behavior).
|
|
30
|
+
*/
|
|
31
|
+
badgeSize?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Corner radius used to clip the `badge` box. Only applies when `badgeSize`
|
|
34
|
+
* is set. Anything that overflows the rounded box (e.g. a non-square image)
|
|
35
|
+
* is clipped.
|
|
36
|
+
* @default badgeSize / 2 (a full circle)
|
|
37
|
+
*/
|
|
38
|
+
badgeRadius?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Anchor point for the `badge` relative to the main content.
|
|
41
|
+
* @default 'bottom-right'
|
|
42
|
+
*/
|
|
43
|
+
position?: AttachedPosition;
|
|
44
|
+
/**
|
|
45
|
+
* How the anchor point is computed for diagonal (corner) positions:
|
|
46
|
+
* - `false` (default): treat the main content as a **square** — corner
|
|
47
|
+
* anchors sit on the bounding-box corners.
|
|
48
|
+
* - `true`: treat the main content as a **circle** inscribed in its bounding
|
|
49
|
+
* box — corner anchors sit on the circle's circumference (the 45° point),
|
|
50
|
+
* so badges hug round content like a circular `IconCapsule` or `Avatar`.
|
|
51
|
+
*
|
|
52
|
+
* Edge (`top`/`bottom`/`left`/`right`) and `center` anchors are unaffected,
|
|
53
|
+
* since the circle meets the bounding box at those points.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
circular?: boolean;
|
|
57
|
+
/** Mode configuration cascaded to the token resolver and all children. */
|
|
58
|
+
modes?: Record<string, any>;
|
|
59
|
+
style?: StyleProp<ViewStyle>;
|
|
60
|
+
};
|
|
61
|
+
declare function Attached({ children, badge, badgeSize, badgeRadius, position, circular, modes: propModes, style, ...rest }: AttachedProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare const _default: React.MemoExoticComponent<typeof Attached>;
|
|
63
|
+
export default _default;
|
|
64
|
+
//# sourceMappingURL=Attached.d.ts.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ViewStyle, type TextStyle, type StyleProp } from 'react-native';
|
|
3
3
|
export interface CardProps {
|
|
4
|
+
/**
|
|
5
|
+
* Content rendered in the header slot at the top of the card (e.g. a brand logo).
|
|
6
|
+
* Sits above the media slot, with its own padding.
|
|
7
|
+
*/
|
|
8
|
+
header?: React.ReactNode;
|
|
4
9
|
/**
|
|
5
10
|
* The content to be rendered in the media slot (e.g. an Image).
|
|
6
11
|
* This content is wrapped in a container that respects the `aspectRatio`.
|
|
@@ -28,16 +33,18 @@ export interface CardProps {
|
|
|
28
33
|
* Card component implementation from Figma node 765:6186.
|
|
29
34
|
*
|
|
30
35
|
* Supports a `media` slot (with aspect ratio) and a content area.
|
|
36
|
+
* Supports an optional `header` slot (e.g. a brand logo), a `media` slot
|
|
37
|
+
* (with aspect ratio) and a content area.
|
|
31
38
|
* Usage:
|
|
32
39
|
* ```tsx
|
|
33
|
-
* <Card media={<Image source={...} />} modes={modes}>
|
|
40
|
+
* <Card header={<GoldLogo />} media={<Image source={...} />} modes={modes}>
|
|
34
41
|
* <Card.SupportText>Support text</Card.SupportText>
|
|
35
42
|
* <Card.Title>Title</Card.Title>
|
|
36
43
|
* <Card.SupportText>Support text</Card.SupportText>
|
|
37
44
|
* </Card>
|
|
38
45
|
* ```
|
|
39
46
|
*/
|
|
40
|
-
export declare function Card({ media, children, modes, mediaAspectRatio, style, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function Card({ header, media, children, modes, mediaAspectRatio, style, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
41
48
|
export declare namespace Card {
|
|
42
49
|
var Title: ({ children, style, modes: propModes }: CardTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
50
|
var SupportText: ({ children, style, modes: propModes }: CardTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -73,8 +73,9 @@ export type DropdownInputProps = {
|
|
|
73
73
|
*/
|
|
74
74
|
menuMaxHeight?: number;
|
|
75
75
|
/**
|
|
76
|
-
* Pixel
|
|
77
|
-
*
|
|
76
|
+
* Pixel gap between the trigger and the popup. When omitted, it defaults
|
|
77
|
+
* to the `formField/gap` design token so the menu sits the same distance
|
|
78
|
+
* below the input as the rest of the field's internal spacing.
|
|
78
79
|
*/
|
|
79
80
|
menuOffset?: number;
|
|
80
81
|
/**
|
|
@@ -6,8 +6,16 @@ type ListItemProps = {
|
|
|
6
6
|
title?: string;
|
|
7
7
|
supportText?: string;
|
|
8
8
|
showSupportText?: boolean;
|
|
9
|
-
leading
|
|
9
|
+
/** Leading slot (Figma "leading"). Omitted or `null` renders nothing. */
|
|
10
|
+
leading?: React.ReactNode | null;
|
|
10
11
|
supportSlot?: React.ReactNode;
|
|
12
|
+
/** Trailing slot (Figma "trailing"), e.g. `MoneyValue` or `Button`. Horizontal layout only. */
|
|
13
|
+
trailing?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Renamed to `trailing` for a symmetric `leading` / `trailing`
|
|
16
|
+
* slot API. Still honored for backward compatibility; `trailing` wins when
|
|
17
|
+
* both are provided. Will be removed in a future major version.
|
|
18
|
+
*/
|
|
11
19
|
endSlot?: React.ReactNode;
|
|
12
20
|
/** Whether to show the NavArrow on the far right (Horizontal layout only). Defaults to true. */
|
|
13
21
|
navArrow?: boolean;
|
|
@@ -33,9 +41,11 @@ type ListItemProps = {
|
|
|
33
41
|
* - **design-token driven styling** via `getVariableByName` and `modes`
|
|
34
42
|
*
|
|
35
43
|
* Wherever the Figma layer name contains "Slot", this component exposes a
|
|
36
|
-
* dedicated React "slot" prop
|
|
44
|
+
* dedicated React "slot" prop. The leading and trailing edges share a
|
|
45
|
+
* symmetric `leading` / `trailing` slot API:
|
|
46
|
+
* - Slot "leading" → `leading`
|
|
37
47
|
* - Slot "support text" → `supportSlot`
|
|
38
|
-
* - Slot "
|
|
48
|
+
* - Slot "trailing" → `trailing`
|
|
39
49
|
*
|
|
40
50
|
* @component
|
|
41
51
|
* @param {Object} props
|
|
@@ -43,9 +53,9 @@ type ListItemProps = {
|
|
|
43
53
|
* @param {string} [props.title='Title'] - Primary title used in the horizontal layout.
|
|
44
54
|
* @param {string} [props.supportText='Support Text'] - Support text used in both layouts when `supportSlot` is not provided.
|
|
45
55
|
* @param {boolean} [props.showSupportText=true] - Toggles rendering of the support text in Horizontal layout.
|
|
46
|
-
* @param {React.ReactNode} [props.leading] - Optional leading
|
|
56
|
+
* @param {React.ReactNode|null} [props.leading] - Optional leading slot. Omitted or `null` renders nothing.
|
|
47
57
|
* @param {React.ReactNode} [props.supportSlot] - Optional custom slot used instead of the default support text block.
|
|
48
|
-
* @param {React.ReactNode} [props.
|
|
58
|
+
* @param {React.ReactNode} [props.trailing] - Optional trailing slot (Figma Slot "trailing"). Horizontal layout only.
|
|
49
59
|
* @param {boolean} [props.navArrow=true] - Whether to show NavArrow on the far right (Horizontal layout only).
|
|
50
60
|
* @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
|
|
51
61
|
* @param {Function} [props.onPress] - When provided, the entire item becomes pressable (navigation variant).
|
|
@@ -67,7 +77,7 @@ type ListItemProps = {
|
|
|
67
77
|
* handlers stay referentially stable across renders.
|
|
68
78
|
* - The component is wrapped in `React.memo`.
|
|
69
79
|
*/
|
|
70
|
-
declare function ListItemImpl({ layout, title, supportText, showSupportText, leading, supportSlot, endSlot, navArrow, modes, onPress, style, contentStyle, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, ...rest }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
declare function ListItemImpl({ layout, title, supportText, showSupportText, leading, supportSlot, trailing, endSlot, navArrow, modes, onPress, style, contentStyle, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, ...rest }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
71
81
|
declare const ListItem: React.MemoExoticComponent<typeof ListItemImpl>;
|
|
72
82
|
export default ListItem;
|
|
73
83
|
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -15,7 +15,11 @@ export type PaymentFeedbackProps = {
|
|
|
15
15
|
iconName?: string;
|
|
16
16
|
/** Optional custom media slot that replaces the default IconCapsule */
|
|
17
17
|
renderMedia?: ReactNode;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Mode configuration for design tokens. Also drives the default
|
|
20
|
+
* IconCapsule's color — pass `AppearanceSystem: 'positive' | 'warning' |
|
|
21
|
+
* 'negative'` to render a green/orange/red capsule (defaults to `positive`).
|
|
22
|
+
*/
|
|
19
23
|
modes?: Record<string, any>;
|
|
20
24
|
style?: ViewStyle;
|
|
21
25
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A single plan column header (the label column has no header of its own).
|
|
5
|
+
*/
|
|
6
|
+
export type PlanComparisonColumn = {
|
|
7
|
+
/** Header text for the plan column. */
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Render the header in the brand accent colour (gold) — use it to
|
|
11
|
+
* highlight the recommended / upsell plan.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
brand?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Value rendered inside a plan cell.
|
|
18
|
+
* - `string` / `number` → rendered as value text.
|
|
19
|
+
* - `false` → renders the muted "not available" cross icon.
|
|
20
|
+
* - any React node → rendered as-is (e.g. a `Badge`, `MoneyValue`, icon…).
|
|
21
|
+
* - `null` / `undefined` / `true` → empty cell.
|
|
22
|
+
*/
|
|
23
|
+
export type PlanComparisonCellValue = string | number | boolean | null | undefined | React.ReactElement;
|
|
24
|
+
export type PlanComparisonRow = {
|
|
25
|
+
/** Feature label shown in the first (left) column. */
|
|
26
|
+
label: string;
|
|
27
|
+
/**
|
|
28
|
+
* Show an info icon after the label. When `onInfoPress` is provided the
|
|
29
|
+
* icon becomes tappable; otherwise it is purely decorative.
|
|
30
|
+
*/
|
|
31
|
+
showInfo?: boolean;
|
|
32
|
+
/** Handler for the info icon. Implies `showInfo`. */
|
|
33
|
+
onInfoPress?: () => void;
|
|
34
|
+
/**
|
|
35
|
+
* One value per plan column, in the same order as `columns`. See
|
|
36
|
+
* {@link PlanComparisonCellValue} for how each value is rendered.
|
|
37
|
+
*/
|
|
38
|
+
values: PlanComparisonCellValue[];
|
|
39
|
+
/** Stable key. Falls back to the label / index. */
|
|
40
|
+
key?: React.Key;
|
|
41
|
+
};
|
|
42
|
+
export type PlanComparisonCardProps = {
|
|
43
|
+
/**
|
|
44
|
+
* Plan column headers (excludes the leading label column). The order here
|
|
45
|
+
* maps 1:1 to each row's `values` array.
|
|
46
|
+
*/
|
|
47
|
+
columns?: PlanComparisonColumn[];
|
|
48
|
+
/** Feature rows compared across the plan columns. */
|
|
49
|
+
rows?: PlanComparisonRow[];
|
|
50
|
+
/** Design token modes for theming (e.g. `{ "Color Mode": "Light" }`). */
|
|
51
|
+
modes?: Record<string, any>;
|
|
52
|
+
/** Override the outer container style. */
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* PlanComparisonCard renders a compact comparison table that pits the user's
|
|
57
|
+
* current plan against one or more alternative plans across a set of feature
|
|
58
|
+
* rows. Implementation of Figma node `4498:2968` (`PlanComparisonCard`).
|
|
59
|
+
*
|
|
60
|
+
* Columns use a 1.8fr / 1fr flex ratio (label vs plan), matching the Figma grid.
|
|
61
|
+
*
|
|
62
|
+
* @component
|
|
63
|
+
*/
|
|
64
|
+
declare function PlanComparisonCard({ columns, rows, modes, style, }: PlanComparisonCardProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export default PlanComparisonCard;
|
|
66
|
+
//# sourceMappingURL=PlanComparisonCard.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
|
|
3
|
+
export type SlotLayoutDirection = 'vertical' | 'horizontal';
|
|
4
|
+
export type SlotProps = ViewProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Content laid out inside the slot. `modes` are cascaded to every child via
|
|
7
|
+
* {@link cloneChildrenWithModes}.
|
|
8
|
+
*/
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Main-axis direction for slot children. Matches the Figma Slot variant:
|
|
12
|
+
* - `vertical` (default): stacks children in a column
|
|
13
|
+
* - `horizontal`: arranges children in a row
|
|
14
|
+
*/
|
|
15
|
+
layoutDirection?: SlotLayoutDirection;
|
|
16
|
+
/**
|
|
17
|
+
* Alignment along the cross axis.
|
|
18
|
+
* Defaults to `stretch` for vertical and `flex-start` for horizontal.
|
|
19
|
+
*/
|
|
20
|
+
alignCrossAxis?: ViewStyle['alignItems'];
|
|
21
|
+
/**
|
|
22
|
+
* Distribution along the main axis (maps to `justifyContent`).
|
|
23
|
+
*/
|
|
24
|
+
justifyMainAxis?: ViewStyle['justifyContent'];
|
|
25
|
+
/**
|
|
26
|
+
* Mode configuration passed to the token resolver and cascaded to children.
|
|
27
|
+
*/
|
|
28
|
+
modes?: Record<string, any>;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Slot — a token-driven layout container for grouped slot content.
|
|
33
|
+
*
|
|
34
|
+
* Use `Slot` instead of a raw `View` when you need a vertical or horizontal
|
|
35
|
+
* stack with design-token gap spacing and automatic `modes` propagation to
|
|
36
|
+
* children. Typical usage is nesting a column of actions inside a
|
|
37
|
+
* direction-locked parent such as `ActionFooter`:
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <ActionFooter modes={modes}>
|
|
42
|
+
* <Slot layoutDirection="vertical" modes={modes}>
|
|
43
|
+
* <Button label="Continue" modes={primaryModes} />
|
|
44
|
+
* <Disclaimer disclaimer="Terms apply." modes={modes} />
|
|
45
|
+
* </Slot>
|
|
46
|
+
* </ActionFooter>
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare function Slot({ children, layoutDirection, alignCrossAxis, justifyMainAxis, modes: propModes, style, ...rest }: SlotProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare const _default: React.MemoExoticComponent<typeof Slot>;
|
|
51
|
+
export default _default;
|
|
52
|
+
//# sourceMappingURL=Slot.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Per-segment colours, resolved from the Figma `spiner/*` tokens. Consumers can
|
|
4
|
+
* override any subset via the `colors` prop.
|
|
5
|
+
*/
|
|
6
|
+
export type SpinnerColors = {
|
|
7
|
+
/** Leading segment (front of the falling chain). */
|
|
8
|
+
primary?: string;
|
|
9
|
+
/** Middle segment. */
|
|
10
|
+
secondary?: string;
|
|
11
|
+
/** Trailing segment (tail of the chain). */
|
|
12
|
+
tertiary?: string;
|
|
13
|
+
};
|
|
14
|
+
type SpinnerBaseProps = Omit<ViewProps, 'children' | 'style'>;
|
|
15
|
+
export type SpinnerProps = SpinnerBaseProps & {
|
|
16
|
+
/**
|
|
17
|
+
* Diameter in px. The spinner is always rendered at a 1:1 ratio, so a single
|
|
18
|
+
* size controls both width and height. Defaults to the Figma size (72).
|
|
19
|
+
*/
|
|
20
|
+
size?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Duration of one full clockwise revolution of the leading segment, in ms.
|
|
23
|
+
* Lower = faster. Defaults to 2400.
|
|
24
|
+
*/
|
|
25
|
+
durationMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* "Weightiness" of the fall, in `[0, 0.9]`. 0 = perfectly constant speed;
|
|
28
|
+
* higher values make segments whip faster over the top and ease through the
|
|
29
|
+
* bottom. Kept below 1 so the motion never reverses. Defaults to 0.45.
|
|
30
|
+
*/
|
|
31
|
+
gravity?: number;
|
|
32
|
+
/** Override any subset of the token-driven segment colours. */
|
|
33
|
+
colors?: SpinnerColors;
|
|
34
|
+
/** When false, renders a static resting spinner (also honoured for reduced motion). Defaults to true. */
|
|
35
|
+
animating?: boolean;
|
|
36
|
+
/** Design token modes forwarded to token lookups. */
|
|
37
|
+
modes?: Record<string, any>;
|
|
38
|
+
/** Container style override. */
|
|
39
|
+
style?: StyleProp<ViewStyle>;
|
|
40
|
+
/** Accessibility label announced to assistive tech. Defaults to "Loading". */
|
|
41
|
+
accessibilityLabel?: string;
|
|
42
|
+
};
|
|
43
|
+
declare function Spinner({ size, durationMs, gravity, colors, animating, modes: propModes, style, accessibilityLabel, ...rest }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export default Spinner;
|
|
45
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as AccountCard, type AccountCardProps, type AccountCardState } from './AccountCard/AccountCard';
|
|
2
2
|
export { default as ActionFooter, type ActionFooterProps } from './ActionFooter/ActionFooter';
|
|
3
|
+
export { default as Attached, type AttachedProps, type AttachedPosition } from './Attached/Attached';
|
|
3
4
|
export { default as AppBar } from './AppBar/AppBar';
|
|
4
5
|
export { default as Avatar, type AvatarProps } from './Avatar/Avatar';
|
|
5
6
|
export { default as AvatarGroup } from './AvatarGroup/AvatarGroup';
|
|
@@ -63,6 +64,8 @@ export { default as Numpad, type NumpadProps, type NumpadKeyValue } from './Nump
|
|
|
63
64
|
export { default as Title, type TitleProps } from './Title/Title';
|
|
64
65
|
export { default as Screen, type ScreenProps } from './Screen/Screen';
|
|
65
66
|
export { default as Section } from './Section/Section';
|
|
67
|
+
export { default as Slot, type SlotProps, type SlotLayoutDirection } from './Slot/Slot';
|
|
68
|
+
export { default as Spinner, type SpinnerProps, type SpinnerColors } from './Spinner/Spinner';
|
|
66
69
|
export { default as Stepper, type StepperProps } from './Stepper/Stepper';
|
|
67
70
|
export { Step, type StepProps, type StepStatus } from './Stepper/Step';
|
|
68
71
|
export { StepLabel, type StepLabelProps } from './Stepper/StepLabel';
|
|
@@ -110,6 +113,7 @@ export { default as AmountInput, type AmountInputProps } from './AmountInput/Amo
|
|
|
110
113
|
export { default as PageHero, type PageHeroProps } from './PageHero/PageHero';
|
|
111
114
|
export { default as Popup, type PopupProps, type PopupRef } from './Popup/Popup';
|
|
112
115
|
export { default as PortfolioHero, type PortfolioHeroProps } from './PortfolioHero/PortfolioHero';
|
|
116
|
+
export { default as PlanComparisonCard, type PlanComparisonCardProps, type PlanComparisonColumn, type PlanComparisonRow, type PlanComparisonCellValue } from './PlanComparisonCard/PlanComparisonCard';
|
|
113
117
|
export { default as PoweredByLabel, type PoweredByLabelProps } from './PoweredByLabel/PoweredByLabel';
|
|
114
118
|
export { default as ProductLabel, type ProductLabelProps } from './ProductLabel/ProductLabel';
|
|
115
119
|
export { default as ProductOverview, type ProductOverviewProps, type ProductOverviewStat } from './ProductOverview/ProductOverview';
|
|
@@ -63,10 +63,12 @@ export * from './IconArmed';
|
|
|
63
63
|
export * from './IconArmedoff';
|
|
64
64
|
export * from './IconArmedpartially';
|
|
65
65
|
export * from './IconArrowback';
|
|
66
|
+
export * from './IconArrowdown';
|
|
66
67
|
export * from './IconArrowline';
|
|
67
68
|
export * from './IconArrowlinediagonal';
|
|
68
69
|
export * from './IconArrowlinedot';
|
|
69
70
|
export * from './IconArrownext';
|
|
71
|
+
export * from './IconArrowup';
|
|
70
72
|
export * from './IconArtificialinsemination';
|
|
71
73
|
export * from './IconAssistivegrid';
|
|
72
74
|
export * from './IconAstrology';
|
|
@@ -236,9 +238,13 @@ export * from './IconChemistry';
|
|
|
236
238
|
export * from './IconCherry';
|
|
237
239
|
export * from './IconChestpain';
|
|
238
240
|
export * from './IconChevrondown';
|
|
241
|
+
export * from './IconChevrondowncircle';
|
|
239
242
|
export * from './IconChevronleft';
|
|
243
|
+
export * from './IconChevronleftcircle';
|
|
240
244
|
export * from './IconChevronright';
|
|
245
|
+
export * from './IconChevronrightcircle';
|
|
241
246
|
export * from './IconChevronup';
|
|
247
|
+
export * from './IconChevronupcircle';
|
|
242
248
|
export * from './IconChildrengame';
|
|
243
249
|
export * from './IconCholesterol';
|
|
244
250
|
export * from './IconCleaning';
|
|
@@ -757,6 +763,10 @@ export * from './IconOperatingtable';
|
|
|
757
763
|
export * from './IconOperator';
|
|
758
764
|
export * from './IconOrder';
|
|
759
765
|
export * from './IconOrders';
|
|
766
|
+
export * from './IconOsnavback';
|
|
767
|
+
export * from './IconOsnavcenter';
|
|
768
|
+
export * from './IconOsnavhome';
|
|
769
|
+
export * from './IconOsnavtask';
|
|
760
770
|
export * from './IconOtp';
|
|
761
771
|
export * from './IconOutofstock';
|
|
762
772
|
export * from './IconOutgoing';
|
|
@@ -953,6 +963,8 @@ export * from './IconShutter10s';
|
|
|
953
963
|
export * from './IconShutter3s';
|
|
954
964
|
export * from './IconShutter5s';
|
|
955
965
|
export * from './IconSign';
|
|
966
|
+
export * from './IconSignin';
|
|
967
|
+
export * from './IconSignout';
|
|
956
968
|
export * from './IconSim';
|
|
957
969
|
export * from './IconSim1';
|
|
958
970
|
export * from './IconSim2';
|
|
@@ -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-
|
|
7
|
+
* Generated: 2026-06-01T15:33:15.385Z
|
|
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.
|
|
3
|
+
"version": "0.0.84",
|
|
4
4
|
"description": "React Native Jio Finance Components Library",
|
|
5
5
|
"author": "sunshuaiqi@gmail.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"icons:generate": "node scripts/generate-icon-registry.js",
|
|
41
41
|
"prepare": "bob build",
|
|
42
42
|
"build": "bob build",
|
|
43
|
-
"prepack": "yarn icons:generate && bob build"
|
|
43
|
+
"prepack": "yarn icons:generate && bob build",
|
|
44
|
+
"push:xpaydemo": "bash scripts/push-to-xpaydemo.sh"
|
|
44
45
|
},
|
|
45
46
|
"react-native-builder-bob": {
|
|
46
47
|
"source": "src",
|