jfs-components 0.1.36 → 0.1.48
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 +29 -0
- package/lib/commonjs/components/Accordion/Accordion.js +16 -3
- package/lib/commonjs/components/AppBar/AppBar.js +118 -93
- package/lib/commonjs/components/CompareTable/CompareTable.js +98 -33
- package/lib/commonjs/components/FormField/FormField.js +9 -1
- package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +4 -14
- package/lib/commonjs/components/HelloJioInput/HelloJioInput.js +20 -4
- package/lib/commonjs/components/PageHero/PageHero.js +3 -0
- package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +50 -30
- package/lib/commonjs/components/ValueBackMetric/ValueBackMetric.js +117 -89
- package/lib/commonjs/components/index.js +7 -1
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -42204
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/Accordion/Accordion.js +16 -3
- package/lib/module/components/AppBar/AppBar.js +116 -93
- package/lib/module/components/CompareTable/CompareTable.js +99 -34
- package/lib/module/components/FormField/FormField.js +9 -1
- package/lib/module/components/FullscreenModal/FullscreenModal.js +4 -14
- package/lib/module/components/HelloJioInput/HelloJioInput.js +20 -4
- package/lib/module/components/PageHero/PageHero.js +3 -0
- package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +50 -30
- package/lib/module/components/ValueBackMetric/ValueBackMetric.js +120 -93
- package/lib/module/components/index.js +1 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -42204
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/components/Accordion/Accordion.d.ts +14 -1
- package/lib/typescript/src/components/AppBar/AppBar.d.ts +46 -14
- package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +29 -12
- package/lib/typescript/src/components/HelloJioInput/HelloJioInput.d.ts +6 -4
- package/lib/typescript/src/components/PageHero/PageHero.d.ts +1 -0
- package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts +8 -1
- package/lib/typescript/src/components/ValueBackMetric/ValueBackMetric.d.ts +27 -16
- package/lib/typescript/src/components/index.d.ts +1 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +61 -33
- package/src/components/AppBar/AppBar.tsx +154 -124
- package/src/components/CompareTable/CompareTable.tsx +138 -52
- package/src/components/FormField/FormField.tsx +7 -0
- package/src/components/FullscreenModal/FullscreenModal.tsx +5 -14
- package/src/components/HelloJioInput/HelloJioInput.tsx +31 -12
- package/src/components/PageHero/PageHero.tsx +5 -0
- package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +63 -30
- package/src/components/ValueBackMetric/ValueBackMetric.tsx +178 -104
- package/src/components/index.ts +6 -1
- package/src/design-tokens/Coin Variables-variables-full.json +1 -42204
- package/src/icons/registry.ts +1 -1
|
@@ -39,6 +39,19 @@ export type AccordionProps = {
|
|
|
39
39
|
* lines as it needs even when horizontal space is tight.
|
|
40
40
|
*/
|
|
41
41
|
disableTruncation?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When `false`, the header Pressable is omitted. Pair with a header-only
|
|
44
|
+
* Accordion (`showContent={false}`) when the host lifts the title into a
|
|
45
|
+
* sticky slot (e.g. `ScrollView` `stickyHeaderIndices`).
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showHeader?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* When `false`, the expandable content slot is omitted. Use to render a
|
|
51
|
+
* header-only Accordion for sticky layouts.
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
showContent?: boolean;
|
|
42
55
|
} & React.ComponentProps<typeof View>;
|
|
43
56
|
/**
|
|
44
57
|
* Accordion component that mirrors the Figma "Accordion" component.
|
|
@@ -54,6 +67,6 @@ export type AccordionProps = {
|
|
|
54
67
|
*
|
|
55
68
|
* @component
|
|
56
69
|
*/
|
|
57
|
-
declare function Accordion({ title, contained, defaultExpanded, expanded: controlledExpanded, onExpandedChange, disabled, children, modes, style, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, disableTruncation, ...rest }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
declare function Accordion({ title, contained, defaultExpanded, expanded: controlledExpanded, onExpandedChange, disabled, children, modes, style, accessibilityLabel, accessibilityHint, accessibilityState, webAccessibilityProps, disableTruncation, showHeader, showContent, ...rest }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
58
71
|
export default Accordion;
|
|
59
72
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -2,29 +2,38 @@ import React from 'react';
|
|
|
2
2
|
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { Modes } from '../../design-tokens';
|
|
4
4
|
type AppBarType = 'MainPage' | 'SubPage';
|
|
5
|
+
export type JioDotProps = {
|
|
6
|
+
/** Render size in px. Defaults to token `appBar/mainPage/jiodot/size` (32). */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** Modes used to resolve `appBar/mainPage/jiodot/size` when `size` is omitted. */
|
|
9
|
+
modes?: Modes;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Figma "jiodot" mark (node 1117:1908). Opt-in via `leadingSlot` — MainPage
|
|
13
|
+
* does NOT render this by default so existing consumers stay empty-leading.
|
|
14
|
+
*/
|
|
15
|
+
export declare function JioDot({ size, modes }: JioDotProps): import("react/jsx-runtime").JSX.Element;
|
|
5
16
|
export type AppBarProps = {
|
|
6
17
|
/**
|
|
7
18
|
* Type of the App Bar.
|
|
8
|
-
* - `MainPage`: Taller
|
|
9
|
-
* - `SubPage`: Shorter
|
|
19
|
+
* - `MainPage`: Taller bar; no default leading (pass `JioDot` or your logo via `leadingSlot`).
|
|
20
|
+
* - `SubPage`: Shorter bar with default back arrow and centered middle slot.
|
|
10
21
|
* @default "MainPage"
|
|
11
22
|
*/
|
|
12
23
|
type?: AppBarType;
|
|
13
24
|
/**
|
|
14
25
|
* Slot for the leading element.
|
|
15
26
|
* Defaults:
|
|
16
|
-
* - MainPage:
|
|
17
|
-
* - SubPage: Back
|
|
27
|
+
* - MainPage: none (opt in with `<JioDot />` or any custom node)
|
|
28
|
+
* - SubPage: Back `NavArrow`
|
|
18
29
|
*/
|
|
19
30
|
leadingSlot?: React.ReactNode;
|
|
20
31
|
/**
|
|
21
|
-
* Slot for the middle content.
|
|
22
|
-
* Often used for "Page Title" in SubPage.
|
|
32
|
+
* Slot for the middle content. Often used for a page title on SubPage.
|
|
23
33
|
*
|
|
24
|
-
* On `SubPage` this is rendered as an absolutely-centered box (
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* within {@link middleSlotWidth}.
|
|
34
|
+
* On `SubPage` this is rendered as an absolutely-centered box (Figma
|
|
35
|
+
* "slot wrap"): it stays centered regardless of leading/actions width, and
|
|
36
|
+
* content fills/shrinks within {@link middleSlotWidth}.
|
|
28
37
|
*/
|
|
29
38
|
middleSlot?: React.ReactNode;
|
|
30
39
|
/**
|
|
@@ -34,7 +43,7 @@ export type AppBarProps = {
|
|
|
34
43
|
*/
|
|
35
44
|
middleSlotWidth?: number;
|
|
36
45
|
/**
|
|
37
|
-
* Slot for the actions on the right.
|
|
46
|
+
* Slot for the actions on the right (IconButtons, Avatar, etc.).
|
|
38
47
|
*/
|
|
39
48
|
actionsSlot?: React.ReactNode;
|
|
40
49
|
/**
|
|
@@ -42,7 +51,7 @@ export type AppBarProps = {
|
|
|
42
51
|
*/
|
|
43
52
|
modes?: Modes;
|
|
44
53
|
/**
|
|
45
|
-
* Callback for the default leading
|
|
54
|
+
* Callback for the default SubPage leading back arrow.
|
|
46
55
|
*/
|
|
47
56
|
onLeadingPress?: () => void;
|
|
48
57
|
/**
|
|
@@ -52,6 +61,29 @@ export type AppBarProps = {
|
|
|
52
61
|
accessibilityLabel?: string;
|
|
53
62
|
accessibilityHint?: string;
|
|
54
63
|
} & Omit<React.ComponentProps<typeof View>, 'style' | 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint'>;
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
/**
|
|
65
|
+
* AppBar — top navigation bar for MainPage and SubPage layouts
|
|
66
|
+
* (Figma node 1070:18571).
|
|
67
|
+
*
|
|
68
|
+
* Visual values resolve from design tokens via `getVariableByName`. Slots
|
|
69
|
+
* cascade `modes` to children through `cloneChildrenWithModes`.
|
|
70
|
+
*
|
|
71
|
+
* @component
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <AppBar
|
|
75
|
+
* type="MainPage"
|
|
76
|
+
* leadingSlot={<JioDot />}
|
|
77
|
+
* actionsSlot={
|
|
78
|
+
* <>
|
|
79
|
+
* <IconButton iconName="ic_add" />
|
|
80
|
+
* <IconButton iconName="ic_add" />
|
|
81
|
+
* <Avatar />
|
|
82
|
+
* </>
|
|
83
|
+
* }
|
|
84
|
+
* />
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare function AppBar({ type, leadingSlot, middleSlot, middleSlotWidth, actionsSlot, modes: propModes, onLeadingPress, style, accessibilityLabel, accessibilityHint, ...rest }: AppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
export default AppBar;
|
|
57
89
|
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -84,25 +84,42 @@ export type CompareTableProps = {
|
|
|
84
84
|
* horizontal `ScrollView`s whose scroll events are **chained** — moving
|
|
85
85
|
* one moves every other in lockstep (the cards always stay aligned with
|
|
86
86
|
* the cells beneath them).
|
|
87
|
-
* -
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* vertically with the table.
|
|
87
|
+
* - Selection cards stick on the vertical axis by default (`stickyCards`).
|
|
88
|
+
* Accordion titles also stick by default (`stickyAccordionTitles`) and
|
|
89
|
+
* replace each other under the pinned cards as you scroll. Gray
|
|
90
|
+
* table-header rows can stick via `stickyHeaders`. Sticky header labels
|
|
91
|
+
* stay put horizontally when `stickyHeaderLabel` is on. Requires the
|
|
92
|
+
* host to give `CompareTable` a bounded height.
|
|
94
93
|
*
|
|
95
94
|
* Omit to keep the original flex layout (columns share the available width,
|
|
96
95
|
* no scrolling). @default undefined
|
|
97
96
|
*/
|
|
98
97
|
columnWidth?: number;
|
|
99
98
|
/**
|
|
100
|
-
* When `true
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* fixed-width scroll mode
|
|
99
|
+
* When `true`, the selection-cards row is pinned above the vertical scroll
|
|
100
|
+
* surface (not inside it), so cards never scroll away. Sticky accordion
|
|
101
|
+
* titles then stick under the pinned cards, replacing each other as each
|
|
102
|
+
* section reaches the top. Only applies in fixed-width scroll mode
|
|
103
|
+
* (`columnWidth` is set).
|
|
104
104
|
* @default true
|
|
105
105
|
*/
|
|
106
|
+
stickyCards?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* When `true`, each section's accordion title sticks to the top of the
|
|
109
|
+
* viewport when scrolling vertically (under sticky cards when
|
|
110
|
+
* `stickyCards` is also on), with titles replacing each other as each
|
|
111
|
+
* reaches the top. Only applies in fixed-width scroll mode
|
|
112
|
+
* (`columnWidth` is set).
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
stickyAccordionTitles?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* When `true`, each section's header row (the gray header label) sticks to
|
|
118
|
+
* the top of the viewport when scrolling vertically, with multiple sticky
|
|
119
|
+
* headers stacking up as each reaches the top. Only applies in fixed-width
|
|
120
|
+
* scroll mode (`columnWidth` is set).
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
106
123
|
stickyHeaders?: boolean;
|
|
107
124
|
/**
|
|
108
125
|
* When `true` (default), the section header label stays fixed on the left
|
|
@@ -124,6 +141,6 @@ export type CompareTableProps = {
|
|
|
124
141
|
*
|
|
125
142
|
* @component
|
|
126
143
|
*/
|
|
127
|
-
declare function CompareTable({ columns, sections, onAddColumn, addColumnLabel, maxColumns, modes, style, disableTruncation, columnWidth, stickyHeaders, stickyHeaderLabel, }: CompareTableProps): import("react/jsx-runtime").JSX.Element;
|
|
144
|
+
declare function CompareTable({ columns, sections, onAddColumn, addColumnLabel, maxColumns, modes, style, disableTruncation, columnWidth, stickyCards, stickyAccordionTitles, stickyHeaders, stickyHeaderLabel, }: CompareTableProps): import("react/jsx-runtime").JSX.Element;
|
|
128
145
|
export default CompareTable;
|
|
129
146
|
//# sourceMappingURL=CompareTable.d.ts.map
|
|
@@ -22,9 +22,10 @@ export type HelloJioInputProps = {
|
|
|
22
22
|
leadingIconName?: string;
|
|
23
23
|
/**
|
|
24
24
|
* Slot replacing the default leading icon (Figma Slot "start"). Receives
|
|
25
|
-
* `modes` recursively.
|
|
25
|
+
* `modes` recursively. Pass `null` to hide the leading icon entirely
|
|
26
|
+
* (the design's `startSlot={false}`), mirroring `trailing`.
|
|
26
27
|
*/
|
|
27
|
-
leading?: React.ReactNode;
|
|
28
|
+
leading?: React.ReactNode | null;
|
|
28
29
|
/**
|
|
29
30
|
* Slot replacing the default send `IconButton` (Figma Slot "end").
|
|
30
31
|
* Pass `null` to hide the trailing control entirely.
|
|
@@ -75,9 +76,10 @@ declare const _default: React.NamedExoticComponent<{
|
|
|
75
76
|
leadingIconName?: string;
|
|
76
77
|
/**
|
|
77
78
|
* Slot replacing the default leading icon (Figma Slot "start"). Receives
|
|
78
|
-
* `modes` recursively.
|
|
79
|
+
* `modes` recursively. Pass `null` to hide the leading icon entirely
|
|
80
|
+
* (the design's `startSlot={false}`), mirroring `trailing`.
|
|
79
81
|
*/
|
|
80
|
-
leading?: React.ReactNode;
|
|
82
|
+
leading?: React.ReactNode | null;
|
|
81
83
|
/**
|
|
82
84
|
* Slot replacing the default send `IconButton` (Figma Slot "end").
|
|
83
85
|
* Pass `null` to hide the trailing control entirely.
|
|
@@ -76,6 +76,7 @@ export type PageHeroProps = {
|
|
|
76
76
|
* eyebrow="Upgrade to JioFinance+"
|
|
77
77
|
* headline="Resume earning cashback, extra points, and 1% gold"
|
|
78
78
|
* supportingText="₹999/year · ₹0 until 2027"
|
|
79
|
+
* body="₹999/year · ₹0 until 2027"
|
|
79
80
|
* buttonLabel="Renew for free"
|
|
80
81
|
* onButtonPress={() => navigate('Upgrade')}
|
|
81
82
|
* modes={{ 'Page type': 'JioPlus' }}
|
package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ export interface ProductMerchandisingCardProps {
|
|
|
17
17
|
* `undefined` and no `badge` override is provided.
|
|
18
18
|
*/
|
|
19
19
|
badgeLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional leading node (icon/image) rendered before the header badge
|
|
22
|
+
* label, inside the badge surface. Maps to `Badge`'s `leading` slot — the
|
|
23
|
+
* same pattern as `specialBadgeIcon` for the footer badge. Ignored when a
|
|
24
|
+
* full `badge` override is supplied.
|
|
25
|
+
*/
|
|
26
|
+
badgeIcon?: React.ReactNode;
|
|
20
27
|
/**
|
|
21
28
|
* Full override for the header badge. Takes precedence over `badgeLabel`.
|
|
22
29
|
*/
|
|
@@ -82,6 +89,6 @@ export interface ProductMerchandisingCardProps {
|
|
|
82
89
|
* The blur strength is driven by the Figma `blur/minimal` token, mapped to the
|
|
83
90
|
* `GlassFill` 0–100 intensity scale the same way `MediaCard` does.
|
|
84
91
|
*/
|
|
85
|
-
declare function ProductMerchandisingCard({ imageSource, title, subtitle, badgeLabel, badge, showAvatar, avatarSource, avatarMonogram, avatar, specialBadgeLabel, specialBadgeIcon, specialBadge, ctaLabel, onCtaPress, cta, onPress, height, modes, style, accessibilityLabel, disableTruncation, }: ProductMerchandisingCardProps): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
declare function ProductMerchandisingCard({ imageSource, title, subtitle, badgeLabel, badgeIcon, badge, showAvatar, avatarSource, avatarMonogram, avatar, specialBadgeLabel, specialBadgeIcon, specialBadge, ctaLabel, onCtaPress, cta, onPress, height, modes, style, accessibilityLabel, disableTruncation, }: ProductMerchandisingCardProps): import("react/jsx-runtime").JSX.Element;
|
|
86
93
|
export default ProductMerchandisingCard;
|
|
87
94
|
//# sourceMappingURL=ProductMerchandisingCard.d.ts.map
|
|
@@ -23,19 +23,31 @@ export type ValueBackMetricProps = {
|
|
|
23
23
|
value?: string | React.ReactNode;
|
|
24
24
|
/** Muted caption below the value (12px, `#777`). Hidden when omitted. */
|
|
25
25
|
caption?: string;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Bottom CTA label rendered as the shared {@link Text} (purple 12px via
|
|
28
|
+
* seeded `Text Appearance: Secondary` + `Text Sizes: Small`). Hidden when
|
|
29
|
+
* omitted. Ignored when the {@link link} slot is provided.
|
|
30
|
+
*/
|
|
27
31
|
linkLabel?: string;
|
|
28
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Real slot for the bottom CTA. Highest precedence — when provided, these
|
|
34
|
+
* children render instead of the declarative `linkLabel` Text. Seeded
|
|
35
|
+
* `Text Appearance: Secondary` + `Text Sizes: Small` cascade into the slot
|
|
36
|
+
* (so a bare `<Text text="Earn" />` matches the design); child-level modes
|
|
37
|
+
* still win.
|
|
38
|
+
*/
|
|
39
|
+
link?: React.ReactNode;
|
|
40
|
+
/** Fired when the declarative CTA (`linkLabel`) is pressed. */
|
|
29
41
|
onLinkPress?: (event: GestureResponderEvent) => void;
|
|
30
42
|
/**
|
|
31
43
|
* Press handler for the whole card. When set, the card becomes pressable
|
|
32
44
|
* (rendered through a `Pressable` with `accessibilityRole="button"`).
|
|
33
|
-
* Independent of {@link onLinkPress} — the bottom
|
|
45
|
+
* Independent of {@link onLinkPress} — the bottom CTA keeps its own handler.
|
|
34
46
|
*/
|
|
35
47
|
onPress?: (event: GestureResponderEvent) => void;
|
|
36
48
|
/** Disable interaction when `onPress` is set. */
|
|
37
49
|
disabled?: boolean;
|
|
38
|
-
/** Design-token modes for theming. */
|
|
50
|
+
/** Design-token modes for theming. Cascaded to slot children. */
|
|
39
51
|
modes?: Modes;
|
|
40
52
|
/** Override the container styles. */
|
|
41
53
|
style?: StyleProp<ViewStyle>;
|
|
@@ -55,18 +67,17 @@ export type ValueBackMetricProps = {
|
|
|
55
67
|
* ValueBackMetric — a compact, left-aligned "value back" card.
|
|
56
68
|
*
|
|
57
69
|
* Stacks a branded header row (icon + `title`, e.g. "JioPoints"), a prominent
|
|
58
|
-
* `value`, a muted `caption`, and an optional bottom `linkLabel`
|
|
59
|
-
* `value`, `caption` and
|
|
60
|
-
* (icon + title) always shows.
|
|
70
|
+
* `value`, a muted `caption`, and an optional bottom CTA (`linkLabel` / `link`
|
|
71
|
+
* slot, e.g. "Earn"). `value`, `caption` and the CTA each render only when
|
|
72
|
+
* provided; the header (icon + title) always shows.
|
|
61
73
|
*
|
|
62
|
-
* Colours
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* matching the design.
|
|
74
|
+
* Colours resolve from the `metricdata/*` tokens; the header glyph from the
|
|
75
|
+
* `icon/*` tokens (default 18px gold); the CTA from the shared {@link Text}
|
|
76
|
+
* with `Text Appearance: Secondary` + `Text Sizes: Small` seeded so it renders
|
|
77
|
+
* purple at 12px like the design (caller `modes` win). Layout/typography
|
|
78
|
+
* follow the Figma `valueBackMetric/*` variables — not yet in the committed
|
|
79
|
+
* token snapshot, so they resolve through `getVariableByName` with Figma-node
|
|
80
|
+
* fallbacks.
|
|
70
81
|
*
|
|
71
82
|
* @example
|
|
72
83
|
* ```tsx
|
|
@@ -80,7 +91,7 @@ export type ValueBackMetricProps = {
|
|
|
80
91
|
* />
|
|
81
92
|
* ```
|
|
82
93
|
*/
|
|
83
|
-
declare function ValueBackMetric({ icon, title, value, caption, linkLabel, onLinkPress, onPress, disabled, modes, style, titleStyle, valueStyle, captionStyle, accessibilityLabel, }: ValueBackMetricProps): import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
declare function ValueBackMetric({ icon, title, value, caption, linkLabel, link, onLinkPress, onPress, disabled, modes, style, titleStyle, valueStyle, captionStyle, accessibilityLabel, }: ValueBackMetricProps): import("react/jsx-runtime").JSX.Element;
|
|
84
95
|
declare const _default: React.MemoExoticComponent<typeof ValueBackMetric>;
|
|
85
96
|
export default _default;
|
|
86
97
|
//# sourceMappingURL=ValueBackMetric.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
export { default as Attached, type AttachedProps, type AttachedPosition } from './Attached/Attached';
|
|
4
|
-
export { default as AppBar } from './AppBar/AppBar';
|
|
4
|
+
export { default as AppBar, JioDot, type AppBarProps, type JioDotProps, } from './AppBar/AppBar';
|
|
5
5
|
export { default as Avatar, type AvatarProps } from './Avatar/Avatar';
|
|
6
6
|
export { default as AvatarGroup } from './AvatarGroup/AvatarGroup';
|
|
7
7
|
export { default as Badge, type BadgeProps, type BadgeType } from './Badge/Badge';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Auto-generated from SVG files in src/icons/
|
|
5
5
|
* DO NOT EDIT MANUALLY - Run "npm run icons:generate" to regenerate
|
|
6
6
|
*
|
|
7
|
-
* Generated: 2026-07-
|
|
7
|
+
* Generated: 2026-07-22T21:03:43.084Z
|
|
8
8
|
*/
|
|
9
9
|
export declare const iconRegistry: Record<string, {
|
|
10
10
|
path: string;
|
package/package.json
CHANGED
|
@@ -93,6 +93,19 @@ export type AccordionProps = {
|
|
|
93
93
|
* lines as it needs even when horizontal space is tight.
|
|
94
94
|
*/
|
|
95
95
|
disableTruncation?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* When `false`, the header Pressable is omitted. Pair with a header-only
|
|
98
|
+
* Accordion (`showContent={false}`) when the host lifts the title into a
|
|
99
|
+
* sticky slot (e.g. `ScrollView` `stickyHeaderIndices`).
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
showHeader?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* When `false`, the expandable content slot is omitted. Use to render a
|
|
105
|
+
* header-only Accordion for sticky layouts.
|
|
106
|
+
* @default true
|
|
107
|
+
*/
|
|
108
|
+
showContent?: boolean;
|
|
96
109
|
} & React.ComponentProps<typeof View>;
|
|
97
110
|
|
|
98
111
|
/**
|
|
@@ -124,6 +137,8 @@ function Accordion({
|
|
|
124
137
|
accessibilityState,
|
|
125
138
|
webAccessibilityProps,
|
|
126
139
|
disableTruncation,
|
|
140
|
+
showHeader = true,
|
|
141
|
+
showContent = true,
|
|
127
142
|
...rest
|
|
128
143
|
}: AccordionProps) {
|
|
129
144
|
const [internalExpanded, setInternalExpanded] = useState(defaultExpanded)
|
|
@@ -192,8 +207,10 @@ function Accordion({
|
|
|
192
207
|
const borderColor =
|
|
193
208
|
(getVariableByName('accordion/border/color', resolvedModes) as string | null) ?? '#e6e6e6'
|
|
194
209
|
|
|
210
|
+
// Header-only sticky pieces drop the divider while expanded so the paired
|
|
211
|
+
// content Accordion owns the section border.
|
|
195
212
|
const containerStyle: ViewStyle = {
|
|
196
|
-
borderBottomWidth: 1,
|
|
213
|
+
borderBottomWidth: !showContent && isExpanded ? 0 : 1,
|
|
197
214
|
borderBottomColor: borderColor,
|
|
198
215
|
}
|
|
199
216
|
|
|
@@ -239,40 +256,51 @@ function Accordion({
|
|
|
239
256
|
? cloneChildrenWithModes(React.Children.toArray(children), resolvedModes)
|
|
240
257
|
: null
|
|
241
258
|
|
|
259
|
+
// Content-only + collapsed: nothing to render (header lives in the sticky peer).
|
|
260
|
+
if (!showHeader && !isExpanded) {
|
|
261
|
+
return null
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (!showHeader && !showContent) {
|
|
265
|
+
return null
|
|
266
|
+
}
|
|
267
|
+
|
|
242
268
|
return (
|
|
243
269
|
<View style={[containerStyle, style]} {...rest}>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
270
|
+
{showHeader && (
|
|
271
|
+
<Pressable
|
|
272
|
+
accessibilityRole="button"
|
|
273
|
+
accessibilityLabel={undefined}
|
|
274
|
+
accessibilityHint={accessibilityHint || (isExpanded ? 'Collapse accordion' : 'Expand accordion')}
|
|
275
|
+
accessibilityState={{
|
|
276
|
+
expanded: isExpanded,
|
|
277
|
+
disabled,
|
|
278
|
+
...accessibilityState,
|
|
279
|
+
}}
|
|
280
|
+
onPress={handleToggle}
|
|
281
|
+
disabled={disabled}
|
|
282
|
+
onHoverIn={() => setIsHovered(true)}
|
|
283
|
+
onHoverOut={() => setIsHovered(false)}
|
|
284
|
+
style={({ pressed }) => [
|
|
285
|
+
headerStyle,
|
|
286
|
+
pressed && !disabled ? { opacity: 0.9 } : null,
|
|
287
|
+
]}
|
|
288
|
+
{...webProps}
|
|
289
|
+
>
|
|
290
|
+
<Text style={titleStyle} {...resolveTruncation(disableTruncation, 1)}>
|
|
291
|
+
{title}
|
|
292
|
+
</Text>
|
|
293
|
+
<Icon
|
|
294
|
+
name={isExpanded ? 'ic_minus' : 'ic_add'}
|
|
295
|
+
size={iconSize}
|
|
296
|
+
color={iconColor}
|
|
297
|
+
accessibilityElementsHidden={true}
|
|
298
|
+
importantForAccessibility="no"
|
|
299
|
+
/>
|
|
300
|
+
</Pressable>
|
|
301
|
+
)}
|
|
302
|
+
|
|
303
|
+
{showContent && isExpanded && processedChildren && (
|
|
276
304
|
<View style={contentStyle}>
|
|
277
305
|
{processedChildren}
|
|
278
306
|
</View>
|