jfs-components 0.1.18 → 0.1.23
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 +19 -0
- package/lib/commonjs/components/Card/Card.js +29 -12
- package/lib/commonjs/components/CardFeedback/CardFeedback.js +16 -2
- package/lib/commonjs/components/CardInsight/CardInsight.js +34 -13
- package/lib/commonjs/components/CardProviderInfo/CardProviderInfo.js +23 -3
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +31 -8
- package/lib/commonjs/components/ContentSheet/ContentSheet.js +131 -0
- package/lib/commonjs/components/DebitCard/DebitCard.js +23 -3
- package/lib/commonjs/components/HeroSection/HeroSection.js +165 -0
- package/lib/commonjs/components/Image/Image.js +33 -7
- package/lib/commonjs/components/Link/Link.js +115 -0
- package/lib/commonjs/components/ListItem/ListItem.js +16 -1
- package/lib/commonjs/components/MediaCard/MediaCard.js +24 -7
- package/lib/commonjs/components/RechargeCard/RechargeCard.js +34 -13
- package/lib/commonjs/components/TestimonialsCard/TestimonialsCard.js +23 -5
- package/lib/commonjs/components/index.js +21 -0
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/design-tokens/figma-modes.generated.js +53 -43
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/Card/Card.js +31 -14
- package/lib/module/components/CardFeedback/CardFeedback.js +17 -3
- package/lib/module/components/CardInsight/CardInsight.js +36 -15
- package/lib/module/components/CardProviderInfo/CardProviderInfo.js +25 -5
- package/lib/module/components/CheckboxItem/CheckboxItem.js +31 -8
- package/lib/module/components/ContentSheet/ContentSheet.js +126 -0
- package/lib/module/components/DebitCard/DebitCard.js +25 -5
- package/lib/module/components/HeroSection/HeroSection.js +159 -0
- package/lib/module/components/Image/Image.js +34 -7
- package/lib/module/components/Link/Link.js +110 -0
- package/lib/module/components/ListItem/ListItem.js +16 -1
- package/lib/module/components/MediaCard/MediaCard.js +26 -9
- package/lib/module/components/RechargeCard/RechargeCard.js +36 -15
- package/lib/module/components/TestimonialsCard/TestimonialsCard.js +25 -7
- package/lib/module/components/index.js +3 -0
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/design-tokens/figma-modes.generated.js +53 -43
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/components/Card/Card.d.ts +10 -1
- package/lib/typescript/src/components/CardFeedback/CardFeedback.d.ts +10 -1
- package/lib/typescript/src/components/CardInsight/CardInsight.d.ts +10 -1
- package/lib/typescript/src/components/CardProviderInfo/CardProviderInfo.d.ts +10 -1
- package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +26 -3
- package/lib/typescript/src/components/ContentSheet/ContentSheet.d.ts +71 -0
- package/lib/typescript/src/components/DebitCard/DebitCard.d.ts +10 -1
- package/lib/typescript/src/components/HeroSection/HeroSection.d.ts +80 -0
- package/lib/typescript/src/components/Image/Image.d.ts +27 -2
- package/lib/typescript/src/components/Link/Link.d.ts +73 -0
- package/lib/typescript/src/components/MediaCard/MediaCard.d.ts +10 -1
- package/lib/typescript/src/components/RechargeCard/RechargeCard.d.ts +10 -1
- package/lib/typescript/src/components/TestimonialsCard/TestimonialsCard.d.ts +8 -1
- package/lib/typescript/src/components/index.d.ts +3 -0
- package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +8 -0
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Card/Card.tsx +46 -15
- package/src/components/CardFeedback/CardFeedback.tsx +29 -4
- package/src/components/CardInsight/CardInsight.tsx +48 -17
- package/src/components/CardProviderInfo/CardProviderInfo.tsx +36 -3
- package/src/components/CheckboxItem/CheckboxItem.tsx +59 -14
- package/src/components/ContentSheet/ContentSheet.tsx +217 -0
- package/src/components/DebitCard/DebitCard.tsx +36 -3
- package/src/components/HeroSection/HeroSection.tsx +231 -0
- package/src/components/Image/Image.tsx +55 -3
- package/src/components/Link/Link.tsx +159 -0
- package/src/components/ListItem/ListItem.tsx +15 -0
- package/src/components/MediaCard/MediaCard.tsx +40 -9
- package/src/components/RechargeCard/RechargeCard.tsx +48 -13
- package/src/components/TestimonialsCard/TestimonialsCard.tsx +37 -6
- package/src/components/index.ts +3 -0
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/design-tokens/figma-modes.generated.ts +53 -43
- package/src/icons/registry.ts +1 -1
|
@@ -11,11 +11,32 @@ var _SkeletonGroup = require("../../skeleton/SkeletonGroup");
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
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); }
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* iOS URL cache control (maps to RN's `source.cache`, no-op on Android/web):
|
|
16
|
+
* - `'default'` — use the native platform's default caching.
|
|
17
|
+
* - `'reload'` — ignore any cache, always fetch from the network.
|
|
18
|
+
* - `'force-cache'` — use the cached response regardless of age; fetch
|
|
19
|
+
* only if absent.
|
|
20
|
+
* - `'only-if-cached'` — use the cache only; never hit the network.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
function normalizeSource(imageSource, cache) {
|
|
15
24
|
if (imageSource == null) return undefined;
|
|
16
|
-
if (typeof imageSource === 'string')
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
if (typeof imageSource === 'string') {
|
|
26
|
+
return cache ? {
|
|
27
|
+
uri: imageSource,
|
|
28
|
+
cache
|
|
29
|
+
} : {
|
|
30
|
+
uri: imageSource
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
// Only remote sources (single object with a `uri`) can carry a cache policy.
|
|
34
|
+
if (cache && !Array.isArray(imageSource) && typeof imageSource === 'object' && 'uri' in imageSource) {
|
|
35
|
+
return {
|
|
36
|
+
...imageSource,
|
|
37
|
+
cache
|
|
38
|
+
};
|
|
39
|
+
}
|
|
19
40
|
return imageSource;
|
|
20
41
|
}
|
|
21
42
|
|
|
@@ -51,9 +72,12 @@ function Image({
|
|
|
51
72
|
accessibilityLabel,
|
|
52
73
|
accessibilityElementsHidden,
|
|
53
74
|
importantForAccessibility,
|
|
54
|
-
loading
|
|
75
|
+
loading,
|
|
76
|
+
cache,
|
|
77
|
+
onLoad,
|
|
78
|
+
onError
|
|
55
79
|
}) {
|
|
56
|
-
const source = (0, _react.useMemo)(() => normalizeSource(imageSource), [imageSource]);
|
|
80
|
+
const source = (0, _react.useMemo)(() => normalizeSource(imageSource, cache), [imageSource, cache]);
|
|
57
81
|
|
|
58
82
|
// Explicit { width, height } means a "fill an exact box" layout — typically a
|
|
59
83
|
// full-bleed hero/background where the asset is high-res and sharpness
|
|
@@ -110,7 +134,9 @@ function Image({
|
|
|
110
134
|
resizeMethod: effectiveResizeMethod,
|
|
111
135
|
accessibilityLabel: accessibilityLabel,
|
|
112
136
|
accessibilityElementsHidden: accessibilityElementsHidden,
|
|
113
|
-
importantForAccessibility: importantForAccessibility
|
|
137
|
+
importantForAccessibility: importantForAccessibility,
|
|
138
|
+
onLoad: onLoad,
|
|
139
|
+
onError: onError
|
|
114
140
|
});
|
|
115
141
|
}
|
|
116
142
|
var _default = exports.default = /*#__PURE__*/_react.default.memo(Image);
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
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); }
|
|
13
|
+
const TEXT_ALIGN_MAP = {
|
|
14
|
+
Left: 'left',
|
|
15
|
+
Center: 'center'
|
|
16
|
+
};
|
|
17
|
+
const DISABLED_OPACITY = 0.4;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Link — an underlined, pressable text primitive.
|
|
21
|
+
*
|
|
22
|
+
* It renders a single React Native `<Text>` (not a `Pressable`), so it flows
|
|
23
|
+
* inline and can be nested inside {@link TextSegment} exactly like a `Text`
|
|
24
|
+
* run — the React Native equivalent of an `<a>` inside a `<p>`. Font family,
|
|
25
|
+
* size, weight, line-height and letter-spacing come from the dedicated `link/*`
|
|
26
|
+
* tokens, while the colour resolves from `text/foreground` (so a link sits on
|
|
27
|
+
* the same colour as the surrounding copy). The label is always underlined.
|
|
28
|
+
*
|
|
29
|
+
* @example Standalone
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Link text="Forgot PIN?" onPress={() => navigation.navigate('ResetPin')} />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example Inline inside TextSegment
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <TextSegment>
|
|
37
|
+
* <Text>By continuing you agree to our </Text>
|
|
38
|
+
* <Link onPress={openTerms}>Terms</Link>
|
|
39
|
+
* <Text>.</Text>
|
|
40
|
+
* </TextSegment>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
function Link({
|
|
44
|
+
text,
|
|
45
|
+
children,
|
|
46
|
+
onPress,
|
|
47
|
+
disabled = false,
|
|
48
|
+
autolayout = 'Fill',
|
|
49
|
+
textAlign = 'Left',
|
|
50
|
+
modes = _reactUtils.EMPTY_MODES,
|
|
51
|
+
style,
|
|
52
|
+
numberOfLines,
|
|
53
|
+
disableTruncation,
|
|
54
|
+
singleLine,
|
|
55
|
+
accessibilityLabel,
|
|
56
|
+
accessibilityHint
|
|
57
|
+
}) {
|
|
58
|
+
// Bindings mirror the Figma `Link` node exactly: colour from `text/foreground`
|
|
59
|
+
// (so the link matches the surrounding copy), everything else from the
|
|
60
|
+
// dedicated `link/*` tokens.
|
|
61
|
+
const foreground = (0, _figmaVariablesResolver.getVariableByName)('text/foreground', modes) ?? '#000000';
|
|
62
|
+
const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('link/fontFamily', modes) ?? 'JioType Var';
|
|
63
|
+
const fontSize = (0, _figmaVariablesResolver.getVariableByName)('link/fontSize', modes) ?? 12;
|
|
64
|
+
const fontWeight = (0, _figmaVariablesResolver.getVariableByName)('link/fontWeight', modes) ?? 400;
|
|
65
|
+
const lineHeight = (0, _figmaVariablesResolver.getVariableByName)('link/lineHeight', modes) ?? 16;
|
|
66
|
+
const letterSpacing = (0, _figmaVariablesResolver.getVariableByName)('link/letterSpacing', modes) ?? -0.5;
|
|
67
|
+
const linkStyle = {
|
|
68
|
+
color: foreground,
|
|
69
|
+
fontFamily: fontFamily,
|
|
70
|
+
fontSize: fontSize,
|
|
71
|
+
fontWeight: String(fontWeight),
|
|
72
|
+
lineHeight: lineHeight,
|
|
73
|
+
letterSpacing: letterSpacing,
|
|
74
|
+
textAlign: TEXT_ALIGN_MAP[textAlign],
|
|
75
|
+
textDecorationLine: 'underline',
|
|
76
|
+
alignSelf: autolayout === 'Fill' ? 'stretch' : 'flex-start',
|
|
77
|
+
...(disabled ? {
|
|
78
|
+
opacity: DISABLED_OPACITY
|
|
79
|
+
} : null)
|
|
80
|
+
};
|
|
81
|
+
const content = children !== undefined && children !== null && children !== false ? children : text !== undefined ? text : 'Link';
|
|
82
|
+
const handlePress = (0, _react.useCallback)(event => {
|
|
83
|
+
if (disabled) return;
|
|
84
|
+
onPress?.(event);
|
|
85
|
+
}, [disabled, onPress]);
|
|
86
|
+
const {
|
|
87
|
+
style: layoutStyle,
|
|
88
|
+
...truncation
|
|
89
|
+
} = (0, _reactUtils.resolveTextLayout)({
|
|
90
|
+
disableTruncation,
|
|
91
|
+
singleLine,
|
|
92
|
+
numberOfLines
|
|
93
|
+
});
|
|
94
|
+
const resolvedLabel = accessibilityLabel ?? (typeof content === 'string' ? content : undefined);
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
96
|
+
accessibilityRole: "link",
|
|
97
|
+
accessibilityState: {
|
|
98
|
+
disabled
|
|
99
|
+
},
|
|
100
|
+
...(resolvedLabel !== undefined ? {
|
|
101
|
+
accessibilityLabel: resolvedLabel
|
|
102
|
+
} : null),
|
|
103
|
+
...(accessibilityHint !== undefined ? {
|
|
104
|
+
accessibilityHint
|
|
105
|
+
} : null),
|
|
106
|
+
...(onPress !== undefined ? {
|
|
107
|
+
onPress: handlePress
|
|
108
|
+
} : null),
|
|
109
|
+
disabled: disabled,
|
|
110
|
+
style: [linkStyle, style, layoutStyle],
|
|
111
|
+
...truncation,
|
|
112
|
+
children: content
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
var _default = exports.default = /*#__PURE__*/_react.default.memo(Link);
|
|
@@ -63,6 +63,17 @@ function resolveListItemTokens(modes) {
|
|
|
63
63
|
const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/left', resolvedModes) ?? 0;
|
|
64
64
|
const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/right', resolvedModes) ?? 0;
|
|
65
65
|
const textWrapGap = (0, _figmaVariablesResolver.getVariableByName)('listItem/text wrap', resolvedModes) ?? 0;
|
|
66
|
+
|
|
67
|
+
// Container surface — driven by the `List Item Style` collection
|
|
68
|
+
// (Default | Boxed | Minimal) plus `ListItem State`, `Selectable`,
|
|
69
|
+
// `Page type` and `Color Mode`. In the default style these all resolve to a
|
|
70
|
+
// transparent background / no border / 0 radius, so existing usages are
|
|
71
|
+
// visually unchanged; the "Boxed" style paints a filled, rounded, bordered
|
|
72
|
+
// surface.
|
|
73
|
+
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/background/color', resolvedModes);
|
|
74
|
+
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/border/color', resolvedModes);
|
|
75
|
+
const borderWidth = (0, _figmaVariablesResolver.getVariableByName)('listItem/borderWidth', resolvedModes) ?? 0;
|
|
76
|
+
const borderRadius = (0, _figmaVariablesResolver.getVariableByName)('listItem/radius', resolvedModes) ?? 0;
|
|
66
77
|
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/color', textModes);
|
|
67
78
|
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontSize', textModes);
|
|
68
79
|
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/lineHeight', textModes);
|
|
@@ -80,7 +91,11 @@ function resolveListItemTokens(modes) {
|
|
|
80
91
|
paddingTop: paddingTop,
|
|
81
92
|
paddingBottom: paddingBottom,
|
|
82
93
|
paddingLeft: paddingLeft,
|
|
83
|
-
paddingRight: paddingRight
|
|
94
|
+
paddingRight: paddingRight,
|
|
95
|
+
backgroundColor: backgroundColor,
|
|
96
|
+
borderColor: borderColor,
|
|
97
|
+
borderWidth,
|
|
98
|
+
borderRadius
|
|
84
99
|
},
|
|
85
100
|
horizontalLayoutStyle: {
|
|
86
101
|
flexDirection: 'row',
|
|
@@ -44,7 +44,10 @@ function MediaCard({
|
|
|
44
44
|
media,
|
|
45
45
|
children,
|
|
46
46
|
modes = _reactUtils.EMPTY_MODES,
|
|
47
|
-
style
|
|
47
|
+
style,
|
|
48
|
+
onPress,
|
|
49
|
+
disabled,
|
|
50
|
+
accessibilityLabel
|
|
48
51
|
}) {
|
|
49
52
|
const radius = parseFloat((0, _figmaVariablesResolver.getVariableByName)('cardMedia/radius', modes));
|
|
50
53
|
const containerStyle = {
|
|
@@ -59,17 +62,31 @@ function MediaCard({
|
|
|
59
62
|
accessibilityElementsHidden: true,
|
|
60
63
|
importantForAccessibility: "no"
|
|
61
64
|
}) : null);
|
|
65
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
66
|
+
children: [background, children != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
67
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
68
|
+
pointerEvents: "box-none",
|
|
69
|
+
children: children
|
|
70
|
+
}) : null]
|
|
71
|
+
});
|
|
62
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MediaCardContext.Provider, {
|
|
63
73
|
value: {
|
|
64
74
|
modes
|
|
65
75
|
},
|
|
66
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
76
|
+
children: onPress ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
77
|
+
style: [containerStyle, style],
|
|
78
|
+
onPress: onPress,
|
|
79
|
+
disabled: disabled,
|
|
80
|
+
accessibilityRole: "button",
|
|
81
|
+
accessibilityLabel: accessibilityLabel,
|
|
82
|
+
accessibilityState: {
|
|
83
|
+
disabled: !!disabled
|
|
84
|
+
},
|
|
85
|
+
children: content
|
|
86
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
67
87
|
style: [containerStyle, style],
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
pointerEvents: "box-none",
|
|
71
|
-
children: children
|
|
72
|
-
}) : null]
|
|
88
|
+
accessibilityLabel: accessibilityLabel,
|
|
89
|
+
children: content
|
|
73
90
|
})
|
|
74
91
|
});
|
|
75
92
|
}
|
|
@@ -41,7 +41,10 @@ function RechargeCard({
|
|
|
41
41
|
subscriptionContent,
|
|
42
42
|
actions,
|
|
43
43
|
modes = _reactUtils.EMPTY_MODES,
|
|
44
|
-
style
|
|
44
|
+
style,
|
|
45
|
+
onPress,
|
|
46
|
+
disabled,
|
|
47
|
+
accessibilityLabel
|
|
45
48
|
}) {
|
|
46
49
|
// Container Tokens (defaults mirror Figma node 2235:937).
|
|
47
50
|
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('rechargeCard/background', modes);
|
|
@@ -90,18 +93,18 @@ function RechargeCard({
|
|
|
90
93
|
// Pass modes to subscription children (e.g. AvatarGroup)
|
|
91
94
|
// Now encapsulated, so we just pass children to AvatarGroup
|
|
92
95
|
const hasSubscriptions = _react.default.Children.count(subscriptionContent) > 0;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
const containerStyle = {
|
|
97
|
+
backgroundColor,
|
|
98
|
+
paddingHorizontal,
|
|
99
|
+
paddingVertical,
|
|
100
|
+
gap,
|
|
101
|
+
borderRadius: radius,
|
|
102
|
+
borderWidth: strokeWidth,
|
|
103
|
+
borderColor: strokeColor,
|
|
104
|
+
minWidth,
|
|
105
|
+
alignItems: 'flex-start'
|
|
106
|
+
};
|
|
107
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
105
108
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
106
109
|
style: {
|
|
107
110
|
gap: headerGap,
|
|
@@ -217,4 +220,22 @@ function RechargeCard({
|
|
|
217
220
|
children: actions
|
|
218
221
|
})]
|
|
219
222
|
});
|
|
223
|
+
if (onPress) {
|
|
224
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
225
|
+
style: [containerStyle, style],
|
|
226
|
+
onPress: onPress,
|
|
227
|
+
disabled: disabled,
|
|
228
|
+
accessibilityRole: "button",
|
|
229
|
+
accessibilityLabel: accessibilityLabel ?? title,
|
|
230
|
+
accessibilityState: {
|
|
231
|
+
disabled: !!disabled
|
|
232
|
+
},
|
|
233
|
+
children: content
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
237
|
+
style: [containerStyle, style],
|
|
238
|
+
accessibilityLabel: accessibilityLabel,
|
|
239
|
+
children: content
|
|
240
|
+
});
|
|
220
241
|
}
|
|
@@ -33,7 +33,9 @@ function TestimonialsCard({
|
|
|
33
33
|
modes = _reactUtils.EMPTY_MODES,
|
|
34
34
|
style,
|
|
35
35
|
avatarProps,
|
|
36
|
-
accessibilityLabel
|
|
36
|
+
accessibilityLabel,
|
|
37
|
+
onPress,
|
|
38
|
+
disabled
|
|
37
39
|
}) {
|
|
38
40
|
// Container tokens
|
|
39
41
|
const background = (0, _figmaVariablesResolver.getVariableByName)('testimonialsCard/background', modes) ?? '#ffffff';
|
|
@@ -89,10 +91,7 @@ function TestimonialsCard({
|
|
|
89
91
|
...(avatarProps?.modes || {})
|
|
90
92
|
};
|
|
91
93
|
const resolvedAccessibilityLabel = accessibilityLabel ?? `Testimonial${title ? ` from ${title}` : ''}${body ? `: ${body}` : ''}`;
|
|
92
|
-
|
|
93
|
-
style: [containerStyle, style],
|
|
94
|
-
accessibilityRole: "text",
|
|
95
|
-
accessibilityLabel: resolvedAccessibilityLabel,
|
|
94
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
96
95
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
97
96
|
style: "Image",
|
|
98
97
|
modes: avatarModes,
|
|
@@ -112,6 +111,25 @@ function TestimonialsCard({
|
|
|
112
111
|
})]
|
|
113
112
|
})]
|
|
114
113
|
});
|
|
114
|
+
if (onPress) {
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
116
|
+
style: [containerStyle, style],
|
|
117
|
+
onPress: onPress,
|
|
118
|
+
disabled: disabled,
|
|
119
|
+
accessibilityRole: "button",
|
|
120
|
+
accessibilityLabel: resolvedAccessibilityLabel,
|
|
121
|
+
accessibilityState: {
|
|
122
|
+
disabled: !!disabled
|
|
123
|
+
},
|
|
124
|
+
children: content
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
128
|
+
style: [containerStyle, style],
|
|
129
|
+
accessibilityRole: "text",
|
|
130
|
+
accessibilityLabel: resolvedAccessibilityLabel,
|
|
131
|
+
children: content
|
|
132
|
+
});
|
|
115
133
|
}
|
|
116
134
|
const textContainerStyle = {
|
|
117
135
|
width: '100%',
|
|
@@ -267,6 +267,12 @@ Object.defineProperty(exports, "ComparisonBar", {
|
|
|
267
267
|
return _ComparisonBar.default;
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
|
+
Object.defineProperty(exports, "ContentSheet", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function () {
|
|
273
|
+
return _ContentSheet.default;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
270
276
|
Object.defineProperty(exports, "CoverageBarComparison", {
|
|
271
277
|
enumerable: true,
|
|
272
278
|
get: function () {
|
|
@@ -387,6 +393,12 @@ Object.defineProperty(exports, "HStack", {
|
|
|
387
393
|
return _HStack.default;
|
|
388
394
|
}
|
|
389
395
|
});
|
|
396
|
+
Object.defineProperty(exports, "HeroSection", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function () {
|
|
399
|
+
return _HeroSection.default;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
390
402
|
Object.defineProperty(exports, "HoldingsCard", {
|
|
391
403
|
enumerable: true,
|
|
392
404
|
get: function () {
|
|
@@ -447,6 +459,12 @@ Object.defineProperty(exports, "LinearProgress", {
|
|
|
447
459
|
return _LinearProgress.default;
|
|
448
460
|
}
|
|
449
461
|
});
|
|
462
|
+
Object.defineProperty(exports, "Link", {
|
|
463
|
+
enumerable: true,
|
|
464
|
+
get: function () {
|
|
465
|
+
return _Link.default;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
450
468
|
Object.defineProperty(exports, "ListGroup", {
|
|
451
469
|
enumerable: true,
|
|
452
470
|
get: function () {
|
|
@@ -1011,6 +1029,7 @@ var _FilterBar = _interopRequireDefault(require("./FilterBar/FilterBar"));
|
|
|
1011
1029
|
var _FullscreenModal = _interopRequireDefault(require("./FullscreenModal/FullscreenModal"));
|
|
1012
1030
|
var _Form = _interopRequireWildcard(require("./Form/Form"));
|
|
1013
1031
|
var _FormField = _interopRequireDefault(require("./FormField/FormField"));
|
|
1032
|
+
var _ContentSheet = _interopRequireDefault(require("./ContentSheet/ContentSheet"));
|
|
1014
1033
|
var _CircularProgressBar = _interopRequireDefault(require("./CircularProgressBar/CircularProgressBar"));
|
|
1015
1034
|
var _CircularProgressBarDoted = _interopRequireDefault(require("./CircularProgressBarDoted/CircularProgressBarDoted"));
|
|
1016
1035
|
var _CircularRating = _interopRequireDefault(require("./CircularRating/CircularRating"));
|
|
@@ -1020,6 +1039,7 @@ var _ComparisonBar = _interopRequireDefault(require("./ComparisonBar/ComparisonB
|
|
|
1020
1039
|
var _AllocationComparisonChart = _interopRequireDefault(require("./AllocationComparisonChart/AllocationComparisonChart"));
|
|
1021
1040
|
var _MonthlyStatusGrid = _interopRequireWildcard(require("./MonthlyStatusGrid/MonthlyStatusGrid"));
|
|
1022
1041
|
var _Gauge = _interopRequireDefault(require("./Gauge/Gauge"));
|
|
1042
|
+
var _HeroSection = _interopRequireDefault(require("./HeroSection/HeroSection"));
|
|
1023
1043
|
var _HoldingsCard = _interopRequireDefault(require("./HoldingsCard/HoldingsCard"));
|
|
1024
1044
|
var _HStack = _interopRequireDefault(require("./HStack/HStack"));
|
|
1025
1045
|
var _Icon = _interopRequireDefault(require("./Icon/Icon"));
|
|
@@ -1027,6 +1047,7 @@ var _IconButton = _interopRequireDefault(require("./IconButton/IconButton"));
|
|
|
1027
1047
|
var _IconCapsule = _interopRequireDefault(require("./IconCapsule/IconCapsule"));
|
|
1028
1048
|
var _Image = _interopRequireDefault(require("./Image/Image"));
|
|
1029
1049
|
var _LazyList = _interopRequireDefault(require("./LazyList/LazyList"));
|
|
1050
|
+
var _Link = _interopRequireDefault(require("./Link/Link"));
|
|
1030
1051
|
var _LinearMeter = _interopRequireDefault(require("./LinearMeter/LinearMeter"));
|
|
1031
1052
|
var _LinearProgress = _interopRequireDefault(require("./LinearProgress/LinearProgress"));
|
|
1032
1053
|
var _ListGroup = _interopRequireDefault(require("./ListGroup/ListGroup"));
|