jfs-components 0.0.47 → 0.0.49
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/lib/commonjs/assets/cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png +0 -0
- package/lib/commonjs/components/CardCTA/CardCTA.js +141 -0
- package/lib/commonjs/components/DebitCard/DebitCard.js +166 -0
- package/lib/commonjs/components/DebitCard/cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png +0 -0
- package/lib/commonjs/components/Section/Section.js +5 -8
- package/lib/commonjs/components/Tabs/TabItem.js +9 -5
- package/lib/commonjs/components/Tabs/Tabs.js +3 -1
- package/lib/commonjs/components/Title/Title.js +32 -24
- package/lib/commonjs/components/index.js +10 -3
- package/lib/commonjs/icons/registry.js +2 -2
- package/lib/module/assets/cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png +0 -0
- package/lib/module/components/CardCTA/CardCTA.js +136 -0
- package/lib/module/components/DebitCard/DebitCard.js +161 -0
- package/lib/module/components/DebitCard/cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png +0 -0
- package/lib/module/components/Section/Section.js +5 -8
- package/lib/module/components/Tabs/TabItem.js +9 -5
- package/lib/module/components/Tabs/Tabs.js +3 -1
- package/lib/module/components/Title/Title.js +33 -25
- package/lib/module/components/index.js +2 -1
- package/lib/module/icons/registry.js +2 -2
- package/lib/typescript/src/components/CardCTA/CardCTA.d.ts +25 -0
- package/lib/typescript/src/components/DebitCard/DebitCard.d.ts +27 -0
- package/lib/typescript/src/components/Title/Title.d.ts +5 -1
- package/lib/typescript/src/components/index.d.ts +2 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/assets/cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png +0 -0
- package/src/components/CardCTA/CardCTA.tsx +146 -0
- package/src/components/DebitCard/DebitCard.tsx +185 -0
- package/src/components/DebitCard/cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png +0 -0
- package/src/components/Section/Section.tsx +3 -9
- package/src/components/Tabs/TabItem.tsx +10 -5
- package/src/components/Tabs/Tabs.tsx +2 -0
- package/src/components/Title/Title.tsx +46 -21
- package/src/components/index.ts +2 -1
- package/src/icons/registry.ts +2136 -29
- package/lib/commonjs/components/CtaCard/CtaCard.js +0 -116
- package/lib/commonjs/components/CtaCard/index.js +0 -13
- package/lib/module/components/CtaCard/CtaCard.js +0 -111
- package/lib/module/components/CtaCard/index.js +0 -3
- package/lib/typescript/src/components/CtaCard/CtaCard.d.ts +0 -61
- package/lib/typescript/src/components/CtaCard/index.d.ts +0 -2
- package/src/components/CtaCard/CtaCard.tsx +0 -180
- package/src/components/CtaCard/index.ts +0 -1
|
Binary file
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
|
+
var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
|
|
13
|
+
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function CardCTA({
|
|
17
|
+
title = 'If you have 1 line',
|
|
18
|
+
body = 'Then you can have up to 3 lines in the subtext as well. This is for demonstration.',
|
|
19
|
+
iconName = 'ic_upi_number',
|
|
20
|
+
buttonLabel = 'Button',
|
|
21
|
+
onPressButton,
|
|
22
|
+
modes: propModes = {},
|
|
23
|
+
iconSlot,
|
|
24
|
+
buttonSlot,
|
|
25
|
+
style
|
|
26
|
+
}) {
|
|
27
|
+
const {
|
|
28
|
+
modes: globalModes
|
|
29
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
30
|
+
const modes = {
|
|
31
|
+
...globalModes,
|
|
32
|
+
...propModes
|
|
33
|
+
};
|
|
34
|
+
const background = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/background', modes) || '#ffffff';
|
|
35
|
+
const radius = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/radius', modes) || 12;
|
|
36
|
+
const borderSize = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/border/size', modes) || 1;
|
|
37
|
+
const borderColor = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/border/color', modes) || '#e3e4e4';
|
|
38
|
+
const leftPaddingH = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/left-wrap/padding/horizontal', modes) || 16;
|
|
39
|
+
const leftPaddingV = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/left-wrap/padding/vertical', modes) || 22;
|
|
40
|
+
const leftGap = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/left-wrap/gap', modes) || 16;
|
|
41
|
+
const rightPaddingH = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/right-wrap/padding/horizontal', modes) || 16;
|
|
42
|
+
const rightPaddingV = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/right-wrap/padding/vertical', modes) || 22;
|
|
43
|
+
const textGap = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/text-wrap/gap', modes) || 6;
|
|
44
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/title/color', modes) || '#0c0d10';
|
|
45
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/title/fontFamily', modes) || 'JioType Var';
|
|
46
|
+
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/title/fontSize', modes) || 16;
|
|
47
|
+
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/title/lineHeight', modes) || 17.6;
|
|
48
|
+
const titleFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/title/fontWeight', modes) || 700;
|
|
49
|
+
const titleFontWeight = typeof titleFontWeightRaw === 'number' ? titleFontWeightRaw.toString() : titleFontWeightRaw;
|
|
50
|
+
const bodyColor = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/body/color', modes) || '#13002d';
|
|
51
|
+
const bodyFontFamily = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/body/fontFamily', modes) || 'JioType Var';
|
|
52
|
+
const bodyFontSize = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/body/fontSize', modes) || 10;
|
|
53
|
+
const bodyLineHeight = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/body/lineHeight', modes) || 12;
|
|
54
|
+
const bodyFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('cardCTA/body/fontWeight', modes) || 400;
|
|
55
|
+
const bodyFontWeight = typeof bodyFontWeightRaw === 'number' ? bodyFontWeightRaw.toString() : bodyFontWeightRaw;
|
|
56
|
+
const containerStyle = {
|
|
57
|
+
backgroundColor: background,
|
|
58
|
+
borderRadius: radius,
|
|
59
|
+
borderWidth: borderSize,
|
|
60
|
+
borderColor,
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
overflow: 'hidden'
|
|
63
|
+
};
|
|
64
|
+
const leftWrapStyle = {
|
|
65
|
+
flex: 3,
|
|
66
|
+
paddingHorizontal: leftPaddingH,
|
|
67
|
+
paddingVertical: leftPaddingV,
|
|
68
|
+
gap: leftGap,
|
|
69
|
+
alignItems: 'flex-start',
|
|
70
|
+
justifyContent: 'center'
|
|
71
|
+
};
|
|
72
|
+
const rightWrapStyle = {
|
|
73
|
+
flex: 2,
|
|
74
|
+
paddingHorizontal: rightPaddingH,
|
|
75
|
+
paddingVertical: rightPaddingV,
|
|
76
|
+
alignItems: 'flex-end',
|
|
77
|
+
justifyContent: 'flex-start'
|
|
78
|
+
};
|
|
79
|
+
const textWrapStyle = {
|
|
80
|
+
gap: textGap
|
|
81
|
+
};
|
|
82
|
+
const titleStyle = {
|
|
83
|
+
color: titleColor,
|
|
84
|
+
fontFamily: titleFontFamily,
|
|
85
|
+
fontSize: titleFontSize,
|
|
86
|
+
lineHeight: titleLineHeight,
|
|
87
|
+
fontWeight: titleFontWeight
|
|
88
|
+
};
|
|
89
|
+
const bodyStyle = {
|
|
90
|
+
color: bodyColor,
|
|
91
|
+
fontFamily: bodyFontFamily,
|
|
92
|
+
fontSize: bodyFontSize,
|
|
93
|
+
lineHeight: bodyLineHeight,
|
|
94
|
+
fontWeight: bodyFontWeight
|
|
95
|
+
};
|
|
96
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
97
|
+
style: [containerStyle, style],
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
99
|
+
style: leftWrapStyle,
|
|
100
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
101
|
+
style: textWrapStyle,
|
|
102
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
103
|
+
style: titleStyle,
|
|
104
|
+
children: title
|
|
105
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
106
|
+
style: bodyStyle,
|
|
107
|
+
children: body
|
|
108
|
+
})]
|
|
109
|
+
}), buttonSlot ? (0, _reactUtils.cloneChildrenWithModes)(buttonSlot, {
|
|
110
|
+
...modes,
|
|
111
|
+
AppearanceBrand: 'Secondary',
|
|
112
|
+
'Button / Size': 'S'
|
|
113
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
114
|
+
label: buttonLabel,
|
|
115
|
+
onPress: onPressButton || (() => {}),
|
|
116
|
+
modes: {
|
|
117
|
+
...modes,
|
|
118
|
+
AppearanceBrand: 'Secondary',
|
|
119
|
+
'Button / Size': 'S'
|
|
120
|
+
}
|
|
121
|
+
})]
|
|
122
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
123
|
+
style: rightWrapStyle,
|
|
124
|
+
children: iconSlot ? (0, _reactUtils.cloneChildrenWithModes)(iconSlot, {
|
|
125
|
+
...modes,
|
|
126
|
+
'IconCapsule / Size': 'M',
|
|
127
|
+
Emphasis: 'Medium',
|
|
128
|
+
AppearanceBrand: 'Secondary'
|
|
129
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
|
|
130
|
+
iconName: iconName,
|
|
131
|
+
modes: {
|
|
132
|
+
...modes,
|
|
133
|
+
'IconCapsule / Size': 'M',
|
|
134
|
+
Emphasis: 'Medium',
|
|
135
|
+
AppearanceBrand: 'Secondary'
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
var _default = exports.default = CardCTA;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
+
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
|
+
var _reactUtils = require("../../utils/react-utils");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const defaultCardArt = require('./cf64a67d5075caa8924d20b4e4e650d47b3ee08b.png');
|
|
15
|
+
function DebitCard({
|
|
16
|
+
cardholderName = 'Shruti Shukla',
|
|
17
|
+
cardNumber = '•••• 1234',
|
|
18
|
+
expireDate = '02/28',
|
|
19
|
+
bankName = 'JioFinance',
|
|
20
|
+
cardType = 'Debit',
|
|
21
|
+
cardArtSource = defaultCardArt,
|
|
22
|
+
bankLogoSlot,
|
|
23
|
+
providerLogoSlot,
|
|
24
|
+
modes: propModes = {},
|
|
25
|
+
style
|
|
26
|
+
}) {
|
|
27
|
+
const {
|
|
28
|
+
modes: globalModes
|
|
29
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
30
|
+
const modes = {
|
|
31
|
+
...globalModes,
|
|
32
|
+
...propModes
|
|
33
|
+
};
|
|
34
|
+
const background = (0, _figmaVariablesResolver.getVariableByName)('debitCard/background', modes) || '#cea15a';
|
|
35
|
+
const radius = (0, _figmaVariablesResolver.getVariableByName)('debitCard/radius', modes) || 16;
|
|
36
|
+
const width = (0, _figmaVariablesResolver.getVariableByName)('debitCard/width', modes) || 328;
|
|
37
|
+
const height = (0, _figmaVariablesResolver.getVariableByName)('debitCard/height', modes) || 224;
|
|
38
|
+
const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('debitCard/padding/bottom', modes) || 24;
|
|
39
|
+
const headerPaddingH = (0, _figmaVariablesResolver.getVariableByName)('debitCard/header/padding/horizontal', modes) || 20;
|
|
40
|
+
const headerPaddingTop = (0, _figmaVariablesResolver.getVariableByName)('debitCard/header/padding/top', modes) || 16;
|
|
41
|
+
const headerPaddingBottom = (0, _figmaVariablesResolver.getVariableByName)('debitCard/header/padding/bottom', modes) || 28;
|
|
42
|
+
const cardArtHeight = (0, _figmaVariablesResolver.getVariableByName)('debitCard/cardArt/height', modes) || 50;
|
|
43
|
+
const cardArtRadius = (0, _figmaVariablesResolver.getVariableByName)('debitCard/cardArt/radius', modes) || 4;
|
|
44
|
+
const footerGap = (0, _figmaVariablesResolver.getVariableByName)('debitCard/footer/gap', modes) || 16;
|
|
45
|
+
const footerPaddingH = (0, _figmaVariablesResolver.getVariableByName)('debitCard/footer/padding/horizontal', modes) || 20;
|
|
46
|
+
const footerPaddingTop = (0, _figmaVariablesResolver.getVariableByName)('debitCard/footer/padding/top', modes) || 16;
|
|
47
|
+
const foreground = (0, _figmaVariablesResolver.getVariableByName)('debitCard/foreground', modes) || '#141414';
|
|
48
|
+
const fontSize = (0, _figmaVariablesResolver.getVariableByName)('debitCard/fontSize', modes) || 14;
|
|
49
|
+
const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('debitCard/fontFamily', modes) || 'JioType Var';
|
|
50
|
+
const lineHeight = (0, _figmaVariablesResolver.getVariableByName)('debitCard/lineHeight', modes) || 17;
|
|
51
|
+
const fontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('debitCard/fontWeight', modes) || 500;
|
|
52
|
+
const fontWeight = typeof fontWeightRaw === 'number' ? fontWeightRaw.toString() : fontWeightRaw;
|
|
53
|
+
const containerStyle = {
|
|
54
|
+
backgroundColor: background,
|
|
55
|
+
borderRadius: radius,
|
|
56
|
+
width,
|
|
57
|
+
height,
|
|
58
|
+
paddingBottom,
|
|
59
|
+
overflow: 'hidden'
|
|
60
|
+
};
|
|
61
|
+
const headerStyle = {
|
|
62
|
+
flexDirection: 'row',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
justifyContent: 'space-between',
|
|
65
|
+
paddingHorizontal: headerPaddingH,
|
|
66
|
+
paddingTop: headerPaddingTop,
|
|
67
|
+
paddingBottom: headerPaddingBottom,
|
|
68
|
+
overflow: 'hidden'
|
|
69
|
+
};
|
|
70
|
+
const headerLeftStyle = {
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
gap: 4
|
|
74
|
+
};
|
|
75
|
+
const headerRightStyle = {
|
|
76
|
+
flexDirection: 'row',
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
gap: 8
|
|
79
|
+
};
|
|
80
|
+
const headerTextStyle = {
|
|
81
|
+
color: foreground,
|
|
82
|
+
fontFamily,
|
|
83
|
+
fontSize,
|
|
84
|
+
fontWeight,
|
|
85
|
+
lineHeight: fontSize * 1.2
|
|
86
|
+
};
|
|
87
|
+
const cardArtContainerStyle = {
|
|
88
|
+
height: cardArtHeight,
|
|
89
|
+
width: '100%',
|
|
90
|
+
borderRadius: cardArtRadius,
|
|
91
|
+
overflow: 'hidden'
|
|
92
|
+
};
|
|
93
|
+
const cardArtImageStyle = {
|
|
94
|
+
width: '100%',
|
|
95
|
+
height: '100%',
|
|
96
|
+
borderRadius: cardArtRadius
|
|
97
|
+
};
|
|
98
|
+
const footerStyle = {
|
|
99
|
+
flex: 1,
|
|
100
|
+
gap: footerGap,
|
|
101
|
+
paddingHorizontal: footerPaddingH,
|
|
102
|
+
paddingTop: footerPaddingTop,
|
|
103
|
+
overflow: 'hidden'
|
|
104
|
+
};
|
|
105
|
+
const textStyle = {
|
|
106
|
+
color: foreground,
|
|
107
|
+
fontFamily,
|
|
108
|
+
fontSize,
|
|
109
|
+
lineHeight,
|
|
110
|
+
fontWeight
|
|
111
|
+
};
|
|
112
|
+
const stackStyle = {
|
|
113
|
+
flexDirection: 'row',
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
justifyContent: 'space-between'
|
|
116
|
+
};
|
|
117
|
+
const normalizedCardArt = _react.default.useMemo(() => {
|
|
118
|
+
if (!cardArtSource) return null;
|
|
119
|
+
if (typeof cardArtSource === 'string') return {
|
|
120
|
+
uri: cardArtSource
|
|
121
|
+
};
|
|
122
|
+
return cardArtSource;
|
|
123
|
+
}, [cardArtSource]);
|
|
124
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
125
|
+
style: [containerStyle, style],
|
|
126
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
127
|
+
style: headerStyle,
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
129
|
+
style: headerLeftStyle,
|
|
130
|
+
children: [bankLogoSlot ? (0, _reactUtils.cloneChildrenWithModes)(bankLogoSlot, modes) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
131
|
+
style: headerTextStyle,
|
|
132
|
+
children: bankName
|
|
133
|
+
})]
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
135
|
+
style: headerRightStyle,
|
|
136
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
137
|
+
style: headerTextStyle,
|
|
138
|
+
children: cardType
|
|
139
|
+
}), providerLogoSlot ? (0, _reactUtils.cloneChildrenWithModes)(providerLogoSlot, modes) : null]
|
|
140
|
+
})]
|
|
141
|
+
}), normalizedCardArt && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
142
|
+
style: cardArtContainerStyle,
|
|
143
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
144
|
+
source: normalizedCardArt,
|
|
145
|
+
style: cardArtImageStyle,
|
|
146
|
+
resizeMode: "cover"
|
|
147
|
+
})
|
|
148
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
149
|
+
style: footerStyle,
|
|
150
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
151
|
+
style: textStyle,
|
|
152
|
+
children: cardNumber
|
|
153
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
154
|
+
style: stackStyle,
|
|
155
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
156
|
+
style: textStyle,
|
|
157
|
+
children: cardholderName
|
|
158
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
159
|
+
style: textStyle,
|
|
160
|
+
children: expireDate
|
|
161
|
+
})]
|
|
162
|
+
})]
|
|
163
|
+
})]
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
var _default = exports.default = DebitCard;
|
|
Binary file
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
|
-
var
|
|
10
|
+
var _NavArrow = _interopRequireDefault(require("../NavArrow/NavArrow"));
|
|
11
11
|
var _webPlatformUtils = require("../../utils/web-platform-utils");
|
|
12
12
|
var _reactUtils = require("../../utils/react-utils");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -144,12 +144,9 @@ function Section({
|
|
|
144
144
|
accessibilityElementsHidden: true,
|
|
145
145
|
importantForAccessibility: "no",
|
|
146
146
|
children: title
|
|
147
|
-
}), onPress && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
color: titleColor,
|
|
151
|
-
accessibilityElementsHidden: true,
|
|
152
|
-
importantForAccessibility: "no"
|
|
147
|
+
}), onPress && /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavArrow.default, {
|
|
148
|
+
direction: "Forward",
|
|
149
|
+
modes: modes
|
|
153
150
|
})]
|
|
154
151
|
}), showSupportText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
155
152
|
style: supportTextStyle,
|
|
@@ -207,7 +204,7 @@ function Section({
|
|
|
207
204
|
flexDirection: slotDirection,
|
|
208
205
|
gap
|
|
209
206
|
},
|
|
210
|
-
children: slot
|
|
207
|
+
children: (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(slot), modes)
|
|
211
208
|
})]
|
|
212
209
|
});
|
|
213
210
|
}
|
|
@@ -31,8 +31,12 @@ function TabItem({
|
|
|
31
31
|
const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('tabItem/label/fontFamily', modes) ?? 'JioType Var';
|
|
32
32
|
const fontSize = (0, _figmaVariablesResolver.getVariableByName)('tabItem/label/size', modes) ?? 14;
|
|
33
33
|
const lineHeight = (0, _figmaVariablesResolver.getVariableByName)('tabItem/label/lineHeight', modes) ?? 17;
|
|
34
|
+
const fontWeight = String((0, _figmaVariablesResolver.getVariableByName)('tabItem/label/fontWeight', modes) ?? 500);
|
|
34
35
|
const idleLabelColor = (0, _figmaVariablesResolver.getVariableByName)('tabItem/idle/label/color', modes) ?? '#303338';
|
|
35
|
-
const activeLabelColor = (0, _figmaVariablesResolver.getVariableByName)('tabItem/active/label/color', modes) ?? '#
|
|
36
|
+
const activeLabelColor = (0, _figmaVariablesResolver.getVariableByName)('tabItem/active/label/color', modes) ?? '#000000';
|
|
37
|
+
const indicatorBackground = (0, _figmaVariablesResolver.getVariableByName)('tabItem/indicator/background', modes) ?? '#CEA15A';
|
|
38
|
+
const indicatorHeight = (0, _figmaVariablesResolver.getVariableByName)('tabItem/indicator/height', modes) ?? 2;
|
|
39
|
+
const indicatorRadius = (0, _figmaVariablesResolver.getVariableByName)('tabItem/indicator/radius', modes) ?? 99;
|
|
36
40
|
const labelColor = active ? activeLabelColor : idleLabelColor;
|
|
37
41
|
const containerStyle = {
|
|
38
42
|
flexDirection: 'column',
|
|
@@ -45,16 +49,16 @@ function TabItem({
|
|
|
45
49
|
fontFamily,
|
|
46
50
|
fontSize,
|
|
47
51
|
lineHeight,
|
|
48
|
-
fontWeight
|
|
52
|
+
fontWeight
|
|
49
53
|
};
|
|
50
54
|
const indicatorStyle = {
|
|
51
55
|
position: 'absolute',
|
|
52
56
|
bottom: 0,
|
|
53
57
|
left: 0,
|
|
54
58
|
right: 0,
|
|
55
|
-
height:
|
|
56
|
-
backgroundColor:
|
|
57
|
-
borderRadius:
|
|
59
|
+
height: indicatorHeight,
|
|
60
|
+
backgroundColor: indicatorBackground,
|
|
61
|
+
borderRadius: indicatorRadius
|
|
58
62
|
};
|
|
59
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
60
64
|
style: ({
|
|
@@ -64,11 +64,13 @@ function Tabs({
|
|
|
64
64
|
});
|
|
65
65
|
const containerStyle = {
|
|
66
66
|
flexDirection: 'row',
|
|
67
|
+
alignItems: 'flex-start',
|
|
67
68
|
gap,
|
|
68
69
|
paddingTop,
|
|
69
70
|
paddingBottom,
|
|
70
71
|
paddingLeft,
|
|
71
|
-
paddingRight
|
|
72
|
+
paddingRight,
|
|
73
|
+
overflow: 'hidden'
|
|
72
74
|
};
|
|
73
75
|
if (scrollable) {
|
|
74
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
@@ -10,31 +10,18 @@ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resol
|
|
|
10
10
|
var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
/**
|
|
14
|
-
* Title component that mirrors the Figma "Title" component.
|
|
15
|
-
*
|
|
16
|
-
* This component displays a title with design-token driven styling
|
|
17
|
-
* via `getVariableByName` and `modes`.
|
|
18
|
-
*
|
|
19
|
-
* @component
|
|
20
|
-
* @param {Object} props
|
|
21
|
-
* @param {string} [props.title='Page Title'] - Title text to display
|
|
22
|
-
* @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens
|
|
23
|
-
* @param {Object} [props.style] - Optional container style overrides
|
|
24
|
-
* @param {Object} [props.textStyle] - Optional text style overrides
|
|
25
|
-
* @param {string} [props.accessibilityLabel] - Accessibility label for screen readers. If not provided, uses title
|
|
26
|
-
* @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
|
|
27
|
-
*/
|
|
28
13
|
const TEXT_ALIGN_MAP = {
|
|
29
14
|
Left: 'left',
|
|
30
15
|
Center: 'center'
|
|
31
16
|
};
|
|
32
17
|
function Title({
|
|
33
|
-
title = '
|
|
18
|
+
title = 'Title',
|
|
19
|
+
subtitle,
|
|
34
20
|
textAlign = 'Left',
|
|
35
21
|
modes: propModes = {},
|
|
36
22
|
style,
|
|
37
23
|
textStyle,
|
|
24
|
+
subtitleStyle,
|
|
38
25
|
numberOfLines,
|
|
39
26
|
accessibilityLabel,
|
|
40
27
|
accessibilityHint,
|
|
@@ -49,21 +36,29 @@ function Title({
|
|
|
49
36
|
};
|
|
50
37
|
const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('title/padding/horizontal', modes) || 16;
|
|
51
38
|
const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('title/padding/vertical', modes) || 8;
|
|
39
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('title/gap', modes) || 8;
|
|
52
40
|
const labelColor = (0, _figmaVariablesResolver.getVariableByName)('title/label/color', modes) || '#0d0d0f';
|
|
53
41
|
const fontSize = (0, _figmaVariablesResolver.getVariableByName)('title/fontSize', modes) || 26;
|
|
54
42
|
const lineHeight = (0, _figmaVariablesResolver.getVariableByName)('title/lineHeight', modes) || 26;
|
|
55
43
|
const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('title/fontFamily', modes) || 'System';
|
|
56
|
-
const fontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('title/fontWeight', modes) ||
|
|
44
|
+
const fontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('title/fontWeight', modes) || 900;
|
|
57
45
|
const fontWeight = typeof fontWeightRaw === 'number' ? fontWeightRaw.toString() : fontWeightRaw;
|
|
46
|
+
const subtitleColor = (0, _figmaVariablesResolver.getVariableByName)('pageSubtitle/label/color', modes) || '#0d0d0f';
|
|
47
|
+
const subtitleFontSize = (0, _figmaVariablesResolver.getVariableByName)('pageSubtitle/fontSize', modes) || 14;
|
|
48
|
+
const subtitleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('pageSubtitle/lineHeight', modes) || 18;
|
|
49
|
+
const subtitleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('pageSubtitle/fontFamily', modes) || 'System';
|
|
50
|
+
const subtitleFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('pageSubtitle/fontWeight', modes) || 500;
|
|
51
|
+
const subtitleFontWeight = typeof subtitleFontWeightRaw === 'number' ? subtitleFontWeightRaw.toString() : subtitleFontWeightRaw;
|
|
58
52
|
const containerStyle = {
|
|
59
53
|
flexDirection: 'column',
|
|
60
54
|
alignItems: textAlign === 'Center' ? 'center' : 'stretch',
|
|
61
55
|
justifyContent: 'center',
|
|
62
56
|
paddingHorizontal,
|
|
63
57
|
paddingVertical,
|
|
58
|
+
gap,
|
|
64
59
|
width: '100%'
|
|
65
60
|
};
|
|
66
|
-
const
|
|
61
|
+
const titleTextStyle = {
|
|
67
62
|
color: labelColor,
|
|
68
63
|
fontSize,
|
|
69
64
|
lineHeight,
|
|
@@ -72,20 +67,33 @@ function Title({
|
|
|
72
67
|
flexShrink: 1,
|
|
73
68
|
textAlign: TEXT_ALIGN_MAP[textAlign]
|
|
74
69
|
};
|
|
75
|
-
const
|
|
76
|
-
|
|
70
|
+
const subtitleTextStyle = {
|
|
71
|
+
color: subtitleColor,
|
|
72
|
+
fontSize: subtitleFontSize,
|
|
73
|
+
lineHeight: subtitleLineHeight,
|
|
74
|
+
fontFamily: subtitleFontFamily,
|
|
75
|
+
fontWeight: subtitleFontWeight,
|
|
76
|
+
flexShrink: 1,
|
|
77
|
+
textAlign: TEXT_ALIGN_MAP[textAlign]
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
77
80
|
style: [containerStyle, style],
|
|
78
81
|
accessibilityRole: "header",
|
|
79
|
-
accessibilityLabel:
|
|
82
|
+
accessibilityLabel: accessibilityLabel,
|
|
80
83
|
accessibilityHint: accessibilityHint,
|
|
81
84
|
...rest,
|
|
82
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
83
|
-
style: [
|
|
85
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
86
|
+
style: [titleTextStyle, textStyle],
|
|
84
87
|
numberOfLines: numberOfLines !== undefined ? numberOfLines : 1,
|
|
85
88
|
accessibilityElementsHidden: true,
|
|
86
89
|
importantForAccessibility: "no",
|
|
87
90
|
children: title
|
|
88
|
-
})
|
|
91
|
+
}), subtitle != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
92
|
+
style: [subtitleTextStyle, subtitleStyle],
|
|
93
|
+
accessibilityElementsHidden: true,
|
|
94
|
+
importantForAccessibility: "no",
|
|
95
|
+
children: subtitle
|
|
96
|
+
})]
|
|
89
97
|
});
|
|
90
98
|
}
|
|
91
99
|
var _default = exports.default = Title;
|
|
@@ -87,6 +87,12 @@ Object.defineProperty(exports, "Card", {
|
|
|
87
87
|
return _Card.default;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "CardCTA", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _CardCTA.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
90
96
|
Object.defineProperty(exports, "CardFeedback", {
|
|
91
97
|
enumerable: true,
|
|
92
98
|
get: function () {
|
|
@@ -123,10 +129,10 @@ Object.defineProperty(exports, "ChipSelect", {
|
|
|
123
129
|
return _ChipSelect.default;
|
|
124
130
|
}
|
|
125
131
|
});
|
|
126
|
-
Object.defineProperty(exports, "
|
|
132
|
+
Object.defineProperty(exports, "DebitCard", {
|
|
127
133
|
enumerable: true,
|
|
128
134
|
get: function () {
|
|
129
|
-
return
|
|
135
|
+
return _DebitCard.default;
|
|
130
136
|
}
|
|
131
137
|
});
|
|
132
138
|
Object.defineProperty(exports, "Disclaimer", {
|
|
@@ -498,7 +504,8 @@ var _CardFeedback = _interopRequireDefault(require("./CardFeedback/CardFeedback"
|
|
|
498
504
|
var _Disclaimer = _interopRequireDefault(require("./Disclaimer/Disclaimer"));
|
|
499
505
|
var _Divider = _interopRequireDefault(require("./Divider/Divider"));
|
|
500
506
|
var _Drawer = _interopRequireDefault(require("./Drawer/Drawer"));
|
|
501
|
-
var
|
|
507
|
+
var _CardCTA = _interopRequireDefault(require("./CardCTA/CardCTA"));
|
|
508
|
+
var _DebitCard = _interopRequireDefault(require("./DebitCard/DebitCard"));
|
|
502
509
|
var _FilterBar = _interopRequireDefault(require("./FilterBar/FilterBar"));
|
|
503
510
|
var _Form = _interopRequireWildcard(require("./Form/Form"));
|
|
504
511
|
var _FormField = _interopRequireDefault(require("./FormField/FormField"));
|