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
|
@@ -4,7 +4,7 @@ import React, { useMemo } from 'react';
|
|
|
4
4
|
import { Text, View } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
6
|
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
|
|
7
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
|
|
8
8
|
import MediaSource from '../../utils/MediaSource';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
// Default bundled FINVU brand logo, matching the Figma reference so the
|
|
@@ -56,7 +56,8 @@ function PoweredByLabel({
|
|
|
56
56
|
style,
|
|
57
57
|
textStyle,
|
|
58
58
|
imageStyle,
|
|
59
|
-
accessibilityLabel
|
|
59
|
+
accessibilityLabel,
|
|
60
|
+
disableTruncation
|
|
60
61
|
}) {
|
|
61
62
|
const {
|
|
62
63
|
modes: globalModes
|
|
@@ -121,7 +122,7 @@ function PoweredByLabel({
|
|
|
121
122
|
style: [labelTextStyle, textStyle],
|
|
122
123
|
accessibilityElementsHidden: true,
|
|
123
124
|
importantForAccessibility: "no",
|
|
124
|
-
|
|
125
|
+
...resolveTruncation(disableTruncation, 1),
|
|
125
126
|
children: label
|
|
126
127
|
}), renderImage()]
|
|
127
128
|
});
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useId, useMemo } from 'react';
|
|
4
|
-
import { View, Text, Pressable, StyleSheet } from 'react-native';
|
|
4
|
+
import { View, Text, Pressable, StyleSheet, Platform, Image as RNImage } from 'react-native';
|
|
5
|
+
import MaskedView from '@react-native-masked-view/masked-view';
|
|
5
6
|
import Svg, { Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
|
|
6
7
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
7
|
-
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
8
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
8
9
|
import Avatar from '../Avatar/Avatar';
|
|
9
10
|
import Badge from '../Badge/Badge';
|
|
10
11
|
import Button from '../Button/Button';
|
|
11
12
|
import Image from '../Image/Image';
|
|
12
|
-
import GlassFill from '
|
|
13
|
+
import GlassFill from '../../utils/GlassFill/GlassFill';
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
function normalizeImageSource(src) {
|
|
16
|
+
if (src == null) return undefined;
|
|
17
|
+
return typeof src === 'string' ? {
|
|
18
|
+
uri: src
|
|
19
|
+
} : src;
|
|
20
|
+
}
|
|
14
21
|
/**
|
|
15
22
|
* ProductMerchandisingCard — a full-bleed image card (Figma node 5277:317)
|
|
16
23
|
* with a top header (avatar + badge) and a bottom **glass footer** that
|
|
@@ -51,11 +58,15 @@ function ProductMerchandisingCard({
|
|
|
51
58
|
height = 223,
|
|
52
59
|
modes = EMPTY_MODES,
|
|
53
60
|
style,
|
|
54
|
-
accessibilityLabel
|
|
61
|
+
accessibilityLabel,
|
|
62
|
+
disableTruncation
|
|
55
63
|
}) {
|
|
56
|
-
// Unique gradient
|
|
64
|
+
// Unique gradient ids so multiple cards on one (web) document never collide.
|
|
57
65
|
const rawId = useId();
|
|
58
|
-
const
|
|
66
|
+
const safeId = rawId.replace(/[^a-zA-Z0-9_-]/g, '');
|
|
67
|
+
const scrimId = `pmc-footer-scrim-${safeId}`;
|
|
68
|
+
const blurMaskId = `pmc-footer-blurmask-${safeId}`;
|
|
69
|
+
const normalizedImageSource = useMemo(() => normalizeImageSource(imageSource), [imageSource]);
|
|
59
70
|
const tokens = useMemo(() => resolveTokens(modes), [modes]);
|
|
60
71
|
const containerStyle = {
|
|
61
72
|
height,
|
|
@@ -92,21 +103,25 @@ function ProductMerchandisingCard({
|
|
|
92
103
|
monogram: avatarMonogram,
|
|
93
104
|
modes: avatarModes
|
|
94
105
|
}) : null;
|
|
95
|
-
|
|
106
|
+
|
|
107
|
+
// The footer "special badge" is now the shared <Badge type="glass">. The
|
|
108
|
+
// hardcoded literals that defined its look (warm frosted overlay, gentle
|
|
109
|
+
// 5px blur, 6/2 padding, 4px radius, weight-500 white label) are preserved
|
|
110
|
+
// 1:1 via the glass overrides + `style`/`labelStyle`, and the optional
|
|
111
|
+
// `specialBadgeIcon` maps to Badge's `leading` slot — so every existing
|
|
112
|
+
// instantiation renders byte-for-byte the same as before.
|
|
113
|
+
const footerSpecialBadge = specialBadge ?? (specialBadgeLabel != null ? /*#__PURE__*/_jsx(Badge, {
|
|
114
|
+
type: "glass",
|
|
115
|
+
label: specialBadgeLabel,
|
|
116
|
+
leading: specialBadgeIcon,
|
|
117
|
+
glassOverlayColor: SPECIAL_BADGE_BG,
|
|
118
|
+
glassIntensity: SPECIAL_BADGE_INTENSITY,
|
|
119
|
+
modes: modes,
|
|
96
120
|
style: styles.specialBadge,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
style: styles.specialBadgeFill
|
|
102
|
-
}), specialBadgeIcon != null ? /*#__PURE__*/_jsx(View, {
|
|
103
|
-
style: styles.specialBadgeIcon,
|
|
104
|
-
children: specialBadgeIcon
|
|
105
|
-
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
106
|
-
style: tokens.specialBadgeText,
|
|
107
|
-
numberOfLines: 1,
|
|
108
|
-
children: specialBadgeLabel
|
|
109
|
-
})]
|
|
121
|
+
labelStyle: tokens.specialBadgeText,
|
|
122
|
+
...(disableTruncation != null ? {
|
|
123
|
+
disableTruncation
|
|
124
|
+
} : null)
|
|
110
125
|
}) : null);
|
|
111
126
|
|
|
112
127
|
// The Figma CTA uses the brand "Secondary" appearance (purple fill, white
|
|
@@ -141,7 +156,62 @@ function ProductMerchandisingCard({
|
|
|
141
156
|
}), /*#__PURE__*/_jsxs(View, {
|
|
142
157
|
style: tokens.footer,
|
|
143
158
|
pointerEvents: "box-none",
|
|
144
|
-
children: [/*#__PURE__*/_jsx(
|
|
159
|
+
children: [normalizedImageSource != null ? /*#__PURE__*/_jsx(View, {
|
|
160
|
+
style: StyleSheet.absoluteFill,
|
|
161
|
+
pointerEvents: "none",
|
|
162
|
+
children: /*#__PURE__*/_jsx(MaskedView, {
|
|
163
|
+
style: StyleSheet.absoluteFill,
|
|
164
|
+
maskElement: /*#__PURE__*/_jsxs(Svg, {
|
|
165
|
+
width: "100%",
|
|
166
|
+
height: "100%",
|
|
167
|
+
children: [/*#__PURE__*/_jsx(Defs, {
|
|
168
|
+
children: /*#__PURE__*/_jsxs(LinearGradient, {
|
|
169
|
+
id: blurMaskId,
|
|
170
|
+
x1: "0",
|
|
171
|
+
y1: "0",
|
|
172
|
+
x2: "0",
|
|
173
|
+
y2: "1",
|
|
174
|
+
children: [/*#__PURE__*/_jsx(Stop, {
|
|
175
|
+
offset: "0",
|
|
176
|
+
stopColor: "#000000",
|
|
177
|
+
stopOpacity: 0
|
|
178
|
+
}), /*#__PURE__*/_jsx(Stop, {
|
|
179
|
+
offset: "0.35",
|
|
180
|
+
stopColor: "#000000",
|
|
181
|
+
stopOpacity: 0.5
|
|
182
|
+
}), /*#__PURE__*/_jsx(Stop, {
|
|
183
|
+
offset: "0.7",
|
|
184
|
+
stopColor: "#000000",
|
|
185
|
+
stopOpacity: 0.92
|
|
186
|
+
}), /*#__PURE__*/_jsx(Stop, {
|
|
187
|
+
offset: "1",
|
|
188
|
+
stopColor: "#000000",
|
|
189
|
+
stopOpacity: 1
|
|
190
|
+
})]
|
|
191
|
+
})
|
|
192
|
+
}), /*#__PURE__*/_jsx(Rect, {
|
|
193
|
+
x: "0",
|
|
194
|
+
y: "0",
|
|
195
|
+
width: "100%",
|
|
196
|
+
height: "100%",
|
|
197
|
+
fill: `url(#${blurMaskId})`
|
|
198
|
+
})]
|
|
199
|
+
}),
|
|
200
|
+
children: /*#__PURE__*/_jsx(RNImage, {
|
|
201
|
+
source: normalizedImageSource,
|
|
202
|
+
blurRadius: tokens.imageBlurRadius,
|
|
203
|
+
resizeMode: "cover",
|
|
204
|
+
style: {
|
|
205
|
+
position: 'absolute',
|
|
206
|
+
left: 0,
|
|
207
|
+
right: 0,
|
|
208
|
+
bottom: 0,
|
|
209
|
+
width: '100%',
|
|
210
|
+
height
|
|
211
|
+
}
|
|
212
|
+
})
|
|
213
|
+
})
|
|
214
|
+
}) : /*#__PURE__*/_jsx(GlassFill, {
|
|
145
215
|
tint: "dark",
|
|
146
216
|
intensity: tokens.blurIntensity,
|
|
147
217
|
progressive: true
|
|
@@ -182,11 +252,11 @@ function ProductMerchandisingCard({
|
|
|
182
252
|
style: tokens.textWrap,
|
|
183
253
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
184
254
|
style: tokens.title,
|
|
185
|
-
|
|
255
|
+
...resolveTruncation(disableTruncation, 1),
|
|
186
256
|
children: title
|
|
187
257
|
}), subtitle != null ? /*#__PURE__*/_jsx(Text, {
|
|
188
258
|
style: tokens.subtitle,
|
|
189
|
-
|
|
259
|
+
...resolveTruncation(disableTruncation, 1),
|
|
190
260
|
children: subtitle
|
|
191
261
|
}) : null]
|
|
192
262
|
}), footerCta]
|
|
@@ -257,9 +327,20 @@ function resolveTokens(modes) {
|
|
|
257
327
|
const sbSize = asNum(getVariableByName('productMerchandisingcard/specialbadge/text/fontsize', modes), 12);
|
|
258
328
|
const sbFamily = asStr(getVariableByName('productMerchandisingcard/specialbadge/text/fontfamily', modes), 'JioType Var');
|
|
259
329
|
const sbWeight = asStr(getVariableByName('productMerchandisingcard/specialbadge/text/fontweight', modes), '500');
|
|
330
|
+
|
|
331
|
+
// `Image.blurRadius` is interpreted differently per platform — iOS applies a
|
|
332
|
+
// strong Gaussian while Android's IterativeBoxBlur is gentler at the same
|
|
333
|
+
// numeric radius — so we tune each platform to land on the same perceived
|
|
334
|
+
// "minimal" frosted strength as the Figma design.
|
|
335
|
+
const imageBlurRadius = Platform.select({
|
|
336
|
+
ios: Math.max(6, Math.round(blurRadius * 0.5)),
|
|
337
|
+
android: Math.max(12, Math.round(blurRadius * 0.95)),
|
|
338
|
+
default: Math.max(8, Math.round(blurRadius * 0.6))
|
|
339
|
+
});
|
|
260
340
|
return {
|
|
261
341
|
radius,
|
|
262
342
|
blurIntensity: Math.max(0, Math.min(100, Math.round(blurRadius * BLUR_INTENSITY_FACTOR))),
|
|
343
|
+
imageBlurRadius,
|
|
263
344
|
header: {
|
|
264
345
|
flexDirection: 'row',
|
|
265
346
|
alignItems: 'flex-start',
|
|
@@ -323,23 +404,16 @@ const styles = StyleSheet.create({
|
|
|
323
404
|
// the intended fade strength.
|
|
324
405
|
opacity: 0.9
|
|
325
406
|
},
|
|
407
|
+
// Overrides layered on top of <Badge type="glass">. Badge already supplies
|
|
408
|
+
// the row layout + 4px gap (when a leading icon is present), `overflow:
|
|
409
|
+
// 'hidden'`, `alignSelf: 'flex-start'` and `alignItems: 'center'`; these
|
|
410
|
+
// pin the special badge's literal Figma box (6/2 padding, 4px radius)
|
|
411
|
+
// regardless of the badge size tokens resolved by the active modes.
|
|
326
412
|
specialBadge: {
|
|
327
|
-
flexDirection: 'row',
|
|
328
|
-
alignItems: 'center',
|
|
329
|
-
gap: 4,
|
|
330
413
|
paddingHorizontal: 6,
|
|
331
414
|
paddingVertical: 2,
|
|
332
|
-
borderRadius: 4,
|
|
333
|
-
overflow: 'hidden',
|
|
334
|
-
alignSelf: 'flex-start'
|
|
335
|
-
},
|
|
336
|
-
specialBadgeFill: {
|
|
337
415
|
borderRadius: 4
|
|
338
416
|
},
|
|
339
|
-
specialBadgeIcon: {
|
|
340
|
-
justifyContent: 'center',
|
|
341
|
-
alignItems: 'center'
|
|
342
|
-
},
|
|
343
417
|
pressed: {
|
|
344
418
|
opacity: 0.92
|
|
345
419
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
|
|
6
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
|
|
7
7
|
import Image from '../Image/Image';
|
|
8
8
|
import ProductLabel from '../ProductLabel/ProductLabel';
|
|
9
9
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -24,7 +24,8 @@ const ProductOverview = ({
|
|
|
24
24
|
stats = DEFAULT_STATS,
|
|
25
25
|
modes = EMPTY_MODES,
|
|
26
26
|
style,
|
|
27
|
-
children
|
|
27
|
+
children,
|
|
28
|
+
disableTruncation
|
|
28
29
|
}) => {
|
|
29
30
|
const padding = getVariableByName('productOverview/padding', modes) ?? 24;
|
|
30
31
|
const gap = getVariableByName('productOverview/gap', modes) ?? 12;
|
|
@@ -128,11 +129,11 @@ const ProductOverview = ({
|
|
|
128
129
|
},
|
|
129
130
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
130
131
|
style: statValueStyle,
|
|
131
|
-
|
|
132
|
+
...resolveTruncation(disableTruncation, 1),
|
|
132
133
|
children: stat.value
|
|
133
134
|
}), /*#__PURE__*/_jsx(Text, {
|
|
134
135
|
style: statLabelStyle,
|
|
135
|
-
|
|
136
|
+
...resolveTruncation(disableTruncation, 1),
|
|
136
137
|
children: stat.label
|
|
137
138
|
})]
|
|
138
139
|
}, `${stat.label}-${index}`))
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
6
|
import Icon from '../../icons/Icon';
|
|
7
|
-
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
7
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
10
|
* ProgressBadge component that displays an icon, text, and an internal progress bar.
|
|
@@ -29,6 +29,7 @@ function ProgressBadge({
|
|
|
29
29
|
style,
|
|
30
30
|
textStyle: textStyleOverride,
|
|
31
31
|
accessibilityLabel,
|
|
32
|
+
disableTruncation,
|
|
32
33
|
...rest
|
|
33
34
|
}) {
|
|
34
35
|
// Resolve layout tokens
|
|
@@ -114,8 +115,7 @@ function ProgressBadge({
|
|
|
114
115
|
importantForAccessibility: "no"
|
|
115
116
|
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
116
117
|
style: [textStyle, textStyleOverride],
|
|
117
|
-
|
|
118
|
-
ellipsizeMode: "tail",
|
|
118
|
+
...resolveTruncation(disableTruncation, 1, 'tail'),
|
|
119
119
|
accessibilityElementsHidden: true,
|
|
120
120
|
importantForAccessibility: "no",
|
|
121
121
|
children: taskName
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
|
|
6
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
|
|
7
7
|
import Divider from '../Divider/Divider';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -53,7 +53,8 @@ function ProjectionMarker({
|
|
|
53
53
|
badgeStyle,
|
|
54
54
|
durationStyle,
|
|
55
55
|
rateStyle,
|
|
56
|
-
accessibilityLabel
|
|
56
|
+
accessibilityLabel,
|
|
57
|
+
disableTruncation
|
|
57
58
|
}) {
|
|
58
59
|
const titleColor = getVariableByName('projectionMarker/title/color', modes) ?? '#000000';
|
|
59
60
|
const titleFontFamily = getVariableByName('projectionMarker/title/fontfamily', modes) ?? 'JioType Var';
|
|
@@ -85,7 +86,7 @@ function ProjectionMarker({
|
|
|
85
86
|
if (isTextValue(value)) {
|
|
86
87
|
return /*#__PURE__*/_jsx(Text, {
|
|
87
88
|
style: [titleTextStyle, overrideStyle],
|
|
88
|
-
|
|
89
|
+
...resolveTruncation(disableTruncation, 1),
|
|
89
90
|
children: value
|
|
90
91
|
});
|
|
91
92
|
}
|
|
@@ -8,7 +8,7 @@ import NavArrow from '../NavArrow/NavArrow';
|
|
|
8
8
|
import IconCapsule from '../IconCapsule/IconCapsule';
|
|
9
9
|
import ListItem from '../ListItem/ListItem';
|
|
10
10
|
import { usePressableWebSupport } from '../../utils/web-platform-utils';
|
|
11
|
-
import { EMPTY_MODES, cloneChildrenWithModes, flattenChildren } from '../../utils/react-utils';
|
|
11
|
+
import { EMPTY_MODES, cloneChildrenWithModes, flattenChildren, resolveTruncation } from '../../utils/react-utils';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
// Match Button: delay the press visual on iOS so a scroll-cancelled touch
|
|
14
14
|
// never applies the "pressed" style. See Button.tsx for the rationale.
|
|
@@ -374,6 +374,7 @@ function Section({
|
|
|
374
374
|
accessibilityLabel: _accessibilityLabel,
|
|
375
375
|
accessibilityHint,
|
|
376
376
|
webAccessibilityProps,
|
|
377
|
+
disableTruncation,
|
|
377
378
|
...rest
|
|
378
379
|
}) {
|
|
379
380
|
// Focus and hover are still mirrored in React because they are visible,
|
|
@@ -409,7 +410,7 @@ function Section({
|
|
|
409
410
|
style: headerWrapStyle,
|
|
410
411
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
411
412
|
style: tokens.titleStyle,
|
|
412
|
-
|
|
413
|
+
...resolveTruncation(disableTruncation, 1),
|
|
413
414
|
accessibilityElementsHidden: true,
|
|
414
415
|
importantForAccessibility: "no",
|
|
415
416
|
children: title
|
|
@@ -419,7 +420,7 @@ function Section({
|
|
|
419
420
|
})]
|
|
420
421
|
}), showSupportText && /*#__PURE__*/_jsx(Text, {
|
|
421
422
|
style: tokens.supportTextStyle,
|
|
422
|
-
|
|
423
|
+
...resolveTruncation(disableTruncation, 2),
|
|
423
424
|
accessibilityElementsHidden: true,
|
|
424
425
|
importantForAccessibility: "no",
|
|
425
426
|
children: supportText
|
|
@@ -4,7 +4,7 @@ import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, u
|
|
|
4
4
|
import { View, Text, PanResponder, Platform } from 'react-native';
|
|
5
5
|
import Svg, { Path } from 'react-native-svg';
|
|
6
6
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
7
|
-
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
7
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Imperative handle exposed via `ref`. The primary way to read a slider's value
|
|
@@ -66,7 +66,8 @@ const Slider = /*#__PURE__*/forwardRef(function Slider({
|
|
|
66
66
|
width = '100%',
|
|
67
67
|
modes = EMPTY_MODES,
|
|
68
68
|
style,
|
|
69
|
-
accessibilityLabel
|
|
69
|
+
accessibilityLabel,
|
|
70
|
+
disableTruncation
|
|
70
71
|
}, ref) {
|
|
71
72
|
const tokens = useMemo(() => resolveTokens(modes), [modes]);
|
|
72
73
|
const isControlled = controlledValue !== undefined;
|
|
@@ -247,7 +248,7 @@ const Slider = /*#__PURE__*/forwardRef(function Slider({
|
|
|
247
248
|
pointerEvents: "none",
|
|
248
249
|
children: [renderTooltip ? renderTooltip(currentValue) : /*#__PURE__*/_jsx(Text, {
|
|
249
250
|
style: tokens.tooltipLabel,
|
|
250
|
-
|
|
251
|
+
...resolveTruncation(disableTruncation, 1),
|
|
251
252
|
children: valueText
|
|
252
253
|
}), /*#__PURE__*/_jsx(View, {
|
|
253
254
|
style: [styles.tip, {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
7
|
+
import { cloneChildrenWithModes, EMPTY_MODES, injectChildStyle } from '../../utils/react-utils';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* Stack — a token-driven layout container for grouped content.
|
|
11
|
+
*
|
|
12
|
+
* Use `Stack` instead of a raw `View` when you need a vertical or horizontal
|
|
13
|
+
* stack with design-token gap spacing and automatic `modes` propagation to
|
|
14
|
+
* children. Typical usage is nesting a column of actions inside a
|
|
15
|
+
* direction-locked parent such as `ActionFooter`:
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <ActionFooter modes={modes}>
|
|
20
|
+
* <Stack layoutDirection="vertical" modes={modes}>
|
|
21
|
+
* <Button label="Continue" modes={primaryModes} />
|
|
22
|
+
* <Disclaimer disclaimer="Terms apply." modes={modes} />
|
|
23
|
+
* </Stack>
|
|
24
|
+
* </ActionFooter>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Previously named `Slot`. The `Slot` export is preserved as a deprecated alias
|
|
29
|
+
* for backward compatibility.
|
|
30
|
+
*/
|
|
31
|
+
function Stack({
|
|
32
|
+
children,
|
|
33
|
+
layoutDirection = 'vertical',
|
|
34
|
+
alignCrossAxis,
|
|
35
|
+
justifyMainAxis,
|
|
36
|
+
equalHeight = false,
|
|
37
|
+
fillWidth = false,
|
|
38
|
+
modes: propModes = EMPTY_MODES,
|
|
39
|
+
style,
|
|
40
|
+
...rest
|
|
41
|
+
}) {
|
|
42
|
+
const {
|
|
43
|
+
modes: globalModes
|
|
44
|
+
} = useTokens();
|
|
45
|
+
const modes = useMemo(() => ({
|
|
46
|
+
...globalModes,
|
|
47
|
+
...propModes
|
|
48
|
+
}), [globalModes, propModes]);
|
|
49
|
+
const {
|
|
50
|
+
containerStyle,
|
|
51
|
+
processedChildren
|
|
52
|
+
} = useMemo(() => {
|
|
53
|
+
const gap = getVariableByName('slot/gap', modes) ?? 8;
|
|
54
|
+
const isHorizontal = layoutDirection === 'horizontal';
|
|
55
|
+
|
|
56
|
+
// Cross-axis stretch maps to "equal height" for a row and "fill width" for a
|
|
57
|
+
// column. Honour whichever flag matches the active direction.
|
|
58
|
+
const stretchCrossAxis = isHorizontal ? equalHeight : fillWidth;
|
|
59
|
+
const container = {
|
|
60
|
+
flexDirection: isHorizontal ? 'row' : 'column',
|
|
61
|
+
alignItems: stretchCrossAxis ? 'stretch' : alignCrossAxis ?? (isHorizontal ? 'flex-start' : 'stretch'),
|
|
62
|
+
justifyContent: justifyMainAxis ?? (isHorizontal ? 'center' : undefined),
|
|
63
|
+
alignSelf: 'stretch',
|
|
64
|
+
gap
|
|
65
|
+
};
|
|
66
|
+
const moded = children ? cloneChildrenWithModes(children, modes) : null;
|
|
67
|
+
const processed = stretchCrossAxis && moded ? injectChildStyle(moded, {
|
|
68
|
+
alignSelf: 'stretch'
|
|
69
|
+
}) : moded;
|
|
70
|
+
return {
|
|
71
|
+
containerStyle: container,
|
|
72
|
+
processedChildren: processed
|
|
73
|
+
};
|
|
74
|
+
}, [children, modes, layoutDirection, alignCrossAxis, justifyMainAxis, equalHeight, fillWidth]);
|
|
75
|
+
return /*#__PURE__*/_jsx(View, {
|
|
76
|
+
style: [containerStyle, style],
|
|
77
|
+
...rest,
|
|
78
|
+
children: processedChildren
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export default /*#__PURE__*/React.memo(Stack);
|
|
@@ -306,7 +306,16 @@ function SuggestiveSearch({
|
|
|
306
306
|
color: tokens.inputTextColor,
|
|
307
307
|
fontFamily: tokens.inputFontFamily,
|
|
308
308
|
fontSize: tokens.inputFontSize,
|
|
309
|
-
|
|
309
|
+
// iOS-only quirk: a single-line RNTextInput with `lineHeight` (45) far
|
|
310
|
+
// larger than `fontSize` (16) sinks the text to the bottom of the box
|
|
311
|
+
// instead of centering — iOS puts all the extra space ABOVE the glyphs.
|
|
312
|
+
// The row already owns the 45px height via `minHeight` + centering, so
|
|
313
|
+
// omit lineHeight on iOS (UITextField centers natively) and keep the
|
|
314
|
+
// token value on Android/Web where it renders correctly. Same fix as
|
|
315
|
+
// FormField — see facebook/react-native#39145 / #28012.
|
|
316
|
+
...(Platform.OS === 'ios' ? null : {
|
|
317
|
+
lineHeight: tokens.inputLineHeight
|
|
318
|
+
}),
|
|
310
319
|
fontWeight: tokens.inputFontWeight,
|
|
311
320
|
padding: 0,
|
|
312
321
|
margin: 0,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, Text, Pressable } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
|
|
6
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
|
|
7
7
|
import Button from '../Button/Button';
|
|
8
8
|
import NavArrow from '../NavArrow/NavArrow';
|
|
9
9
|
import StrengthIndicator from '../StrengthIndicator/StrengthIndicator';
|
|
@@ -29,7 +29,8 @@ function SummaryTile({
|
|
|
29
29
|
style,
|
|
30
30
|
titleStyle,
|
|
31
31
|
descriptionStyle,
|
|
32
|
-
accessibilityLabel
|
|
32
|
+
accessibilityLabel,
|
|
33
|
+
disableTruncation
|
|
33
34
|
}) {
|
|
34
35
|
const containerGap = getVariableByName('summaryTile/gap', modes) ?? 8;
|
|
35
36
|
const containerPadding = getVariableByName('summaryTile/padding', modes) ?? 0;
|
|
@@ -95,7 +96,7 @@ function SummaryTile({
|
|
|
95
96
|
},
|
|
96
97
|
children: [title ? /*#__PURE__*/_jsx(Text, {
|
|
97
98
|
style: [titleTextStyle, titleStyle],
|
|
98
|
-
|
|
99
|
+
...resolveTruncation(disableTruncation, 1),
|
|
99
100
|
children: title
|
|
100
101
|
}) : null, showIndicator ? /*#__PURE__*/_jsx(StrengthIndicator, {
|
|
101
102
|
confidence: confidence,
|