jfs-components 0.1.8 → 0.1.12
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 +16 -0
- package/lib/commonjs/components/Accordion/Accordion.js +2 -1
- package/lib/commonjs/components/AccordionCheckbox/AccordionCheckbox.js +4 -3
- package/lib/commonjs/components/AccountCard/AccountCard.js +4 -3
- package/lib/commonjs/components/AllocationComparisonChart/AllocationComparisonChart.js +9 -6
- package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +11 -7
- package/lib/commonjs/components/Badge/Badge.js +47 -8
- package/lib/commonjs/components/BrandChip/BrandChip.js +3 -3
- package/lib/commonjs/components/Button/Button.js +2 -1
- package/lib/commonjs/components/CardAdvisory/CardAdvisory.js +2 -1
- package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +3 -2
- package/lib/commonjs/components/CardCTA/CardCTA.js +197 -27
- package/lib/commonjs/components/CardInsight/CardInsight.js +5 -1
- package/lib/commonjs/components/CircularProgressBar/CircularProgressBar.js +7 -3
- package/lib/commonjs/components/CircularProgressBarDoted/CircularProgressBarDoted.js +3 -2
- package/lib/commonjs/components/CircularRating/CircularRating.js +2 -1
- package/lib/commonjs/components/ClusterBubble/ClusterBubble.js +3 -2
- package/lib/commonjs/components/CompareTable/CompareTable.js +72 -43
- package/lib/commonjs/components/CoverageBarComparison/CoverageBarComparison.js +3 -2
- package/lib/commonjs/components/DonutChart/DonutChart.js +4 -3
- package/lib/commonjs/components/Dropdown/Dropdown.js +3 -2
- package/lib/commonjs/components/DropdownInput/DropdownInput.js +3 -2
- package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +2 -1
- package/lib/commonjs/components/FormField/FormField.js +42 -2
- package/lib/commonjs/components/Gauge/Gauge.js +1 -1
- package/lib/commonjs/components/HoldingsCard/HoldingsCard.js +3 -2
- package/lib/commonjs/components/InstitutionBadge/InstitutionBadge.js +2 -1
- package/lib/commonjs/components/ListGroup/ListGroup.js +2 -1
- package/lib/commonjs/components/ListItem/ListItem.js +3 -2
- package/lib/commonjs/components/MediaCard/MediaCard.js +4 -2
- package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +3 -2
- package/lib/commonjs/components/MonthlyStatusGrid/MonthlyStatusGrid.js +6 -3
- package/lib/commonjs/components/PoweredByLabel/PoweredByLabel.js +3 -2
- package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +107 -33
- package/lib/commonjs/components/ProductOverview/ProductOverview.js +4 -3
- package/lib/commonjs/components/ProgressBadge/ProgressBadge.js +2 -2
- package/lib/commonjs/components/ProjectionMarker/ProjectionMarker.js +3 -2
- package/lib/commonjs/components/Section/Section.js +3 -2
- package/lib/commonjs/components/Slider/Slider.js +3 -2
- package/lib/commonjs/components/Stack/Stack.js +86 -0
- package/lib/commonjs/components/SuggestiveSearch/SuggestiveSearch.js +10 -1
- package/lib/commonjs/components/SummaryTile/SummaryTile.js +3 -2
- package/lib/commonjs/components/Table/Table.js +324 -0
- package/lib/commonjs/components/Text/Text.js +2 -1
- package/lib/commonjs/components/TextInput/TextInput.js +9 -1
- package/lib/commonjs/components/TextSegment/TextSegment.js +2 -1
- package/lib/commonjs/components/ThreadHero/ThreadHero.js +4 -5
- package/lib/commonjs/components/Title/Title.js +2 -1
- package/lib/commonjs/components/Toast/Toast.js +3 -2
- package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +2 -1
- package/lib/commonjs/components/TransactionStatus/TransactionStatus.js +3 -2
- package/lib/commonjs/components/UpiHandle/UpiHandle.js +2 -2
- package/lib/commonjs/components/index.js +44 -0
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/design-tokens/figma-modes.generated.js +1 -0
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/commonjs/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.js +11 -3
- package/lib/commonjs/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.web.js +8 -4
- package/lib/commonjs/utils/react-utils.js +56 -0
- package/lib/commonjs/utils/web-platform-utils.js +59 -0
- package/lib/module/components/Accordion/Accordion.js +3 -2
- package/lib/module/components/AccordionCheckbox/AccordionCheckbox.js +5 -4
- package/lib/module/components/AccountCard/AccountCard.js +5 -4
- package/lib/module/components/AllocationComparisonChart/AllocationComparisonChart.js +10 -7
- package/lib/module/components/AreaLineChart/AreaLineChart.js +12 -8
- package/lib/module/components/Badge/Badge.js +49 -10
- package/lib/module/components/BrandChip/BrandChip.js +4 -4
- package/lib/module/components/Button/Button.js +3 -2
- package/lib/module/components/CardAdvisory/CardAdvisory.js +3 -2
- package/lib/module/components/CardBankAccount/CardBankAccount.js +4 -3
- package/lib/module/components/CardCTA/CardCTA.js +198 -28
- package/lib/module/components/CardInsight/CardInsight.js +5 -1
- package/lib/module/components/CircularProgressBar/CircularProgressBar.js +8 -4
- package/lib/module/components/CircularProgressBarDoted/CircularProgressBarDoted.js +4 -3
- package/lib/module/components/CircularRating/CircularRating.js +3 -2
- package/lib/module/components/ClusterBubble/ClusterBubble.js +4 -3
- package/lib/module/components/CompareTable/CompareTable.js +73 -44
- package/lib/module/components/CoverageBarComparison/CoverageBarComparison.js +4 -3
- package/lib/module/components/DonutChart/DonutChart.js +5 -4
- package/lib/module/components/Dropdown/Dropdown.js +4 -3
- package/lib/module/components/DropdownInput/DropdownInput.js +4 -3
- package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +2 -1
- package/lib/module/components/FormField/FormField.js +45 -5
- package/lib/module/components/Gauge/Gauge.js +1 -1
- package/lib/module/components/HoldingsCard/HoldingsCard.js +4 -3
- package/lib/module/components/InstitutionBadge/InstitutionBadge.js +3 -2
- package/lib/module/components/ListGroup/ListGroup.js +3 -2
- package/lib/module/components/ListItem/ListItem.js +4 -3
- package/lib/module/components/MediaCard/MediaCard.js +4 -2
- package/lib/module/components/MetricLegendItem/MetricLegendItem.js +4 -3
- package/lib/module/components/MonthlyStatusGrid/MonthlyStatusGrid.js +7 -4
- package/lib/module/components/PoweredByLabel/PoweredByLabel.js +4 -3
- package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +109 -35
- package/lib/module/components/ProductOverview/ProductOverview.js +5 -4
- package/lib/module/components/ProgressBadge/ProgressBadge.js +3 -3
- package/lib/module/components/ProjectionMarker/ProjectionMarker.js +4 -3
- package/lib/module/components/Section/Section.js +4 -3
- package/lib/module/components/Slider/Slider.js +4 -3
- package/lib/module/components/Stack/Stack.js +81 -0
- package/lib/module/components/SuggestiveSearch/SuggestiveSearch.js +10 -1
- package/lib/module/components/SummaryTile/SummaryTile.js +4 -3
- package/lib/module/components/Table/Table.js +315 -0
- package/lib/module/components/Text/Text.js +3 -2
- package/lib/module/components/TextInput/TextInput.js +9 -1
- package/lib/module/components/TextSegment/TextSegment.js +3 -2
- package/lib/module/components/ThreadHero/ThreadHero.js +5 -6
- package/lib/module/components/Title/Title.js +3 -2
- package/lib/module/components/Toast/Toast.js +4 -3
- package/lib/module/components/TransactionBubble/TransactionBubble.js +3 -2
- package/lib/module/components/TransactionStatus/TransactionStatus.js +4 -3
- package/lib/module/components/UpiHandle/UpiHandle.js +3 -3
- package/lib/module/components/index.js +2 -0
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/design-tokens/figma-modes.generated.js +1 -0
- package/lib/module/icons/registry.js +1 -1
- package/lib/module/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.js +11 -3
- package/lib/module/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.web.js +8 -4
- package/lib/module/utils/react-utils.js +54 -0
- package/lib/module/utils/web-platform-utils.js +58 -0
- package/lib/typescript/src/components/Accordion/Accordion.d.ts +7 -1
- package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +7 -1
- package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +7 -1
- package/lib/typescript/src/components/AllocationComparisonChart/AllocationComparisonChart.d.ts +7 -1
- package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +8 -1
- package/lib/typescript/src/components/Badge/Badge.d.ts +32 -2
- package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +7 -1
- package/lib/typescript/src/components/Button/Button.d.ts +7 -1
- package/lib/typescript/src/components/CardAdvisory/CardAdvisory.d.ts +7 -1
- package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +7 -1
- package/lib/typescript/src/components/CardCTA/CardCTA.d.ts +27 -5
- package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +7 -1
- package/lib/typescript/src/components/CircularProgressBarDoted/CircularProgressBarDoted.d.ts +7 -1
- package/lib/typescript/src/components/CircularRating/CircularRating.d.ts +7 -1
- package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +7 -1
- package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +7 -1
- package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +7 -1
- package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +7 -1
- package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +7 -1
- package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +6 -0
- package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +7 -1
- package/lib/typescript/src/components/HoldingsCard/HoldingsCard.d.ts +7 -1
- package/lib/typescript/src/components/InstitutionBadge/InstitutionBadge.d.ts +7 -1
- package/lib/typescript/src/components/ListGroup/ListGroup.d.ts +7 -1
- package/lib/typescript/src/components/ListItem/ListItem.d.ts +7 -1
- package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +7 -1
- package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +14 -2
- package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +7 -1
- package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts +7 -1
- package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +7 -1
- package/lib/typescript/src/components/ProgressBadge/ProgressBadge.d.ts +7 -1
- package/lib/typescript/src/components/ProjectionMarker/ProjectionMarker.d.ts +7 -1
- package/lib/typescript/src/components/Section/Section.d.ts +7 -1
- package/lib/typescript/src/components/Slider/Slider.d.ts +6 -0
- package/lib/typescript/src/components/Stack/Stack.d.ts +81 -0
- package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +7 -1
- package/lib/typescript/src/components/Table/Table.d.ts +139 -0
- package/lib/typescript/src/components/Text/Text.d.ts +7 -1
- package/lib/typescript/src/components/TextSegment/TextSegment.d.ts +7 -1
- package/lib/typescript/src/components/ThreadHero/ThreadHero.d.ts +7 -1
- package/lib/typescript/src/components/Title/Title.d.ts +7 -1
- package/lib/typescript/src/components/Toast/Toast.d.ts +7 -1
- package/lib/typescript/src/components/TransactionBubble/TransactionBubble.d.ts +7 -1
- package/lib/typescript/src/components/TransactionStatus/TransactionStatus.d.ts +7 -1
- package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +7 -1
- package/lib/typescript/src/components/index.d.ts +4 -2
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/lib/typescript/src/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.d.ts +31 -3
- package/lib/typescript/src/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.web.d.ts +18 -2
- package/lib/typescript/src/utils/react-utils.d.ts +37 -0
- package/lib/typescript/src/utils/web-platform-utils.d.ts +36 -0
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +9 -2
- package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +10 -3
- package/src/components/AccountCard/AccountCard.tsx +10 -3
- package/src/components/AllocationComparisonChart/AllocationComparisonChart.tsx +14 -4
- package/src/components/AreaLineChart/AreaLineChart.tsx +15 -5
- package/src/components/Badge/Badge.tsx +78 -8
- package/src/components/BrandChip/BrandChip.tsx +9 -3
- package/src/components/Button/Button.tsx +9 -2
- package/src/components/CardAdvisory/CardAdvisory.tsx +9 -2
- package/src/components/CardBankAccount/CardBankAccount.tsx +9 -2
- package/src/components/CardCTA/CardCTA.tsx +214 -41
- package/src/components/CardInsight/CardInsight.tsx +7 -1
- package/src/components/CircularProgressBar/CircularProgressBar.tsx +14 -4
- package/src/components/CircularProgressBarDoted/CircularProgressBarDoted.tsx +10 -3
- package/src/components/CircularRating/CircularRating.tsx +9 -2
- package/src/components/ClusterBubble/ClusterBubble.tsx +9 -2
- package/src/components/CompareTable/CompareTable.tsx +98 -50
- package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +9 -2
- package/src/components/DonutChart/DonutChart.tsx +10 -3
- package/src/components/Dropdown/Dropdown.tsx +9 -2
- package/src/components/DropdownInput/DropdownInput.tsx +9 -2
- package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +8 -1
- package/src/components/FormField/FormField.tsx +49 -4
- package/src/components/Gauge/Gauge.tsx +1 -1
- package/src/components/HoldingsCard/HoldingsCard.tsx +9 -2
- package/src/components/InstitutionBadge/InstitutionBadge.tsx +9 -2
- package/src/components/ListGroup/ListGroup.tsx +9 -2
- package/src/components/ListItem/ListItem.tsx +10 -3
- package/src/components/MediaCard/MediaCard.tsx +2 -2
- package/src/components/MetricLegendItem/MetricLegendItem.tsx +9 -2
- package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +17 -2
- package/src/components/PoweredByLabel/PoweredByLabel.tsx +9 -2
- package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +104 -37
- package/src/components/ProductOverview/ProductOverview.tsx +10 -3
- package/src/components/ProgressBadge/ProgressBadge.tsx +9 -3
- package/src/components/ProjectionMarker/ProjectionMarker.tsx +9 -2
- package/src/components/Section/Section.tsx +10 -3
- package/src/components/Slider/Slider.tsx +9 -2
- package/src/components/Stack/Stack.tsx +131 -0
- package/src/components/SuggestiveSearch/SuggestiveSearch.tsx +10 -1
- package/src/components/SummaryTile/SummaryTile.tsx +9 -2
- package/src/components/Table/Table.tsx +449 -0
- package/src/components/Text/Text.tsx +9 -2
- package/src/components/TextInput/TextInput.tsx +7 -1
- package/src/components/TextSegment/TextSegment.tsx +9 -2
- package/src/components/ThreadHero/ThreadHero.tsx +10 -3
- package/src/components/Title/Title.tsx +9 -2
- package/src/components/Toast/Toast.tsx +9 -2
- package/src/components/TransactionBubble/TransactionBubble.tsx +9 -2
- package/src/components/TransactionStatus/TransactionStatus.tsx +9 -2
- package/src/components/UpiHandle/UpiHandle.tsx +9 -3
- package/src/components/index.ts +23 -2
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/design-tokens/figma-modes.generated.ts +1 -0
- package/src/icons/registry.ts +1 -1
- package/src/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.tsx +32 -3
- package/src/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.web.tsx +25 -4
- package/src/utils/react-utils.ts +61 -0
- package/src/utils/web-platform-utils.ts +68 -0
- package/lib/commonjs/components/MediaCard/GlassFill.js +0 -62
- package/lib/commonjs/components/MediaCard/GlassFill.web.js +0 -48
- package/lib/module/components/MediaCard/GlassFill.js +0 -57
- package/lib/module/components/MediaCard/GlassFill.web.js +0 -43
- package/lib/typescript/src/components/MediaCard/GlassFill.d.ts +0 -47
- package/lib/typescript/src/components/MediaCard/GlassFill.web.d.ts +0 -20
- package/src/components/MediaCard/GlassFill.tsx +0 -89
- package/src/components/MediaCard/GlassFill.web.tsx +0 -53
|
@@ -54,6 +54,12 @@ export type TextSegmentProps = {
|
|
|
54
54
|
textAlign?: 'Left' | 'Center';
|
|
55
55
|
/** Clamp the paragraph to this many lines (truncates with an ellipsis). Applies to the whole composed line, not per-run. */
|
|
56
56
|
numberOfLines?: number;
|
|
57
|
+
/**
|
|
58
|
+
* When `true`, disables truncation entirely: the trailing ellipsis (`…`) is
|
|
59
|
+
* never shown and the `numberOfLines` clamp is ignored, so the paragraph
|
|
60
|
+
* wraps to as many lines as it needs even when horizontal space is tight.
|
|
61
|
+
*/
|
|
62
|
+
disableTruncation?: boolean;
|
|
57
63
|
/** Mode configuration used for the base style and cascaded to every run/child. */
|
|
58
64
|
modes?: Modes;
|
|
59
65
|
/** Style override applied to the outer paragraph (e.g. width constraints to force wrapping). */
|
|
@@ -94,7 +100,7 @@ export type TextSegmentProps = {
|
|
|
94
100
|
* </TextSegment>
|
|
95
101
|
* ```
|
|
96
102
|
*/
|
|
97
|
-
declare function TextSegment({ segments, children, textAlign, numberOfLines, modes, style, }: TextSegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
declare function TextSegment({ segments, children, textAlign, numberOfLines, disableTruncation, modes, style, }: TextSegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
98
104
|
declare const _default: React.MemoExoticComponent<typeof TextSegment>;
|
|
99
105
|
export default _default;
|
|
100
106
|
//# sourceMappingURL=TextSegment.d.ts.map
|
|
@@ -14,9 +14,15 @@ export type ThreadHeroProps = {
|
|
|
14
14
|
modes?: Modes;
|
|
15
15
|
/** Optional container style */
|
|
16
16
|
style?: ViewStyle;
|
|
17
|
+
/**
|
|
18
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
19
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
20
|
+
* lines as it needs even when horizontal space is tight.
|
|
21
|
+
*/
|
|
22
|
+
disableTruncation?: boolean;
|
|
17
23
|
};
|
|
18
24
|
/**
|
|
19
25
|
* ThreadHero component displaying a central identity with avatar, title, subtitle, and caption.
|
|
20
26
|
*/
|
|
21
|
-
export default function ThreadHero({ title, subtitle, caption, renderAvatar, modes, style, }: ThreadHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default function ThreadHero({ title, subtitle, caption, renderAvatar, modes, style, disableTruncation, }: ThreadHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
22
28
|
//# sourceMappingURL=ThreadHero.d.ts.map
|
|
@@ -13,9 +13,15 @@ export type TitleProps = {
|
|
|
13
13
|
/** Optional style overrides for the subtitle text. */
|
|
14
14
|
subtitleStyle?: StyleProp<TextStyle>;
|
|
15
15
|
numberOfLines?: number;
|
|
16
|
+
/**
|
|
17
|
+
* When `true`, disables truncation for both the title and subtitle: the
|
|
18
|
+
* trailing ellipsis (`…`) is never shown and the `numberOfLines` clamp is
|
|
19
|
+
* ignored, so the text wraps fully even when horizontal space is tight.
|
|
20
|
+
*/
|
|
21
|
+
disableTruncation?: boolean;
|
|
16
22
|
accessibilityLabel?: string;
|
|
17
23
|
accessibilityHint?: string;
|
|
18
24
|
} & React.ComponentProps<typeof View>;
|
|
19
|
-
declare function Title({ title, subtitle, textAlign, modes: propModes, style, textStyle, subtitleStyle, numberOfLines, accessibilityLabel, accessibilityHint, ...rest }: TitleProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function Title({ title, subtitle, textAlign, modes: propModes, style, textStyle, subtitleStyle, numberOfLines, disableTruncation, accessibilityLabel, accessibilityHint, ...rest }: TitleProps): import("react/jsx-runtime").JSX.Element;
|
|
20
26
|
export default Title;
|
|
21
27
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -9,7 +9,13 @@ export interface ToastProps {
|
|
|
9
9
|
modes?: Modes | undefined;
|
|
10
10
|
placement?: ToastPlacement | undefined;
|
|
11
11
|
style?: StyleProp<ViewStyle> | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
14
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
15
|
+
* lines as it needs even when horizontal space is tight.
|
|
16
|
+
*/
|
|
17
|
+
disableTruncation?: boolean;
|
|
12
18
|
}
|
|
13
|
-
declare function Toast({ id, title, timeout, onClose, modes, placement, style, }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function Toast({ id, title, timeout, onClose, modes, placement, style, disableTruncation, }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
14
20
|
export default Toast;
|
|
15
21
|
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -17,6 +17,12 @@ export type TransactionBubbleProps = {
|
|
|
17
17
|
accessibilityLabel?: string;
|
|
18
18
|
accessibilityHint?: string;
|
|
19
19
|
webAccessibilityProps?: WebAccessibilityProps;
|
|
20
|
+
/**
|
|
21
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
22
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
23
|
+
* lines as it needs even when horizontal space is tight.
|
|
24
|
+
*/
|
|
25
|
+
disableTruncation?: boolean;
|
|
20
26
|
} & Omit<PressableProps, 'style' | 'children' | 'onPress'>;
|
|
21
27
|
/**
|
|
22
28
|
* TransactionBubble — Figma node 1517:1155.
|
|
@@ -35,6 +41,6 @@ export type TransactionBubbleProps = {
|
|
|
35
41
|
* statusWrap: TransactionStatus + NavArrow, horizontal row with `transactionBubble/statusWrap/gap`.
|
|
36
42
|
* Container gap between sections: `transactionBubble/gap`.
|
|
37
43
|
*/
|
|
38
|
-
declare function TransactionBubble({ description, value, currency, status, date, statusSlot, children, modes, onPress, style, accessibilityLabel, accessibilityHint, webAccessibilityProps, ...rest }: TransactionBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function TransactionBubble({ description, value, currency, status, date, statusSlot, children, modes, onPress, style, accessibilityLabel, accessibilityHint, webAccessibilityProps, disableTruncation, ...rest }: TransactionBubbleProps): import("react/jsx-runtime").JSX.Element;
|
|
39
45
|
export default TransactionBubble;
|
|
40
46
|
//# sourceMappingURL=TransactionBubble.d.ts.map
|
|
@@ -9,9 +9,15 @@ export type TransactionStatusProps = {
|
|
|
9
9
|
modes?: Modes;
|
|
10
10
|
/** Optional container style */
|
|
11
11
|
style?: ViewStyle;
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
14
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
15
|
+
* lines as it needs even when horizontal space is tight.
|
|
16
|
+
*/
|
|
17
|
+
disableTruncation?: boolean;
|
|
12
18
|
};
|
|
13
19
|
/**
|
|
14
20
|
* TransactionStatus component displaying status icon, label, and date.
|
|
15
21
|
*/
|
|
16
|
-
export default function TransactionStatus({ status, date, modes, style, }: TransactionStatusProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default function TransactionStatus({ status, date, modes, style, disableTruncation, }: TransactionStatusProps): import("react/jsx-runtime").JSX.Element;
|
|
17
23
|
//# sourceMappingURL=TransactionStatus.d.ts.map
|
|
@@ -25,6 +25,12 @@ type UpiHandleProps = {
|
|
|
25
25
|
onPress?: () => void;
|
|
26
26
|
onClick?: () => void;
|
|
27
27
|
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
30
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
31
|
+
* lines as it needs even when horizontal space is tight.
|
|
32
|
+
*/
|
|
33
|
+
disableTruncation?: boolean;
|
|
28
34
|
} & Omit<React.ComponentProps<typeof View>, 'style' | 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint'>;
|
|
29
35
|
/**
|
|
30
36
|
* UpiHandle pill that mirrors the Figma "UPI Handle" component.
|
|
@@ -49,7 +55,7 @@ type UpiHandleProps = {
|
|
|
49
55
|
* - Focus state is mirrored on web only (gated setter).
|
|
50
56
|
* - Wrapped in `React.memo`.
|
|
51
57
|
*/
|
|
52
|
-
declare function UpiHandle({ label, modes: propModes, showIcon, iconName, source, avatarSource, onPress, onClick, disabled, accessibilityLabel: _accessibilityLabel, accessibilityHint, ...rest }: UpiHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function UpiHandle({ label, modes: propModes, showIcon, iconName, source, avatarSource, onPress, onClick, disabled, disableTruncation, accessibilityLabel: _accessibilityLabel, accessibilityHint, ...rest }: UpiHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
53
59
|
declare const _default: React.MemoExoticComponent<typeof UpiHandle>;
|
|
54
60
|
export default _default;
|
|
55
61
|
//# sourceMappingURL=UpiHandle.d.ts.map
|
|
@@ -4,7 +4,7 @@ export { default as Attached, type AttachedProps, type AttachedPosition } from '
|
|
|
4
4
|
export { default as AppBar } from './AppBar/AppBar';
|
|
5
5
|
export { default as Avatar, type AvatarProps } from './Avatar/Avatar';
|
|
6
6
|
export { default as AvatarGroup } from './AvatarGroup/AvatarGroup';
|
|
7
|
-
export { default as Badge } from './Badge/Badge';
|
|
7
|
+
export { default as Badge, type BadgeProps, type BadgeType } from './Badge/Badge';
|
|
8
8
|
export { default as BenefitCard, type BenefitCardProps, type BenefitCardItem } from './BenefitCard/BenefitCard';
|
|
9
9
|
export { default as BottomNav } from './BottomNav/BottomNav';
|
|
10
10
|
export { default as BottomNavItem } from './BottomNavItem/BottomNavItem';
|
|
@@ -28,7 +28,7 @@ export { default as Drawer, type DrawerProps, type DrawerHandle } from './Drawer
|
|
|
28
28
|
export { default as Dropdown, DropdownItem, type DropdownProps, type DropdownItemProps } from './Dropdown/Dropdown';
|
|
29
29
|
export { default as DropdownInput, type DropdownInputProps, type DropdownInputHandle, type DropdownInputOption, type DropdownInputOptionValue } from './DropdownInput/DropdownInput';
|
|
30
30
|
export { default as SuggestiveSearch, type SuggestiveSearchProps, type SuggestiveSearchOption, type SuggestiveSearchOptionValue, type SuggestiveSearchItem } from './SuggestiveSearch/SuggestiveSearch';
|
|
31
|
-
export { default as CardCTA, type CardCTAProps, type CardCTAType } from './CardCTA/CardCTA';
|
|
31
|
+
export { default as CardCTA, type CardCTAProps, type CardCTAType, type CardCTATypeInput } from './CardCTA/CardCTA';
|
|
32
32
|
export { default as DebitCard, type DebitCardProps } from './DebitCard/DebitCard';
|
|
33
33
|
export { default as FilterBar } from './FilterBar/FilterBar';
|
|
34
34
|
export { default as FullscreenModal, type FullscreenModalProps } from './FullscreenModal/FullscreenModal';
|
|
@@ -72,6 +72,7 @@ export { default as Screen, type ScreenProps } from './Screen/Screen';
|
|
|
72
72
|
export { default as Section } from './Section/Section';
|
|
73
73
|
export { default as Slider, type SliderProps, type SliderHandle } from './Slider/Slider';
|
|
74
74
|
export { default as Slot, type SlotProps, type SlotLayoutDirection } from './Slot/Slot';
|
|
75
|
+
export { default as Stack, type StackProps, type StackLayoutDirection, } from './Stack/Stack';
|
|
75
76
|
export { default as Spinner, type SpinnerProps, type SpinnerColors } from './Spinner/Spinner';
|
|
76
77
|
export { default as Stepper, type StepperProps } from './Stepper/Stepper';
|
|
77
78
|
export { Step, type StepProps, type StepStatus } from './Stepper/Step';
|
|
@@ -126,6 +127,7 @@ export { default as Popup, type PopupProps, type PopupRef } from './Popup/Popup'
|
|
|
126
127
|
export { default as PortfolioHero, type PortfolioHeroProps } from './PortfolioHero/PortfolioHero';
|
|
127
128
|
export { default as PlanComparisonCard, type PlanComparisonCardProps, type PlanComparisonColumn, type PlanComparisonRow, type PlanComparisonCellValue } from './PlanComparisonCard/PlanComparisonCard';
|
|
128
129
|
export { default as CompareTable, type CompareTableProps, type CompareTableColumn, type CompareTableRow, type CompareTableCellValue, type CompareTableSection } from './CompareTable/CompareTable';
|
|
130
|
+
export { default as Table, TableHeader, TableHeaderCell, TableBody, TableRow, TableCell, type TableProps, type TableColumn, type TableCellAlign, type TableHeaderProps, type TableHeaderCellProps, type TableBodyProps, type TableRowProps, type TableCellProps, } from './Table/Table';
|
|
129
131
|
export { default as PoweredByLabel, type PoweredByLabelProps } from './PoweredByLabel/PoweredByLabel';
|
|
130
132
|
export { default as ProductLabel, type ProductLabelProps } from './ProductLabel/ProductLabel';
|
|
131
133
|
export { default as ProductMerchandisingCard, type ProductMerchandisingCardProps } from './ProductMerchandisingCard/ProductMerchandisingCard';
|
|
@@ -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-06-
|
|
7
|
+
* Generated: 2026-06-22T15:37:25.988Z
|
|
8
8
|
*/
|
|
9
9
|
export declare const iconRegistry: Record<string, {
|
|
10
10
|
path: string;
|
package/lib/typescript/src/{components/ProductMerchandisingCard → utils/GlassFill}/GlassFill.d.ts
RENAMED
|
@@ -31,13 +31,38 @@ export interface GlassFillProps {
|
|
|
31
31
|
* along a hard seam. Works on iOS and Android with no extra native module.
|
|
32
32
|
*/
|
|
33
33
|
progressive?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Android-only: paint a barely-there white wash (`rgba(255,255,255,0.03)`)
|
|
36
|
+
* over the uniform blur to lift the community `RealtimeBlurView`, which
|
|
37
|
+
* otherwise reads slightly muddy. Defaults to `true` to match the
|
|
38
|
+
* media/merchandising card surfaces. Smaller surfaces (e.g. a Badge pill)
|
|
39
|
+
* pass `false` to keep the glass perfectly clear. No effect on iOS/web or
|
|
40
|
+
* on the progressive path.
|
|
41
|
+
*/
|
|
42
|
+
androidTintWash?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Web-only: multiplier converting the 0–100 `intensity` to CSS blur px (see
|
|
45
|
+
* `GlassFill.web.tsx`). Declared here purely for prop-type parity across the
|
|
46
|
+
* platform split — native always uses the fixed `blurAmount` scale and
|
|
47
|
+
* ignores this value.
|
|
48
|
+
*/
|
|
49
|
+
webBlurScale?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Web-only: upper clamp (px) on the resolved CSS blur. Declared here for
|
|
52
|
+
* parity with the web build; ignored on native.
|
|
53
|
+
*/
|
|
54
|
+
webBlurMaxPx?: number;
|
|
34
55
|
/** Container style overrides. Defaults to `StyleSheet.absoluteFill`. */
|
|
35
56
|
style?: StyleProp<ViewStyle>;
|
|
36
57
|
}
|
|
37
58
|
/**
|
|
38
|
-
*
|
|
59
|
+
* Shared glass / frosted surface for native (iOS + Android).
|
|
39
60
|
*
|
|
40
|
-
*
|
|
61
|
+
* This is the single source of truth for the glass effect used by `MediaCard`,
|
|
62
|
+
* `ProductMerchandisingCard`, `Badge`, and any future consumer. It supersedes
|
|
63
|
+
* the per-component `GlassFill` copies that previously drifted apart.
|
|
64
|
+
*
|
|
65
|
+
* Why this lives in its own platform-split file:
|
|
41
66
|
* - `@react-native-community/blur` is a native-only module; importing it on
|
|
42
67
|
* web throws because it references native components not registered there.
|
|
43
68
|
* Metro's platform-extension resolution picks `GlassFill.tsx` for native
|
|
@@ -50,7 +75,10 @@ export interface GlassFillProps {
|
|
|
50
75
|
* native module isn't linked in the running binary, the component degrades to
|
|
51
76
|
* a translucent tinted scrim (`reducedTransparencyFallbackColor` / fallback
|
|
52
77
|
* color) instead of rendering the "Unimplemented component" placeholder.
|
|
78
|
+
*
|
|
79
|
+
* NOTE: the consumer MUST clip this with `overflow: 'hidden'` on a rounded
|
|
80
|
+
* parent — the native blur view does not honor `borderRadius` itself.
|
|
53
81
|
*/
|
|
54
|
-
declare function GlassFill({ tint, intensity, overlayColor, progressive, style, }: GlassFillProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
declare function GlassFill({ tint, intensity, overlayColor, progressive, androidTintWash, style, }: GlassFillProps): import("react/jsx-runtime").JSX.Element;
|
|
55
83
|
export default GlassFill;
|
|
56
84
|
//# sourceMappingURL=GlassFill.d.ts.map
|
|
@@ -12,16 +12,32 @@ export interface GlassFillProps {
|
|
|
12
12
|
* smoothly toward the bottom.
|
|
13
13
|
*/
|
|
14
14
|
progressive?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Android-only knob on native; accepted on web for prop parity but unused
|
|
17
|
+
* (web has no equivalent realtime-blur muddiness to lift).
|
|
18
|
+
*/
|
|
19
|
+
androidTintWash?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Multiplier converting the 0–100 `intensity` to CSS blur px. Defaults to
|
|
22
|
+
* `0.32` to mirror the native `blurAmount` scale. Exposed so a consumer can
|
|
23
|
+
* preserve a legacy mapping (e.g. `MediaCard` uses `0.3`).
|
|
24
|
+
*/
|
|
25
|
+
webBlurScale?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Upper clamp (px) on the resolved CSS blur. Defaults to `32` to mirror the
|
|
28
|
+
* native cap. `MediaCard` passes `30` to preserve its historical value.
|
|
29
|
+
*/
|
|
30
|
+
webBlurMaxPx?: number;
|
|
15
31
|
style?: StyleProp<ViewStyle>;
|
|
16
32
|
}
|
|
17
33
|
/**
|
|
18
|
-
* Web counterpart of `GlassFill`.
|
|
34
|
+
* Web counterpart of the shared `GlassFill`.
|
|
19
35
|
*
|
|
20
36
|
* `@react-native-community/blur` ships no web implementation, so on web we
|
|
21
37
|
* render a translucent `View` with `backdrop-filter: blur()`. Native bundles
|
|
22
38
|
* pick up `GlassFill.tsx` instead via Metro's platform resolver; the web
|
|
23
39
|
* bundle picks up this file, so the native-only module is never imported here.
|
|
24
40
|
*/
|
|
25
|
-
declare function GlassFill({ tint, intensity, overlayColor, progressive, style, }: GlassFillProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare function GlassFill({ tint, intensity, overlayColor, progressive, webBlurScale, webBlurMaxPx, style, }: GlassFillProps): import("react/jsx-runtime").JSX.Element;
|
|
26
42
|
export default GlassFill;
|
|
27
43
|
//# sourceMappingURL=GlassFill.web.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { Modes } from '../design-tokens';
|
|
3
4
|
/**
|
|
4
5
|
* A shared, frozen empty modes object.
|
|
@@ -20,6 +21,29 @@ export declare const EMPTY_MODES: Readonly<Record<string, any>>;
|
|
|
20
21
|
* This ensures that all child components in slots receive the modes prop from the parent.
|
|
21
22
|
*/
|
|
22
23
|
export declare function cloneChildrenWithModes(children: React.ReactNode, modes: Modes, forcedModes?: Modes): React.ReactNode[];
|
|
24
|
+
/**
|
|
25
|
+
* Merges a style onto each direct (top-level) child element, with the injected
|
|
26
|
+
* style taking precedence over the child's own style.
|
|
27
|
+
*
|
|
28
|
+
* Used by the Stack family to *enforce* cross-axis stretching from the container
|
|
29
|
+
* itself: a child can set its own `alignSelf` (which, per the flexbox spec,
|
|
30
|
+
* overrides the parent's `alignItems`), so to guarantee equal heights / full
|
|
31
|
+
* width regardless of what individual children declare, we append
|
|
32
|
+
* `{ alignSelf: 'stretch' }` to every direct child.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* - Only top-level children are touched. Grandchildren are intentionally left
|
|
36
|
+
* alone — we never want to leak layout styles deeper into the tree.
|
|
37
|
+
* - Non-element children (strings, numbers) are passed through untouched.
|
|
38
|
+
* - This relies on the child forwarding `style` to its outer/root view. Built-in
|
|
39
|
+
* RN primitives and components that spread `style` onto their root honour it;
|
|
40
|
+
* a child that fully ignores `style` cannot be forced (this is a hard React
|
|
41
|
+
* Native limitation, not something this helper can work around).
|
|
42
|
+
* - Per Yoga, stretch has no effect on an axis where the child has a *fixed*
|
|
43
|
+
* dimension (e.g. an explicit `height` for a row). Such children opt out by
|
|
44
|
+
* design; this helper does not strip explicit dimensions.
|
|
45
|
+
*/
|
|
46
|
+
export declare function injectChildStyle(children: React.ReactNode, style: StyleProp<ViewStyle>): React.ReactNode;
|
|
23
47
|
/**
|
|
24
48
|
* Combines several refs (object refs and/or callback refs) into a single
|
|
25
49
|
* callback ref. Useful when a component needs to keep its own internal ref to a
|
|
@@ -30,6 +54,19 @@ export declare function cloneChildrenWithModes(children: React.ReactNode, modes:
|
|
|
30
54
|
* <RNTextInput ref={mergeRefs(inputRef, forwardedRef)} />
|
|
31
55
|
*/
|
|
32
56
|
export declare function mergeRefs<T>(...refs: Array<React.Ref<T> | undefined | null>): React.RefCallback<T>;
|
|
57
|
+
export type EllipsizeMode = 'head' | 'middle' | 'tail' | 'clip';
|
|
58
|
+
/**
|
|
59
|
+
* Resolves the `numberOfLines` / `ellipsizeMode` pair for a `<Text>` based on a
|
|
60
|
+
* `disableTruncation` flag.
|
|
61
|
+
*
|
|
62
|
+
* When `disableTruncation` is `true`, both values are returned as `undefined`
|
|
63
|
+
* so the text wraps to as many lines as it needs and never shows the trailing
|
|
64
|
+
* ellipsis. Otherwise the provided values are passed through unchanged.
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveTruncation(disableTruncation: boolean | undefined, numberOfLines?: number, ellipsizeMode?: EllipsizeMode): {
|
|
67
|
+
numberOfLines?: number;
|
|
68
|
+
ellipsizeMode?: EllipsizeMode;
|
|
69
|
+
};
|
|
33
70
|
/**
|
|
34
71
|
* Flattens React children, extracting them from Fragments.
|
|
35
72
|
* Useful for Group components that need to process individual items (e.g., for layout or styling)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
1
2
|
import type { PressableProps } from 'react-native';
|
|
2
3
|
/**
|
|
3
4
|
* Web-specific props that should NOT be passed to React Native's Pressable component.
|
|
@@ -131,6 +132,41 @@ export declare function usePressableWebSupport({ restProps, onPress, disabled, a
|
|
|
131
132
|
tabIndex?: 0 | -1;
|
|
132
133
|
onKeyDown?: (e: any) => void;
|
|
133
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Detects pointer presses (mouse / touch) that land OUTSIDE the node held by
|
|
137
|
+
* `containerRef` and invokes `onOutsidePress`.
|
|
138
|
+
*
|
|
139
|
+
* Why this exists:
|
|
140
|
+
* On web, React Native pressables (`Pressable`, `Button`, links, etc.) do not
|
|
141
|
+
* always claim DOM focus the way a native `<button>`/`<input>` does. As a
|
|
142
|
+
* result, tapping an *interactive* element outside a focused `<input>` may
|
|
143
|
+
* never trigger the input's native `blur` event, leaving a field stuck in its
|
|
144
|
+
* "Active" visual state. Listening for document-level pointer-down in the
|
|
145
|
+
* capture phase lets a component force a blur (or close a popover, etc.)
|
|
146
|
+
* regardless of whether the outside target takes focus.
|
|
147
|
+
*
|
|
148
|
+
* Behavior & safety:
|
|
149
|
+
* - **Web only.** On native (or when `document` is unavailable) this is a
|
|
150
|
+
* no-op, so it is safe to call unconditionally.
|
|
151
|
+
* - Listeners are attached only while `enabled` is `true`, and are removed on
|
|
152
|
+
* cleanup / when disabled — there is no standing global listener.
|
|
153
|
+
* - Uses the **capture** phase so it runs before element-level handlers, and
|
|
154
|
+
* listens to both `mousedown` and `touchstart` for parity across devices.
|
|
155
|
+
* - The latest `onOutsidePress` is read through a ref, so passing a fresh
|
|
156
|
+
* inline closure every render does NOT re-subscribe the listener.
|
|
157
|
+
*
|
|
158
|
+
* @param containerRef - Ref to the root host node to treat as "inside".
|
|
159
|
+
* @param onOutsidePress - Called when a pointer press occurs outside the node.
|
|
160
|
+
* @param enabled - When `false`, no listener is attached. Defaults to `true`.
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```tsx
|
|
164
|
+
* const rootRef = useRef<View>(null)
|
|
165
|
+
* const inputRef = useRef<RNTextInput>(null)
|
|
166
|
+
* useWebOutsidePress(rootRef, () => inputRef.current?.blur(), isFocused)
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
export declare function useWebOutsidePress(containerRef: RefObject<any>, onOutsidePress: () => void, enabled?: boolean): void;
|
|
134
170
|
/**
|
|
135
171
|
* Type guard to check if running on web platform
|
|
136
172
|
*/
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
15
15
|
import Icon from '../../icons/Icon'
|
|
16
16
|
import { usePressableWebSupport, type WebAccessibilityProps } from '../../utils/web-platform-utils'
|
|
17
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils'
|
|
17
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils'
|
|
18
18
|
import type { Modes } from '../../design-tokens'
|
|
19
19
|
|
|
20
20
|
// Enable LayoutAnimation on Android
|
|
@@ -87,6 +87,12 @@ export type AccordionProps = {
|
|
|
87
87
|
accessibilityState?: AccessibilityState;
|
|
88
88
|
/** Web-specific accessibility props (only used on web platform) */
|
|
89
89
|
webAccessibilityProps?: WebAccessibilityProps;
|
|
90
|
+
/**
|
|
91
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
92
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
93
|
+
* lines as it needs even when horizontal space is tight.
|
|
94
|
+
*/
|
|
95
|
+
disableTruncation?: boolean;
|
|
90
96
|
} & React.ComponentProps<typeof View>;
|
|
91
97
|
|
|
92
98
|
/**
|
|
@@ -117,6 +123,7 @@ function Accordion({
|
|
|
117
123
|
accessibilityHint,
|
|
118
124
|
accessibilityState,
|
|
119
125
|
webAccessibilityProps,
|
|
126
|
+
disableTruncation,
|
|
120
127
|
...rest
|
|
121
128
|
}: AccordionProps) {
|
|
122
129
|
const [internalExpanded, setInternalExpanded] = useState(defaultExpanded)
|
|
@@ -253,7 +260,7 @@ function Accordion({
|
|
|
253
260
|
]}
|
|
254
261
|
{...webProps}
|
|
255
262
|
>
|
|
256
|
-
<Text style={titleStyle}
|
|
263
|
+
<Text style={titleStyle} {...resolveTruncation(disableTruncation, 1)}>
|
|
257
264
|
{title}
|
|
258
265
|
</Text>
|
|
259
266
|
<Icon
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
type TextStyle,
|
|
12
12
|
} from 'react-native'
|
|
13
13
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
14
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils'
|
|
14
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils'
|
|
15
15
|
import Checkbox from '../Checkbox/Checkbox'
|
|
16
16
|
import Divider from '../Divider/Divider'
|
|
17
17
|
import Icon from '../../icons/Icon'
|
|
@@ -52,6 +52,12 @@ export type AccordionCheckboxProps = {
|
|
|
52
52
|
style?: StyleProp<ViewStyle>
|
|
53
53
|
/** Accessibility label for the header press target. Defaults to `title`. */
|
|
54
54
|
accessibilityLabel?: string
|
|
55
|
+
/**
|
|
56
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
57
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
58
|
+
* lines as it needs even when horizontal space is tight.
|
|
59
|
+
*/
|
|
60
|
+
disableTruncation?: boolean
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
/**
|
|
@@ -102,6 +108,7 @@ function AccordionCheckbox({
|
|
|
102
108
|
modes = EMPTY_MODES,
|
|
103
109
|
style,
|
|
104
110
|
accessibilityLabel,
|
|
111
|
+
disableTruncation,
|
|
105
112
|
}: AccordionCheckboxProps) {
|
|
106
113
|
const isExpandedControlled = controlledExpanded !== undefined
|
|
107
114
|
const [internalExpanded, setInternalExpanded] = useState(defaultExpanded)
|
|
@@ -288,11 +295,11 @@ function AccordionCheckbox({
|
|
|
288
295
|
}
|
|
289
296
|
/>
|
|
290
297
|
<View style={textWrapStyle}>
|
|
291
|
-
<Text style={titleStyle}
|
|
298
|
+
<Text style={titleStyle} {...resolveTruncation(disableTruncation, 1)} selectable={false}>
|
|
292
299
|
{title}
|
|
293
300
|
</Text>
|
|
294
301
|
{subtitle ? (
|
|
295
|
-
<Text style={subtitleStyle}
|
|
302
|
+
<Text style={subtitleStyle} {...resolveTruncation(disableTruncation, 1)} selectable={false}>
|
|
296
303
|
{subtitle}
|
|
297
304
|
</Text>
|
|
298
305
|
) : null}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
type ViewStyle,
|
|
14
14
|
} from 'react-native'
|
|
15
15
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
16
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils'
|
|
16
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils'
|
|
17
17
|
import Icon from '../../icons/Icon'
|
|
18
18
|
import type { Modes } from '../../design-tokens'
|
|
19
19
|
|
|
@@ -88,6 +88,12 @@ export type AccountCardProps = {
|
|
|
88
88
|
accessibilityLabel?: string
|
|
89
89
|
/** Accessibility hint forwarded to the underlying `Pressable`. */
|
|
90
90
|
accessibilityHint?: string
|
|
91
|
+
/**
|
|
92
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
93
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
94
|
+
* lines as it needs even when horizontal space is tight.
|
|
95
|
+
*/
|
|
96
|
+
disableTruncation?: boolean
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
const toNumber = (value: unknown, fallback: number): number => {
|
|
@@ -148,6 +154,7 @@ function AccountCard({
|
|
|
148
154
|
style,
|
|
149
155
|
accessibilityLabel,
|
|
150
156
|
accessibilityHint,
|
|
157
|
+
disableTruncation,
|
|
151
158
|
}: AccountCardProps) {
|
|
152
159
|
const iconModes = useMemo(
|
|
153
160
|
() =>
|
|
@@ -330,12 +337,12 @@ function AccountCard({
|
|
|
330
337
|
}}
|
|
331
338
|
>
|
|
332
339
|
{title != null && title !== '' ? (
|
|
333
|
-
<Text style={titleStyle}
|
|
340
|
+
<Text style={titleStyle} {...resolveTruncation(disableTruncation, 1)}>
|
|
334
341
|
{title}
|
|
335
342
|
</Text>
|
|
336
343
|
) : null}
|
|
337
344
|
{showSubtitle ? (
|
|
338
|
-
<Text style={subtitleStyle}
|
|
345
|
+
<Text style={subtitleStyle} {...resolveTruncation(disableTruncation, 1)}>
|
|
339
346
|
{subtitle}
|
|
340
347
|
</Text>
|
|
341
348
|
) : null}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import Svg, { Line } from 'react-native-svg'
|
|
10
10
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
11
11
|
import { useTokens } from '../../design-tokens/JFSThemeProvider'
|
|
12
|
-
import { EMPTY_MODES } from '../../utils/react-utils'
|
|
12
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils'
|
|
13
13
|
import MetricLegendItem from '../MetricLegendItem/MetricLegendItem'
|
|
14
14
|
import type { Modes } from '../../design-tokens'
|
|
15
15
|
|
|
@@ -109,6 +109,12 @@ export type AllocationComparisonChartProps = {
|
|
|
109
109
|
legendStyle?: StyleProp<ViewStyle>
|
|
110
110
|
/** Accessibility label for the whole chart. */
|
|
111
111
|
accessibilityLabel?: string
|
|
112
|
+
/**
|
|
113
|
+
* When `true`, disables text truncation: the trailing ellipsis (`…`) is never
|
|
114
|
+
* shown and any `numberOfLines` clamp is ignored, so the text wraps to as many
|
|
115
|
+
* lines as it needs even when horizontal space is tight.
|
|
116
|
+
*/
|
|
117
|
+
disableTruncation?: boolean
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
const DEFAULT_DATA: AllocationSegment[] = [
|
|
@@ -162,6 +168,7 @@ type SegmentBarProps = {
|
|
|
162
168
|
baselineLabel: React.ReactNode
|
|
163
169
|
showMarker: boolean
|
|
164
170
|
theme: SegmentTheme
|
|
171
|
+
disableTruncation?: boolean
|
|
165
172
|
}
|
|
166
173
|
|
|
167
174
|
/**
|
|
@@ -177,6 +184,7 @@ function SegmentBar({
|
|
|
177
184
|
baselineLabel,
|
|
178
185
|
showMarker,
|
|
179
186
|
theme,
|
|
187
|
+
disableTruncation,
|
|
180
188
|
}: SegmentBarProps) {
|
|
181
189
|
const { barWidth, pillRadius, gap, currentColor, baselineColor, lineColor, lineSize, labelStyle } =
|
|
182
190
|
theme
|
|
@@ -195,7 +203,7 @@ function SegmentBar({
|
|
|
195
203
|
accessibilityLabel={segment.accessibilityLabel}
|
|
196
204
|
>
|
|
197
205
|
{showValueLabel ? (
|
|
198
|
-
<Text
|
|
206
|
+
<Text {...resolveTruncation(disableTruncation, 1)} style={labelStyle}>
|
|
199
207
|
{segment.valueLabel}
|
|
200
208
|
</Text>
|
|
201
209
|
) : null}
|
|
@@ -247,7 +255,7 @@ function SegmentBar({
|
|
|
247
255
|
/>
|
|
248
256
|
</Svg>
|
|
249
257
|
{isShown(baselineLabel) ? (
|
|
250
|
-
<Text
|
|
258
|
+
<Text {...resolveTruncation(disableTruncation, 1)} style={[labelStyle, { marginLeft: 6 }]}>
|
|
251
259
|
{baselineLabel}
|
|
252
260
|
</Text>
|
|
253
261
|
) : null}
|
|
@@ -257,7 +265,7 @@ function SegmentBar({
|
|
|
257
265
|
) : null}
|
|
258
266
|
</View>
|
|
259
267
|
|
|
260
|
-
<Text
|
|
268
|
+
<Text {...resolveTruncation(disableTruncation, 1)} style={labelStyle}>
|
|
261
269
|
{segment.label}
|
|
262
270
|
</Text>
|
|
263
271
|
</View>
|
|
@@ -295,6 +303,7 @@ function AllocationComparisonChart({
|
|
|
295
303
|
chartStyle,
|
|
296
304
|
legendStyle,
|
|
297
305
|
accessibilityLabel,
|
|
306
|
+
disableTruncation,
|
|
298
307
|
}: AllocationComparisonChartProps) {
|
|
299
308
|
const { modes: globalModes } = useTokens()
|
|
300
309
|
const modes = React.useMemo(
|
|
@@ -440,6 +449,7 @@ function AllocationComparisonChart({
|
|
|
440
449
|
baselineLabel={baselineLabel}
|
|
441
450
|
showMarker={showMarker}
|
|
442
451
|
theme={theme}
|
|
452
|
+
disableTruncation={disableTruncation}
|
|
443
453
|
/>
|
|
444
454
|
)
|
|
445
455
|
})}
|