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
|
@@ -133,7 +133,8 @@ function DonutChart({
|
|
|
133
133
|
style,
|
|
134
134
|
valueStyle,
|
|
135
135
|
labelStyle,
|
|
136
|
-
accessibilityLabel
|
|
136
|
+
accessibilityLabel,
|
|
137
|
+
disableTruncation
|
|
137
138
|
}) {
|
|
138
139
|
const {
|
|
139
140
|
modes: globalModes
|
|
@@ -231,7 +232,7 @@ function DonutChart({
|
|
|
231
232
|
fontWeight: valueFontWeight,
|
|
232
233
|
textAlign: 'center'
|
|
233
234
|
}, valueStyle],
|
|
234
|
-
|
|
235
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
235
236
|
children: value
|
|
236
237
|
}) : null, showLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
237
238
|
style: [{
|
|
@@ -242,7 +243,7 @@ function DonutChart({
|
|
|
242
243
|
fontWeight: labelFontWeight,
|
|
243
244
|
textAlign: 'center'
|
|
244
245
|
}, labelStyle],
|
|
245
|
-
|
|
246
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
246
247
|
children: label
|
|
247
248
|
}) : null]
|
|
248
249
|
}) : null]
|
|
@@ -69,7 +69,8 @@ function DropdownItem({
|
|
|
69
69
|
style,
|
|
70
70
|
labelStyle,
|
|
71
71
|
accessibilityLabel,
|
|
72
|
-
accessibilityHint
|
|
72
|
+
accessibilityHint,
|
|
73
|
+
disableTruncation
|
|
73
74
|
}) {
|
|
74
75
|
const {
|
|
75
76
|
modes: globalModes
|
|
@@ -138,7 +139,7 @@ function DropdownItem({
|
|
|
138
139
|
...a11yProps,
|
|
139
140
|
children: [processedLeading, children != null ? children : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
140
141
|
style: [textStyle, labelStyle],
|
|
141
|
-
|
|
142
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
142
143
|
children: label
|
|
143
144
|
}), customTrailing, showDefaultCheck && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
144
145
|
name: "ic_confirm",
|
|
@@ -161,7 +161,8 @@ const DropdownInput = /*#__PURE__*/(0, _react.forwardRef)(function DropdownInput
|
|
|
161
161
|
accessibilityLabel,
|
|
162
162
|
accessibilityHint,
|
|
163
163
|
onFocus,
|
|
164
|
-
onBlur
|
|
164
|
+
onBlur,
|
|
165
|
+
disableTruncation
|
|
165
166
|
}, ref) {
|
|
166
167
|
// ---------------- Modes ----------------
|
|
167
168
|
const {
|
|
@@ -548,7 +549,7 @@ const DropdownInput = /*#__PURE__*/(0, _react.forwardRef)(function DropdownInput
|
|
|
548
549
|
style: [valueTextStyle, !hasValue && {
|
|
549
550
|
color: placeholderColor
|
|
550
551
|
}],
|
|
551
|
-
|
|
552
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
552
553
|
children: displayLabel
|
|
553
554
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
554
555
|
accessibilityElementsHidden: true,
|
|
@@ -64,6 +64,7 @@ function ExpandableCheckbox({
|
|
|
64
64
|
readMoreLabel = 'Read more',
|
|
65
65
|
readLessLabel = 'Read less',
|
|
66
66
|
collapsedLines = 1,
|
|
67
|
+
disableTruncation = false,
|
|
67
68
|
modes = _reactUtils.EMPTY_MODES,
|
|
68
69
|
style,
|
|
69
70
|
labelStyle,
|
|
@@ -136,7 +137,7 @@ function ExpandableCheckbox({
|
|
|
136
137
|
}), [modes]);
|
|
137
138
|
const a11yLabel = accessibilityLabel ?? (typeof label === 'string' ? label : undefined);
|
|
138
139
|
const buttonLabel = isExpanded ? readLessLabel : readMoreLabel;
|
|
139
|
-
const labelNumberOfLinesProps = !isExpanded && collapsedLines > 0 ? {
|
|
140
|
+
const labelNumberOfLinesProps = !disableTruncation && !isExpanded && collapsedLines > 0 ? {
|
|
140
141
|
numberOfLines: collapsedLines,
|
|
141
142
|
ellipsizeMode: 'tail'
|
|
142
143
|
} : null;
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
10
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
11
|
var _reactUtils = require("../../utils/react-utils");
|
|
12
|
+
var _webPlatformUtils = require("../../utils/web-platform-utils");
|
|
12
13
|
var _SupportText = _interopRequireDefault(require("../SupportText/SupportText"));
|
|
13
14
|
var _Icon = _interopRequireDefault(require("../../icons/Icon"));
|
|
14
15
|
var _Form = require("../Form/Form");
|
|
@@ -208,6 +209,21 @@ const FormField = /*#__PURE__*/(0, _react.forwardRef)(function FormField({
|
|
|
208
209
|
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
209
210
|
const interactive = !isDisabled && !isReadOnly;
|
|
210
211
|
|
|
212
|
+
// Internal handles so we can (a) imperatively blur the input and (b) detect
|
|
213
|
+
// outside presses. The forwarded `ref` is merged in below, so the public
|
|
214
|
+
// ref API (focus/blur/clear/isFocused) is unchanged for consumers.
|
|
215
|
+
const inputRef = (0, _react.useRef)(null);
|
|
216
|
+
const rootRef = (0, _react.useRef)(null);
|
|
217
|
+
// Stable merged ref so React doesn't detach/reattach (and momentarily null
|
|
218
|
+
// `inputRef.current`) on every render.
|
|
219
|
+
const mergedInputRef = (0, _react.useMemo)(() => (0, _reactUtils.mergeRefs)(inputRef, ref), [ref]);
|
|
220
|
+
|
|
221
|
+
// Web: pressing an INTERACTIVE element outside the field (Button, link,
|
|
222
|
+
// another pressable) often does not move DOM focus, so the native `blur`
|
|
223
|
+
// never fires and the field stays visually "Active". Force a blur on any
|
|
224
|
+
// outside pointer press while focused. No-op on native.
|
|
225
|
+
(0, _webPlatformUtils.useWebOutsidePress)(rootRef, (0, _react.useCallback)(() => inputRef.current?.blur(), []), isFocused);
|
|
226
|
+
|
|
211
227
|
// FormField States cascade — error > read only/disabled > active (focused) > idle.
|
|
212
228
|
// Disabled maps to "Read Only" since there is no dedicated disabled mode and
|
|
213
229
|
// the visual treatment is closest. This is only the DEFAULT — an explicit
|
|
@@ -290,7 +306,30 @@ const FormField = /*#__PURE__*/(0, _react.forwardRef)(function FormField({
|
|
|
290
306
|
color: tokens.inputTextColor,
|
|
291
307
|
fontFamily: tokens.inputFontFamily,
|
|
292
308
|
fontSize: tokens.inputFontSize,
|
|
293
|
-
lineHeight: tokens.inputLineHeight
|
|
309
|
+
// ⚠️ DO NOT change to an unconditional `lineHeight: tokens.inputLineHeight`.
|
|
310
|
+
// This has regressed twice — read this before "simplifying" it.
|
|
311
|
+
//
|
|
312
|
+
// `inputLineHeight` comes from the Figma token `formField/input/label`
|
|
313
|
+
// ("16/45"), which is a 16px font inside a 45px ROW, i.e. it is the row
|
|
314
|
+
// HEIGHT, not the text leading. The row height is already applied via
|
|
315
|
+
// `inputRowStyle.minHeight` + `alignItems: 'center'`, so the text never
|
|
316
|
+
// needs this value as its own `lineHeight`.
|
|
317
|
+
//
|
|
318
|
+
// Passing a `lineHeight` (45) that is much larger than `fontSize` (16)
|
|
319
|
+
// onto a single-line RNTextInput breaks ONLY iOS: iOS puts ALL the extra
|
|
320
|
+
// vertical space ABOVE the glyphs, so the text/placeholder sinks to the
|
|
321
|
+
// bottom of the box instead of centering. Android and Web distribute the
|
|
322
|
+
// space evenly and look correct. This is a long-standing iOS native
|
|
323
|
+
// font-metrics bug in UITextField — see facebook/react-native#39145 and
|
|
324
|
+
// #28012; the documented workaround is exactly "drop lineHeight on the
|
|
325
|
+
// single-line input and let a wrapper center it". A single-line UITextField
|
|
326
|
+
// with no lineHeight centers its text natively (see react-native#56774).
|
|
327
|
+
//
|
|
328
|
+
// So: omit lineHeight on iOS (native centering via the row), and keep the
|
|
329
|
+
// token value on Android/Web where it already renders correctly.
|
|
330
|
+
...(_reactNative.Platform.OS === 'ios' ? null : {
|
|
331
|
+
lineHeight: tokens.inputLineHeight
|
|
332
|
+
}),
|
|
294
333
|
fontWeight: tokens.inputFontWeight,
|
|
295
334
|
padding: 0,
|
|
296
335
|
margin: 0,
|
|
@@ -327,6 +366,7 @@ const FormField = /*#__PURE__*/(0, _react.forwardRef)(function FormField({
|
|
|
327
366
|
// -- Accessibility ------------------------------------------------------
|
|
328
367
|
const resolvedA11yLabel = accessibilityLabel || label || placeholder || 'Form field';
|
|
329
368
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
369
|
+
ref: rootRef,
|
|
330
370
|
style: [wrapperStyle, style],
|
|
331
371
|
pointerEvents: isDisabled ? 'none' : 'auto',
|
|
332
372
|
testID: testID,
|
|
@@ -347,7 +387,7 @@ const FormField = /*#__PURE__*/(0, _react.forwardRef)(function FormField({
|
|
|
347
387
|
importantForAccessibility: "no",
|
|
348
388
|
children: processedLeading
|
|
349
389
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
350
|
-
ref:
|
|
390
|
+
ref: mergedInputRef,
|
|
351
391
|
style: [inputTextStyles, inputTextStyle],
|
|
352
392
|
value: value ?? '',
|
|
353
393
|
onChangeText: handleChangeText,
|
|
@@ -41,7 +41,7 @@ const toFontWeight = (value, fallback) => {
|
|
|
41
41
|
};
|
|
42
42
|
const getStrokeColor = (style, fallback) => {
|
|
43
43
|
const flattened = _reactNative.StyleSheet.flatten(style);
|
|
44
|
-
return typeof flattened.backgroundColor === 'string' ? flattened.backgroundColor : fallback;
|
|
44
|
+
return flattened && typeof flattened.backgroundColor === 'string' ? flattened.backgroundColor : fallback;
|
|
45
45
|
};
|
|
46
46
|
function Gauge({
|
|
47
47
|
value = 84,
|
|
@@ -39,7 +39,8 @@ function HoldingsCard({
|
|
|
39
39
|
onPress,
|
|
40
40
|
modes = _reactUtils.EMPTY_MODES,
|
|
41
41
|
style,
|
|
42
|
-
testID
|
|
42
|
+
testID,
|
|
43
|
+
disableTruncation
|
|
43
44
|
}) {
|
|
44
45
|
// ---- Container tokens ----
|
|
45
46
|
const containerFill = (0, _figmaVariablesResolver.getVariableByName)('holdingsCard/container/fill', modes) || '#fef4e5';
|
|
@@ -191,7 +192,7 @@ function HoldingsCard({
|
|
|
191
192
|
lineHeight: detailValueLineHeight,
|
|
192
193
|
fontWeight: detailValueFontWeight
|
|
193
194
|
},
|
|
194
|
-
|
|
195
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
195
196
|
children: item.value
|
|
196
197
|
})]
|
|
197
198
|
}, `${rowIndex}-${colIndex}`)), row.length < GRID_COLUMNS && Array.from({
|
|
@@ -88,6 +88,7 @@ function InstitutionBadge({
|
|
|
88
88
|
style,
|
|
89
89
|
labelStyle,
|
|
90
90
|
accessibilityLabel,
|
|
91
|
+
disableTruncation,
|
|
91
92
|
...rest
|
|
92
93
|
}) {
|
|
93
94
|
const {
|
|
@@ -124,7 +125,7 @@ function InstitutionBadge({
|
|
|
124
125
|
})
|
|
125
126
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
126
127
|
style: [tokens.labelStyle, labelStyle],
|
|
127
|
-
|
|
128
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
128
129
|
children: label
|
|
129
130
|
})]
|
|
130
131
|
});
|
|
@@ -48,6 +48,7 @@ function ListGroup({
|
|
|
48
48
|
style,
|
|
49
49
|
accessibilityLabel,
|
|
50
50
|
accessibilityHint,
|
|
51
|
+
disableTruncation,
|
|
51
52
|
...rest
|
|
52
53
|
}) {
|
|
53
54
|
// Resolve container tokens
|
|
@@ -100,7 +101,7 @@ function ListGroup({
|
|
|
100
101
|
style: [labelStyle, processedSlot && {
|
|
101
102
|
marginBottom: gap
|
|
102
103
|
}],
|
|
103
|
-
|
|
104
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
104
105
|
accessibilityElementsHidden: true,
|
|
105
106
|
importantForAccessibility: "no",
|
|
106
107
|
children: label
|
|
@@ -191,6 +191,7 @@ function ListItemImpl({
|
|
|
191
191
|
accessibilityHint,
|
|
192
192
|
accessibilityState,
|
|
193
193
|
webAccessibilityProps,
|
|
194
|
+
disableTruncation,
|
|
194
195
|
...rest
|
|
195
196
|
}) {
|
|
196
197
|
const tokens = (0, _react.useMemo)(() => resolveListItemTokens(modes), [modes]);
|
|
@@ -245,7 +246,7 @@ function ListItemImpl({
|
|
|
245
246
|
const displayText = layout === 'Vertical' ? supportText.replace(/ /g, '\n') : supportText;
|
|
246
247
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
247
248
|
style: layout === 'Vertical' ? [tokens.supportTextStyle, verticalSupportTextOverride] : tokens.supportTextStyle,
|
|
248
|
-
|
|
249
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, layout === 'Horizontal' ? 2 : undefined),
|
|
249
250
|
children: displayText
|
|
250
251
|
});
|
|
251
252
|
};
|
|
@@ -278,7 +279,7 @@ function ListItemImpl({
|
|
|
278
279
|
},
|
|
279
280
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
280
281
|
style: tokens.titleTextStyle,
|
|
281
|
-
|
|
282
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
282
283
|
children: title
|
|
283
284
|
}), showSupportText && renderSupportContent()]
|
|
284
285
|
}), processedTrailing ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
@@ -14,7 +14,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _reactNative = require("react-native");
|
|
15
15
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
16
16
|
var _Image = _interopRequireDefault(require("../Image/Image"));
|
|
17
|
-
var _GlassFill = _interopRequireDefault(require("
|
|
17
|
+
var _GlassFill = _interopRequireDefault(require("../../utils/GlassFill/GlassFill"));
|
|
18
18
|
var _reactUtils = require("../../utils/react-utils");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -198,7 +198,9 @@ function Footer({
|
|
|
198
198
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GlassFill.default, {
|
|
199
199
|
tint: tint,
|
|
200
200
|
intensity: intensity,
|
|
201
|
-
overlayColor: glassBgColor
|
|
201
|
+
overlayColor: glassBgColor,
|
|
202
|
+
webBlurScale: 0.3,
|
|
203
|
+
webBlurMaxPx: 30
|
|
202
204
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
203
205
|
style: {
|
|
204
206
|
flexDirection: 'row',
|
|
@@ -27,7 +27,8 @@ function MetricLegendItem({
|
|
|
27
27
|
style,
|
|
28
28
|
indicatorStyle,
|
|
29
29
|
labelStyle,
|
|
30
|
-
valueStyle
|
|
30
|
+
valueStyle,
|
|
31
|
+
disableTruncation
|
|
31
32
|
}) {
|
|
32
33
|
const gap = (0, _figmaVariablesResolver.getVariableByName)('metricLegendItem/gap', modes) ?? 4;
|
|
33
34
|
const textWrapGap = (0, _figmaVariablesResolver.getVariableByName)('metricLegendItem/textWrap/gap', modes) ?? 4;
|
|
@@ -92,7 +93,7 @@ function MetricLegendItem({
|
|
|
92
93
|
lineHeight: valueLineHeight,
|
|
93
94
|
fontWeight: valueFontWeight
|
|
94
95
|
}, valueStyle],
|
|
95
|
-
|
|
96
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
96
97
|
children: value
|
|
97
98
|
})]
|
|
98
99
|
})]
|
|
@@ -81,7 +81,8 @@ function CalendarGlyph({
|
|
|
81
81
|
modes: propModes = _reactUtils.EMPTY_MODES,
|
|
82
82
|
style,
|
|
83
83
|
labelStyle,
|
|
84
|
-
accessibilityLabel
|
|
84
|
+
accessibilityLabel,
|
|
85
|
+
disableTruncation
|
|
85
86
|
}) {
|
|
86
87
|
const {
|
|
87
88
|
modes: globalModes
|
|
@@ -126,7 +127,7 @@ function CalendarGlyph({
|
|
|
126
127
|
gap
|
|
127
128
|
}, style],
|
|
128
129
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
129
|
-
|
|
130
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
130
131
|
style: [{
|
|
131
132
|
color: foreground,
|
|
132
133
|
fontFamily,
|
|
@@ -188,7 +189,8 @@ function MonthlyStatusGrid({
|
|
|
188
189
|
glyphStyle,
|
|
189
190
|
labelStyle,
|
|
190
191
|
legendStyle,
|
|
191
|
-
accessibilityLabel
|
|
192
|
+
accessibilityLabel,
|
|
193
|
+
disableTruncation
|
|
192
194
|
}) {
|
|
193
195
|
const {
|
|
194
196
|
modes: globalModes
|
|
@@ -245,6 +247,7 @@ function MonthlyStatusGrid({
|
|
|
245
247
|
label: label,
|
|
246
248
|
status: month.status,
|
|
247
249
|
modes: glyphModes,
|
|
250
|
+
disableTruncation: disableTruncation,
|
|
248
251
|
...(glyphStyle !== undefined ? {
|
|
249
252
|
style: glyphStyle
|
|
250
253
|
} : {}),
|
|
@@ -62,7 +62,8 @@ function PoweredByLabel({
|
|
|
62
62
|
style,
|
|
63
63
|
textStyle,
|
|
64
64
|
imageStyle,
|
|
65
|
-
accessibilityLabel
|
|
65
|
+
accessibilityLabel,
|
|
66
|
+
disableTruncation
|
|
66
67
|
}) {
|
|
67
68
|
const {
|
|
68
69
|
modes: globalModes
|
|
@@ -127,7 +128,7 @@ function PoweredByLabel({
|
|
|
127
128
|
style: [labelTextStyle, textStyle],
|
|
128
129
|
accessibilityElementsHidden: true,
|
|
129
130
|
importantForAccessibility: "no",
|
|
130
|
-
|
|
131
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
131
132
|
children: label
|
|
132
133
|
}), renderImage()]
|
|
133
134
|
});
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _maskedView = _interopRequireDefault(require("@react-native-masked-view/masked-view"));
|
|
9
10
|
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
10
11
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
11
12
|
var _reactUtils = require("../../utils/react-utils");
|
|
@@ -13,10 +14,16 @@ var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
|
13
14
|
var _Badge = _interopRequireDefault(require("../Badge/Badge"));
|
|
14
15
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
15
16
|
var _Image = _interopRequireDefault(require("../Image/Image"));
|
|
16
|
-
var _GlassFill = _interopRequireDefault(require("
|
|
17
|
+
var _GlassFill = _interopRequireDefault(require("../../utils/GlassFill/GlassFill"));
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
|
+
function normalizeImageSource(src) {
|
|
22
|
+
if (src == null) return undefined;
|
|
23
|
+
return typeof src === 'string' ? {
|
|
24
|
+
uri: src
|
|
25
|
+
} : src;
|
|
26
|
+
}
|
|
20
27
|
/**
|
|
21
28
|
* ProductMerchandisingCard — a full-bleed image card (Figma node 5277:317)
|
|
22
29
|
* with a top header (avatar + badge) and a bottom **glass footer** that
|
|
@@ -57,11 +64,15 @@ function ProductMerchandisingCard({
|
|
|
57
64
|
height = 223,
|
|
58
65
|
modes = _reactUtils.EMPTY_MODES,
|
|
59
66
|
style,
|
|
60
|
-
accessibilityLabel
|
|
67
|
+
accessibilityLabel,
|
|
68
|
+
disableTruncation
|
|
61
69
|
}) {
|
|
62
|
-
// Unique gradient
|
|
70
|
+
// Unique gradient ids so multiple cards on one (web) document never collide.
|
|
63
71
|
const rawId = (0, _react.useId)();
|
|
64
|
-
const
|
|
72
|
+
const safeId = rawId.replace(/[^a-zA-Z0-9_-]/g, '');
|
|
73
|
+
const scrimId = `pmc-footer-scrim-${safeId}`;
|
|
74
|
+
const blurMaskId = `pmc-footer-blurmask-${safeId}`;
|
|
75
|
+
const normalizedImageSource = (0, _react.useMemo)(() => normalizeImageSource(imageSource), [imageSource]);
|
|
65
76
|
const tokens = (0, _react.useMemo)(() => resolveTokens(modes), [modes]);
|
|
66
77
|
const containerStyle = {
|
|
67
78
|
height,
|
|
@@ -98,21 +109,25 @@ function ProductMerchandisingCard({
|
|
|
98
109
|
monogram: avatarMonogram,
|
|
99
110
|
modes: avatarModes
|
|
100
111
|
}) : null;
|
|
101
|
-
|
|
112
|
+
|
|
113
|
+
// The footer "special badge" is now the shared <Badge type="glass">. The
|
|
114
|
+
// hardcoded literals that defined its look (warm frosted overlay, gentle
|
|
115
|
+
// 5px blur, 6/2 padding, 4px radius, weight-500 white label) are preserved
|
|
116
|
+
// 1:1 via the glass overrides + `style`/`labelStyle`, and the optional
|
|
117
|
+
// `specialBadgeIcon` maps to Badge's `leading` slot — so every existing
|
|
118
|
+
// instantiation renders byte-for-byte the same as before.
|
|
119
|
+
const footerSpecialBadge = specialBadge ?? (specialBadgeLabel != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
120
|
+
type: "glass",
|
|
121
|
+
label: specialBadgeLabel,
|
|
122
|
+
leading: specialBadgeIcon,
|
|
123
|
+
glassOverlayColor: SPECIAL_BADGE_BG,
|
|
124
|
+
glassIntensity: SPECIAL_BADGE_INTENSITY,
|
|
125
|
+
modes: modes,
|
|
102
126
|
style: styles.specialBadge,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
style: styles.specialBadgeFill
|
|
108
|
-
}), specialBadgeIcon != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
109
|
-
style: styles.specialBadgeIcon,
|
|
110
|
-
children: specialBadgeIcon
|
|
111
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
112
|
-
style: tokens.specialBadgeText,
|
|
113
|
-
numberOfLines: 1,
|
|
114
|
-
children: specialBadgeLabel
|
|
115
|
-
})]
|
|
127
|
+
labelStyle: tokens.specialBadgeText,
|
|
128
|
+
...(disableTruncation != null ? {
|
|
129
|
+
disableTruncation
|
|
130
|
+
} : null)
|
|
116
131
|
}) : null);
|
|
117
132
|
|
|
118
133
|
// The Figma CTA uses the brand "Secondary" appearance (purple fill, white
|
|
@@ -147,7 +162,62 @@ function ProductMerchandisingCard({
|
|
|
147
162
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
148
163
|
style: tokens.footer,
|
|
149
164
|
pointerEvents: "box-none",
|
|
150
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
165
|
+
children: [normalizedImageSource != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
166
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
167
|
+
pointerEvents: "none",
|
|
168
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_maskedView.default, {
|
|
169
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
170
|
+
maskElement: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.default, {
|
|
171
|
+
width: "100%",
|
|
172
|
+
height: "100%",
|
|
173
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Defs, {
|
|
174
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient, {
|
|
175
|
+
id: blurMaskId,
|
|
176
|
+
x1: "0",
|
|
177
|
+
y1: "0",
|
|
178
|
+
x2: "0",
|
|
179
|
+
y2: "1",
|
|
180
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
181
|
+
offset: "0",
|
|
182
|
+
stopColor: "#000000",
|
|
183
|
+
stopOpacity: 0
|
|
184
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
185
|
+
offset: "0.35",
|
|
186
|
+
stopColor: "#000000",
|
|
187
|
+
stopOpacity: 0.5
|
|
188
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
189
|
+
offset: "0.7",
|
|
190
|
+
stopColor: "#000000",
|
|
191
|
+
stopOpacity: 0.92
|
|
192
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
193
|
+
offset: "1",
|
|
194
|
+
stopColor: "#000000",
|
|
195
|
+
stopOpacity: 1
|
|
196
|
+
})]
|
|
197
|
+
})
|
|
198
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Rect, {
|
|
199
|
+
x: "0",
|
|
200
|
+
y: "0",
|
|
201
|
+
width: "100%",
|
|
202
|
+
height: "100%",
|
|
203
|
+
fill: `url(#${blurMaskId})`
|
|
204
|
+
})]
|
|
205
|
+
}),
|
|
206
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
207
|
+
source: normalizedImageSource,
|
|
208
|
+
blurRadius: tokens.imageBlurRadius,
|
|
209
|
+
resizeMode: "cover",
|
|
210
|
+
style: {
|
|
211
|
+
position: 'absolute',
|
|
212
|
+
left: 0,
|
|
213
|
+
right: 0,
|
|
214
|
+
bottom: 0,
|
|
215
|
+
width: '100%',
|
|
216
|
+
height
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GlassFill.default, {
|
|
151
221
|
tint: "dark",
|
|
152
222
|
intensity: tokens.blurIntensity,
|
|
153
223
|
progressive: true
|
|
@@ -188,11 +258,11 @@ function ProductMerchandisingCard({
|
|
|
188
258
|
style: tokens.textWrap,
|
|
189
259
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
190
260
|
style: tokens.title,
|
|
191
|
-
|
|
261
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
192
262
|
children: title
|
|
193
263
|
}), subtitle != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
194
264
|
style: tokens.subtitle,
|
|
195
|
-
|
|
265
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
196
266
|
children: subtitle
|
|
197
267
|
}) : null]
|
|
198
268
|
}), footerCta]
|
|
@@ -263,9 +333,20 @@ function resolveTokens(modes) {
|
|
|
263
333
|
const sbSize = asNum((0, _figmaVariablesResolver.getVariableByName)('productMerchandisingcard/specialbadge/text/fontsize', modes), 12);
|
|
264
334
|
const sbFamily = asStr((0, _figmaVariablesResolver.getVariableByName)('productMerchandisingcard/specialbadge/text/fontfamily', modes), 'JioType Var');
|
|
265
335
|
const sbWeight = asStr((0, _figmaVariablesResolver.getVariableByName)('productMerchandisingcard/specialbadge/text/fontweight', modes), '500');
|
|
336
|
+
|
|
337
|
+
// `Image.blurRadius` is interpreted differently per platform — iOS applies a
|
|
338
|
+
// strong Gaussian while Android's IterativeBoxBlur is gentler at the same
|
|
339
|
+
// numeric radius — so we tune each platform to land on the same perceived
|
|
340
|
+
// "minimal" frosted strength as the Figma design.
|
|
341
|
+
const imageBlurRadius = _reactNative.Platform.select({
|
|
342
|
+
ios: Math.max(6, Math.round(blurRadius * 0.5)),
|
|
343
|
+
android: Math.max(12, Math.round(blurRadius * 0.95)),
|
|
344
|
+
default: Math.max(8, Math.round(blurRadius * 0.6))
|
|
345
|
+
});
|
|
266
346
|
return {
|
|
267
347
|
radius,
|
|
268
348
|
blurIntensity: Math.max(0, Math.min(100, Math.round(blurRadius * BLUR_INTENSITY_FACTOR))),
|
|
349
|
+
imageBlurRadius,
|
|
269
350
|
header: {
|
|
270
351
|
flexDirection: 'row',
|
|
271
352
|
alignItems: 'flex-start',
|
|
@@ -329,23 +410,16 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
329
410
|
// the intended fade strength.
|
|
330
411
|
opacity: 0.9
|
|
331
412
|
},
|
|
413
|
+
// Overrides layered on top of <Badge type="glass">. Badge already supplies
|
|
414
|
+
// the row layout + 4px gap (when a leading icon is present), `overflow:
|
|
415
|
+
// 'hidden'`, `alignSelf: 'flex-start'` and `alignItems: 'center'`; these
|
|
416
|
+
// pin the special badge's literal Figma box (6/2 padding, 4px radius)
|
|
417
|
+
// regardless of the badge size tokens resolved by the active modes.
|
|
332
418
|
specialBadge: {
|
|
333
|
-
flexDirection: 'row',
|
|
334
|
-
alignItems: 'center',
|
|
335
|
-
gap: 4,
|
|
336
419
|
paddingHorizontal: 6,
|
|
337
420
|
paddingVertical: 2,
|
|
338
|
-
borderRadius: 4,
|
|
339
|
-
overflow: 'hidden',
|
|
340
|
-
alignSelf: 'flex-start'
|
|
341
|
-
},
|
|
342
|
-
specialBadgeFill: {
|
|
343
421
|
borderRadius: 4
|
|
344
422
|
},
|
|
345
|
-
specialBadgeIcon: {
|
|
346
|
-
justifyContent: 'center',
|
|
347
|
-
alignItems: 'center'
|
|
348
|
-
},
|
|
349
423
|
pressed: {
|
|
350
424
|
opacity: 0.92
|
|
351
425
|
}
|
|
@@ -29,7 +29,8 @@ const ProductOverview = ({
|
|
|
29
29
|
stats = DEFAULT_STATS,
|
|
30
30
|
modes = _reactUtils.EMPTY_MODES,
|
|
31
31
|
style,
|
|
32
|
-
children
|
|
32
|
+
children,
|
|
33
|
+
disableTruncation
|
|
33
34
|
}) => {
|
|
34
35
|
const padding = (0, _figmaVariablesResolver.getVariableByName)('productOverview/padding', modes) ?? 24;
|
|
35
36
|
const gap = (0, _figmaVariablesResolver.getVariableByName)('productOverview/gap', modes) ?? 12;
|
|
@@ -133,11 +134,11 @@ const ProductOverview = ({
|
|
|
133
134
|
},
|
|
134
135
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
135
136
|
style: statValueStyle,
|
|
136
|
-
|
|
137
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
137
138
|
children: stat.value
|
|
138
139
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
139
140
|
style: statLabelStyle,
|
|
140
|
-
|
|
141
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
141
142
|
children: stat.label
|
|
142
143
|
})]
|
|
143
144
|
}, `${stat.label}-${index}`))
|
|
@@ -34,6 +34,7 @@ function ProgressBadge({
|
|
|
34
34
|
style,
|
|
35
35
|
textStyle: textStyleOverride,
|
|
36
36
|
accessibilityLabel,
|
|
37
|
+
disableTruncation,
|
|
37
38
|
...rest
|
|
38
39
|
}) {
|
|
39
40
|
// Resolve layout tokens
|
|
@@ -119,8 +120,7 @@ function ProgressBadge({
|
|
|
119
120
|
importantForAccessibility: "no"
|
|
120
121
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
121
122
|
style: [textStyle, textStyleOverride],
|
|
122
|
-
|
|
123
|
-
ellipsizeMode: "tail",
|
|
123
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1, 'tail'),
|
|
124
124
|
accessibilityElementsHidden: true,
|
|
125
125
|
importantForAccessibility: "no",
|
|
126
126
|
children: taskName
|
|
@@ -58,7 +58,8 @@ function ProjectionMarker({
|
|
|
58
58
|
badgeStyle,
|
|
59
59
|
durationStyle,
|
|
60
60
|
rateStyle,
|
|
61
|
-
accessibilityLabel
|
|
61
|
+
accessibilityLabel,
|
|
62
|
+
disableTruncation
|
|
62
63
|
}) {
|
|
63
64
|
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('projectionMarker/title/color', modes) ?? '#000000';
|
|
64
65
|
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('projectionMarker/title/fontfamily', modes) ?? 'JioType Var';
|
|
@@ -90,7 +91,7 @@ function ProjectionMarker({
|
|
|
90
91
|
if (isTextValue(value)) {
|
|
91
92
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
92
93
|
style: [titleTextStyle, overrideStyle],
|
|
93
|
-
|
|
94
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
94
95
|
children: value
|
|
95
96
|
});
|
|
96
97
|
}
|
|
@@ -380,6 +380,7 @@ function Section({
|
|
|
380
380
|
accessibilityLabel: _accessibilityLabel,
|
|
381
381
|
accessibilityHint,
|
|
382
382
|
webAccessibilityProps,
|
|
383
|
+
disableTruncation,
|
|
383
384
|
...rest
|
|
384
385
|
}) {
|
|
385
386
|
// Focus and hover are still mirrored in React because they are visible,
|
|
@@ -415,7 +416,7 @@ function Section({
|
|
|
415
416
|
style: headerWrapStyle,
|
|
416
417
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
417
418
|
style: tokens.titleStyle,
|
|
418
|
-
|
|
419
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 1),
|
|
419
420
|
accessibilityElementsHidden: true,
|
|
420
421
|
importantForAccessibility: "no",
|
|
421
422
|
children: title
|
|
@@ -425,7 +426,7 @@ function Section({
|
|
|
425
426
|
})]
|
|
426
427
|
}), showSupportText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
427
428
|
style: tokens.supportTextStyle,
|
|
428
|
-
|
|
429
|
+
...(0, _reactUtils.resolveTruncation)(disableTruncation, 2),
|
|
429
430
|
accessibilityElementsHidden: true,
|
|
430
431
|
importantForAccessibility: "no",
|
|
431
432
|
children: supportText
|