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
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, Text, Pressable, ScrollView, Platform } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
|
|
7
|
+
|
|
8
|
+
/* -------------------------------------------------------------------------------------------------
|
|
9
|
+
* Shared types & token resolution
|
|
10
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
11
|
+
|
|
12
|
+
/** Resolved styling for a header cell and a body cell, derived from design tokens. */
|
|
13
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const toWeight = w => typeof w === 'number' ? `${w}` : w;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Resolve every token the table family needs in one place. Sub-components call
|
|
18
|
+
* this with their cascaded `modes` so they render correctly both inside a
|
|
19
|
+
* `Table` and when used standalone. Fallbacks mirror the Figma node values
|
|
20
|
+
* (`tableCell/*`, `tableHeader/*`) so the component is faithful even before the
|
|
21
|
+
* tokens are published to the local store.
|
|
22
|
+
*/
|
|
23
|
+
function resolveTableTokens(modes) {
|
|
24
|
+
const headerFontFamily = getVariableByName('tableHeader/label/fontfamily', modes) ?? 'JioType Var';
|
|
25
|
+
const headerFontSize = getVariableByName('tableHeader/label/fontsize', modes) ?? 14;
|
|
26
|
+
const headerFontWeight = getVariableByName('tableHeader/label/fontweight', modes) ?? 600;
|
|
27
|
+
const cellFontFamily = getVariableByName('tableCell/label/fontfamily', modes) ?? 'JioType Var';
|
|
28
|
+
const cellFontSize = getVariableByName('tableCell/label/fontsize', modes) ?? 14;
|
|
29
|
+
const cellFontWeight = getVariableByName('tableCell/label/fontweight', modes) ?? 400;
|
|
30
|
+
return {
|
|
31
|
+
headerBg: getVariableByName('tableHeader/background/color', modes) ?? '#f5f5f5',
|
|
32
|
+
headerPaddingH: getVariableByName('tableHeader/padding/horizontal', modes) ?? 12,
|
|
33
|
+
headerPaddingV: getVariableByName('tableHeader/padding/vertical', modes) ?? 12,
|
|
34
|
+
headerText: {
|
|
35
|
+
color: getVariableByName('tableHeader/label/color', modes) ?? '#000000',
|
|
36
|
+
fontFamily: headerFontFamily,
|
|
37
|
+
fontSize: headerFontSize,
|
|
38
|
+
fontWeight: toWeight(headerFontWeight),
|
|
39
|
+
lineHeight: 20
|
|
40
|
+
},
|
|
41
|
+
cellBg: getVariableByName('tableCell/background/color', modes) ?? '#ffffff',
|
|
42
|
+
cellPaddingH: getVariableByName('tableCell/padding/horizontal', modes) ?? 12,
|
|
43
|
+
cellPaddingV: getVariableByName('tableCell/padding/vertical', modes) ?? 12,
|
|
44
|
+
cellText: {
|
|
45
|
+
color: getVariableByName('tableCell/label/color', modes) ?? '#000000',
|
|
46
|
+
fontFamily: cellFontFamily,
|
|
47
|
+
fontSize: cellFontSize,
|
|
48
|
+
fontWeight: toWeight(cellFontWeight),
|
|
49
|
+
lineHeight: 20
|
|
50
|
+
},
|
|
51
|
+
borderColor: getVariableByName('tableCell/border/color', modes) ?? '#eeeeee',
|
|
52
|
+
borderSize: getVariableByName('tableCell/border/size', modes) ?? 1
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const alignToJustify = align => align === 'center' ? 'center' : align === 'right' ? 'flex-end' : 'flex-start';
|
|
56
|
+
|
|
57
|
+
/** Renders text children through the resolved label style; passes elements through untouched. */
|
|
58
|
+
function renderCellContent(children, textStyle, align, modes) {
|
|
59
|
+
if (children == null || children === false) return null;
|
|
60
|
+
if (typeof children === 'string' || typeof children === 'number') {
|
|
61
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
62
|
+
style: [textStyle, {
|
|
63
|
+
textAlign: align
|
|
64
|
+
}],
|
|
65
|
+
children: children
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return cloneChildrenWithModes(children, modes);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* -------------------------------------------------------------------------------------------------
|
|
72
|
+
* Table.Cell — body cell (Figma `table-cell`, node 603:23)
|
|
73
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A single body cell. White background with a bottom + right divider, matching
|
|
77
|
+
* the Figma `table-cell` sub-component. String/number children are rendered
|
|
78
|
+
* with the token label style; any element is rendered as-is.
|
|
79
|
+
*/
|
|
80
|
+
function TableCell({
|
|
81
|
+
children,
|
|
82
|
+
align = 'left',
|
|
83
|
+
width,
|
|
84
|
+
flex = 1,
|
|
85
|
+
isLastColumn = false,
|
|
86
|
+
isLastRow = false,
|
|
87
|
+
modes = EMPTY_MODES,
|
|
88
|
+
style
|
|
89
|
+
}) {
|
|
90
|
+
const t = resolveTableTokens(modes);
|
|
91
|
+
return /*#__PURE__*/_jsx(View, {
|
|
92
|
+
style: [{
|
|
93
|
+
backgroundColor: t.cellBg,
|
|
94
|
+
flexDirection: 'row',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
justifyContent: alignToJustify(align),
|
|
97
|
+
paddingHorizontal: t.cellPaddingH,
|
|
98
|
+
paddingVertical: t.cellPaddingV,
|
|
99
|
+
borderColor: t.borderColor,
|
|
100
|
+
borderBottomWidth: isLastRow ? 0 : t.borderSize,
|
|
101
|
+
borderRightWidth: isLastColumn ? 0 : t.borderSize,
|
|
102
|
+
...(width != null ? {
|
|
103
|
+
width
|
|
104
|
+
} : {
|
|
105
|
+
flex,
|
|
106
|
+
minWidth: 0
|
|
107
|
+
})
|
|
108
|
+
}, style],
|
|
109
|
+
children: renderCellContent(children, t.cellText, align, modes)
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* -------------------------------------------------------------------------------------------------
|
|
114
|
+
* Table.HeaderCell — header cell (Figma `table header wrap`, node 603:21)
|
|
115
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A single header cell. Muted background with the bold token label style,
|
|
119
|
+
* matching the Figma `table header wrap` sub-component. Header cells carry no
|
|
120
|
+
* dividers; the header row draws a single bottom divider beneath them.
|
|
121
|
+
*/
|
|
122
|
+
function TableHeaderCell({
|
|
123
|
+
children,
|
|
124
|
+
align = 'left',
|
|
125
|
+
width,
|
|
126
|
+
flex = 1,
|
|
127
|
+
modes = EMPTY_MODES,
|
|
128
|
+
style
|
|
129
|
+
}) {
|
|
130
|
+
const t = resolveTableTokens(modes);
|
|
131
|
+
return /*#__PURE__*/_jsx(View, {
|
|
132
|
+
style: [{
|
|
133
|
+
backgroundColor: t.headerBg,
|
|
134
|
+
flexDirection: 'row',
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
justifyContent: alignToJustify(align),
|
|
137
|
+
paddingHorizontal: t.headerPaddingH,
|
|
138
|
+
paddingVertical: t.headerPaddingV,
|
|
139
|
+
...(width != null ? {
|
|
140
|
+
width
|
|
141
|
+
} : {
|
|
142
|
+
flex,
|
|
143
|
+
minWidth: 0
|
|
144
|
+
})
|
|
145
|
+
}, style],
|
|
146
|
+
children: renderCellContent(children, t.headerText, align, modes)
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* -------------------------------------------------------------------------------------------------
|
|
151
|
+
* Table.Header — row of header cells with a bottom divider
|
|
152
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
153
|
+
|
|
154
|
+
function TableHeader({
|
|
155
|
+
children,
|
|
156
|
+
modes = EMPTY_MODES,
|
|
157
|
+
style
|
|
158
|
+
}) {
|
|
159
|
+
const t = resolveTableTokens(modes);
|
|
160
|
+
return /*#__PURE__*/_jsx(View, {
|
|
161
|
+
style: [{
|
|
162
|
+
flexDirection: 'row',
|
|
163
|
+
width: '100%',
|
|
164
|
+
borderBottomWidth: t.borderSize,
|
|
165
|
+
borderBottomColor: t.borderColor
|
|
166
|
+
}, style],
|
|
167
|
+
children: cloneChildrenWithModes(children, modes)
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* -------------------------------------------------------------------------------------------------
|
|
172
|
+
* Table.Row — row of body cells
|
|
173
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
174
|
+
|
|
175
|
+
function TableRow({
|
|
176
|
+
children,
|
|
177
|
+
onPress,
|
|
178
|
+
modes = EMPTY_MODES,
|
|
179
|
+
style
|
|
180
|
+
}) {
|
|
181
|
+
const rowStyle = {
|
|
182
|
+
flexDirection: 'row',
|
|
183
|
+
width: '100%'
|
|
184
|
+
};
|
|
185
|
+
const content = cloneChildrenWithModes(children, modes);
|
|
186
|
+
if (onPress) {
|
|
187
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
188
|
+
onPress: onPress,
|
|
189
|
+
accessibilityRole: "button",
|
|
190
|
+
style: ({
|
|
191
|
+
pressed
|
|
192
|
+
}) => [rowStyle, pressed ? {
|
|
193
|
+
opacity: 0.6
|
|
194
|
+
} : null, style],
|
|
195
|
+
children: content
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return /*#__PURE__*/_jsx(View, {
|
|
199
|
+
style: [rowStyle, style],
|
|
200
|
+
children: content
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* -------------------------------------------------------------------------------------------------
|
|
205
|
+
* Table.Body — column container for rows
|
|
206
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
207
|
+
|
|
208
|
+
function TableBody({
|
|
209
|
+
children,
|
|
210
|
+
modes = EMPTY_MODES,
|
|
211
|
+
style
|
|
212
|
+
}) {
|
|
213
|
+
return /*#__PURE__*/_jsx(View, {
|
|
214
|
+
style: [{
|
|
215
|
+
width: '100%'
|
|
216
|
+
}, style],
|
|
217
|
+
children: cloneChildrenWithModes(children, modes)
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* -------------------------------------------------------------------------------------------------
|
|
222
|
+
* Table — root (Figma `Table`, node 5732:3710)
|
|
223
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Column definition for the data-driven `Table` API. `T` is the shape of one
|
|
227
|
+
* row record.
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Table renders structured rows and columns. It supports two complementary
|
|
232
|
+
* usage styles that share the same token-driven styling:
|
|
233
|
+
*
|
|
234
|
+
* 1. **Data-driven** (recommended): pass `columns` + `data`. The header and body
|
|
235
|
+
* are built for you, columns stay aligned, and per-column `align`/`width`/
|
|
236
|
+
* `flex`/`render` give full control.
|
|
237
|
+
*
|
|
238
|
+
* 2. **Composition**: pass `Table.Header` / `Table.Body` / `Table.Row` /
|
|
239
|
+
* `Table.Cell` / `Table.HeaderCell` as children for bespoke layouts. These
|
|
240
|
+
* sub-components are also exported standalone.
|
|
241
|
+
*
|
|
242
|
+
* Implementation of Figma node `5732:3710` (`Table`) with sub-components
|
|
243
|
+
* `603:23` (`table-cell`) and `603:21` (`table header wrap`).
|
|
244
|
+
*
|
|
245
|
+
* @component
|
|
246
|
+
*/
|
|
247
|
+
function Table({
|
|
248
|
+
columns,
|
|
249
|
+
data,
|
|
250
|
+
children,
|
|
251
|
+
showHeader = true,
|
|
252
|
+
getRowKey,
|
|
253
|
+
onRowPress,
|
|
254
|
+
scrollable = false,
|
|
255
|
+
accessibilityLabel,
|
|
256
|
+
modes = EMPTY_MODES,
|
|
257
|
+
style
|
|
258
|
+
}) {
|
|
259
|
+
const isComposition = children != null;
|
|
260
|
+
const body = isComposition ? cloneChildrenWithModes(children, modes) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
261
|
+
children: [showHeader && columns && columns.length > 0 && /*#__PURE__*/_jsx(TableHeader, {
|
|
262
|
+
modes: modes,
|
|
263
|
+
children: columns.map(col => /*#__PURE__*/_jsx(TableHeaderCell, {
|
|
264
|
+
align: col.headerAlign ?? col.align ?? 'left',
|
|
265
|
+
width: col.width,
|
|
266
|
+
flex: col.flex ?? 1,
|
|
267
|
+
modes: modes,
|
|
268
|
+
children: col.header ?? col.key
|
|
269
|
+
}, col.key))
|
|
270
|
+
}), columns && data && data.length > 0 && /*#__PURE__*/_jsx(TableBody, {
|
|
271
|
+
modes: modes,
|
|
272
|
+
children: data.map((row, rowIndex) => {
|
|
273
|
+
const isLastRow = rowIndex === data.length - 1;
|
|
274
|
+
return /*#__PURE__*/_jsx(TableRow, {
|
|
275
|
+
onPress: onRowPress ? () => onRowPress(row, rowIndex) : undefined,
|
|
276
|
+
modes: modes,
|
|
277
|
+
children: columns.map((col, colIndex) => /*#__PURE__*/_jsx(TableCell, {
|
|
278
|
+
align: col.align ?? 'left',
|
|
279
|
+
width: col.width,
|
|
280
|
+
flex: col.flex ?? 1,
|
|
281
|
+
isLastColumn: colIndex === columns.length - 1,
|
|
282
|
+
isLastRow: isLastRow,
|
|
283
|
+
modes: modes,
|
|
284
|
+
children: col.render ? col.render(row, rowIndex) : row[col.key]
|
|
285
|
+
}, col.key))
|
|
286
|
+
}, getRowKey?.(row, rowIndex) ?? rowIndex);
|
|
287
|
+
})
|
|
288
|
+
})]
|
|
289
|
+
});
|
|
290
|
+
const container = /*#__PURE__*/_jsx(View, {
|
|
291
|
+
accessibilityRole: Platform.OS === 'web' ? 'table' : undefined,
|
|
292
|
+
accessibilityLabel: accessibilityLabel,
|
|
293
|
+
style: [{
|
|
294
|
+
overflow: 'hidden'
|
|
295
|
+
}, !scrollable && {
|
|
296
|
+
width: '100%'
|
|
297
|
+
}, style],
|
|
298
|
+
children: body
|
|
299
|
+
});
|
|
300
|
+
if (scrollable) {
|
|
301
|
+
return /*#__PURE__*/_jsx(ScrollView, {
|
|
302
|
+
horizontal: true,
|
|
303
|
+
showsHorizontalScrollIndicator: false,
|
|
304
|
+
children: container
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
return container;
|
|
308
|
+
}
|
|
309
|
+
Table.Header = TableHeader;
|
|
310
|
+
Table.HeaderCell = TableHeaderCell;
|
|
311
|
+
Table.Body = TableBody;
|
|
312
|
+
Table.Row = TableRow;
|
|
313
|
+
Table.Cell = TableCell;
|
|
314
|
+
export { TableHeader, TableHeaderCell, TableBody, TableRow, TableCell };
|
|
315
|
+
export default Table;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Text as RNText } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
-
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
6
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
7
7
|
import Skeleton from '../../skeleton/Skeleton';
|
|
8
8
|
import { useSkeleton } from '../../skeleton/SkeletonGroup';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -18,6 +18,7 @@ function Text({
|
|
|
18
18
|
modes = EMPTY_MODES,
|
|
19
19
|
style,
|
|
20
20
|
numberOfLines,
|
|
21
|
+
disableTruncation,
|
|
21
22
|
loading,
|
|
22
23
|
skeletonWidth,
|
|
23
24
|
skeletonLines
|
|
@@ -70,7 +71,7 @@ function Text({
|
|
|
70
71
|
const content = children !== undefined && children !== null && children !== false ? children : text !== undefined ? text : 'Korem ipsum ';
|
|
71
72
|
return /*#__PURE__*/_jsx(RNText, {
|
|
72
73
|
style: [textStyle, style],
|
|
73
|
-
|
|
74
|
+
...resolveTruncation(disableTruncation, numberOfLines),
|
|
74
75
|
children: content
|
|
75
76
|
});
|
|
76
77
|
}
|
|
@@ -166,7 +166,15 @@ const TextInputBase = /*#__PURE__*/forwardRef(function TextInput({
|
|
|
166
166
|
flex: 1,
|
|
167
167
|
color: textColor,
|
|
168
168
|
fontSize,
|
|
169
|
-
lineHeight
|
|
169
|
+
// iOS-only quirk: a single-line RNTextInput with an explicit `lineHeight`
|
|
170
|
+
// larger than `fontSize` puts all the extra space ABOVE the glyphs, so the
|
|
171
|
+
// text/placeholder sits below center (iOS native font-metrics bug — see
|
|
172
|
+
// facebook/react-native#39145 / #28012). The container centers via
|
|
173
|
+
// `alignItems: 'center'` + `minHeight`, so omit lineHeight on iOS
|
|
174
|
+
// (UITextField centers natively) and keep it on Android/Web where it's fine.
|
|
175
|
+
...(Platform.OS === 'ios' ? null : {
|
|
176
|
+
lineHeight
|
|
177
|
+
}),
|
|
170
178
|
fontFamily,
|
|
171
179
|
fontWeight,
|
|
172
180
|
padding: 0,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { Text as RNText } 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
|
|
|
8
8
|
/**
|
|
9
9
|
* A single coloured run inside a {@link TextSegment}. Each run can carry its own
|
|
@@ -73,6 +73,7 @@ function TextSegment({
|
|
|
73
73
|
children,
|
|
74
74
|
textAlign = 'Left',
|
|
75
75
|
numberOfLines,
|
|
76
|
+
disableTruncation,
|
|
76
77
|
modes = EMPTY_MODES,
|
|
77
78
|
style
|
|
78
79
|
}) {
|
|
@@ -106,7 +107,7 @@ function TextSegment({
|
|
|
106
107
|
const content = hasChildren ? cloneChildrenWithModes(children, modes) : renderedSegments;
|
|
107
108
|
return /*#__PURE__*/_jsx(RNText, {
|
|
108
109
|
style: [baseStyle, style],
|
|
109
|
-
|
|
110
|
+
...resolveTruncation(disableTruncation, numberOfLines),
|
|
110
111
|
children: content
|
|
111
112
|
});
|
|
112
113
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { isValidElement, cloneElement } from 'react';
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
-
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
6
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
/**
|
|
9
9
|
* ThreadHero component displaying a central identity with avatar, title, subtitle, and caption.
|
|
@@ -14,7 +14,8 @@ export default function ThreadHero({
|
|
|
14
14
|
caption,
|
|
15
15
|
renderAvatar,
|
|
16
16
|
modes = EMPTY_MODES,
|
|
17
|
-
style
|
|
17
|
+
style,
|
|
18
|
+
disableTruncation
|
|
18
19
|
}) {
|
|
19
20
|
// Container Gaps
|
|
20
21
|
const containerGap = Number(getVariableByName('threadHero/gap', modes)) || 8;
|
|
@@ -95,14 +96,12 @@ export default function ThreadHero({
|
|
|
95
96
|
children: title
|
|
96
97
|
}) : null, subtitle ? /*#__PURE__*/_jsx(Text, {
|
|
97
98
|
style: subtitleStyle,
|
|
98
|
-
|
|
99
|
-
ellipsizeMode: "tail",
|
|
99
|
+
...resolveTruncation(disableTruncation, 1, 'tail'),
|
|
100
100
|
children: subtitle
|
|
101
101
|
}) : null]
|
|
102
102
|
}), caption ? /*#__PURE__*/_jsx(Text, {
|
|
103
103
|
style: captionStyle,
|
|
104
|
-
|
|
105
|
-
ellipsizeMode: "tail",
|
|
104
|
+
...resolveTruncation(disableTruncation, 1, 'tail'),
|
|
106
105
|
children: caption
|
|
107
106
|
}) : null]
|
|
108
107
|
});
|
|
@@ -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 { useTokens } from '../../design-tokens/JFSThemeProvider';
|
|
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
|
const TEXT_ALIGN_MAP = {
|
|
10
10
|
Left: 'left',
|
|
@@ -19,6 +19,7 @@ function Title({
|
|
|
19
19
|
textStyle,
|
|
20
20
|
subtitleStyle,
|
|
21
21
|
numberOfLines,
|
|
22
|
+
disableTruncation,
|
|
22
23
|
accessibilityLabel,
|
|
23
24
|
accessibilityHint,
|
|
24
25
|
...rest
|
|
@@ -88,7 +89,7 @@ function Title({
|
|
|
88
89
|
...rest,
|
|
89
90
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
90
91
|
style: [titleTextStyle, textStyle],
|
|
91
|
-
|
|
92
|
+
...resolveTruncation(disableTruncation, numberOfLines !== undefined ? numberOfLines : 1),
|
|
92
93
|
accessibilityElementsHidden: true,
|
|
93
94
|
importantForAccessibility: "no",
|
|
94
95
|
children: title
|
|
@@ -5,7 +5,7 @@ import { StyleSheet, Text } from 'react-native';
|
|
|
5
5
|
import Animated, { FadeOut, SlideInDown, SlideInUp } from 'react-native-reanimated';
|
|
6
6
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
7
7
|
import { closeToast } from './useToast';
|
|
8
|
-
import { EMPTY_MODES } from '../../utils/react-utils';
|
|
8
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
const ANIMATION_DURATION = 250;
|
|
11
11
|
function Toast({
|
|
@@ -15,7 +15,8 @@ function Toast({
|
|
|
15
15
|
onClose,
|
|
16
16
|
modes = EMPTY_MODES,
|
|
17
17
|
placement = 'bottom',
|
|
18
|
-
style
|
|
18
|
+
style,
|
|
19
|
+
disableTruncation
|
|
19
20
|
}) {
|
|
20
21
|
const timerRef = useRef(null);
|
|
21
22
|
useEffect(() => {
|
|
@@ -73,7 +74,7 @@ function Toast({
|
|
|
73
74
|
accessibilityLiveRegion: "assertive",
|
|
74
75
|
children: /*#__PURE__*/_jsx(Text, {
|
|
75
76
|
style: textStyle,
|
|
76
|
-
|
|
77
|
+
...resolveTruncation(disableTruncation, 2),
|
|
77
78
|
children: title
|
|
78
79
|
})
|
|
79
80
|
});
|
|
@@ -6,7 +6,7 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
|
|
|
6
6
|
import MoneyValue from '../MoneyValue/MoneyValue';
|
|
7
7
|
import TransactionStatus from '../TransactionStatus/TransactionStatus';
|
|
8
8
|
import NavArrow from '../NavArrow/NavArrow';
|
|
9
|
-
import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
|
|
9
|
+
import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
|
|
10
10
|
import { usePressableWebSupport } from '../../utils/web-platform-utils';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
/**
|
|
@@ -40,6 +40,7 @@ function TransactionBubble({
|
|
|
40
40
|
accessibilityLabel,
|
|
41
41
|
accessibilityHint,
|
|
42
42
|
webAccessibilityProps,
|
|
43
|
+
disableTruncation,
|
|
43
44
|
...rest
|
|
44
45
|
}) {
|
|
45
46
|
const resolvedModes = {
|
|
@@ -109,7 +110,7 @@ function TransactionBubble({
|
|
|
109
110
|
},
|
|
110
111
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
111
112
|
style: descriptionStyle,
|
|
112
|
-
|
|
113
|
+
...resolveTruncation(disableTruncation, 1),
|
|
113
114
|
children: description
|
|
114
115
|
}), /*#__PURE__*/_jsx(MoneyValue, {
|
|
115
116
|
value: value,
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { View, Text } 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
|
// --- Internal Icon Component ---
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -37,7 +37,8 @@ export default function TransactionStatus({
|
|
|
37
37
|
status = 'Expired',
|
|
38
38
|
date = '20 Mar 2025',
|
|
39
39
|
modes = EMPTY_MODES,
|
|
40
|
-
style
|
|
40
|
+
style,
|
|
41
|
+
disableTruncation
|
|
41
42
|
}) {
|
|
42
43
|
const gap = Number(getVariableByName('transactionBubble/statusWrap/gap', modes)) || 4;
|
|
43
44
|
// Using 'transactionStatus' tokens for text
|
|
@@ -70,7 +71,7 @@ export default function TransactionStatus({
|
|
|
70
71
|
modes: modes
|
|
71
72
|
}), /*#__PURE__*/_jsxs(Text, {
|
|
72
73
|
style: textStyle,
|
|
73
|
-
|
|
74
|
+
...resolveTruncation(disableTruncation, 1),
|
|
74
75
|
children: [status, " \xB7 ", date]
|
|
75
76
|
})]
|
|
76
77
|
});
|
|
@@ -4,7 +4,7 @@ import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
|
4
4
|
import { Pressable, View, Text, Platform } 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 } from '../../utils/react-utils';
|
|
7
|
+
import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
|
|
8
8
|
import MediaSource from '../../utils/MediaSource';
|
|
9
9
|
import Icon from '../../icons/Icon';
|
|
10
10
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -107,6 +107,7 @@ function UpiHandle({
|
|
|
107
107
|
onPress,
|
|
108
108
|
onClick,
|
|
109
109
|
disabled,
|
|
110
|
+
disableTruncation,
|
|
110
111
|
// accessibilityLabel is accepted on the type for API back-compat; the
|
|
111
112
|
// wrapper renders `accessibilityLabel={undefined}` because the inner Text
|
|
112
113
|
// already carries the label.
|
|
@@ -169,8 +170,7 @@ function UpiHandle({
|
|
|
169
170
|
})
|
|
170
171
|
}), /*#__PURE__*/_jsx(Text, {
|
|
171
172
|
style: tokens.labelStyle,
|
|
172
|
-
|
|
173
|
-
ellipsizeMode: "tail",
|
|
173
|
+
...resolveTruncation(disableTruncation, 1, 'tail'),
|
|
174
174
|
accessibilityElementsHidden: true,
|
|
175
175
|
importantForAccessibility: "no",
|
|
176
176
|
children: label
|
|
@@ -73,6 +73,7 @@ export { default as Screen } from './Screen/Screen';
|
|
|
73
73
|
export { default as Section } from './Section/Section';
|
|
74
74
|
export { default as Slider } from './Slider/Slider';
|
|
75
75
|
export { default as Slot } from './Slot/Slot';
|
|
76
|
+
export { default as Stack } from './Stack/Stack';
|
|
76
77
|
export { default as Spinner } from './Spinner/Spinner';
|
|
77
78
|
export { default as Stepper } from './Stepper/Stepper';
|
|
78
79
|
export { Step } from './Stepper/Step';
|
|
@@ -127,6 +128,7 @@ export { default as Popup } from './Popup/Popup';
|
|
|
127
128
|
export { default as PortfolioHero } from './PortfolioHero/PortfolioHero';
|
|
128
129
|
export { default as PlanComparisonCard } from './PlanComparisonCard/PlanComparisonCard';
|
|
129
130
|
export { default as CompareTable } from './CompareTable/CompareTable';
|
|
131
|
+
export { default as Table, TableHeader, TableHeaderCell, TableBody, TableRow, TableCell } from './Table/Table';
|
|
130
132
|
export { default as PoweredByLabel } from './PoweredByLabel/PoweredByLabel';
|
|
131
133
|
export { default as ProductLabel } from './ProductLabel/ProductLabel';
|
|
132
134
|
export { default as ProductMerchandisingCard } from './ProductMerchandisingCard/ProductMerchandisingCard';
|