jfs-components 0.0.45 → 0.0.48
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/components/ChipSelect/ChipSelect.js +1 -2
- package/lib/commonjs/components/Drawer/demo.xml +18 -0
- package/lib/commonjs/components/FormField/FormField.js +1 -0
- package/lib/commonjs/components/NoteInput/NoteInput.js +1 -2
- package/lib/commonjs/components/Nudge/Nudge.js +143 -0
- package/lib/commonjs/components/PaymentFeedback/PaymentFeedback.js +148 -0
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +131 -0
- package/lib/commonjs/components/SupportText/SupportTextIcon.js +2 -3
- package/lib/commonjs/components/Tabs/TabItem.js +9 -5
- package/lib/commonjs/components/Tabs/Tabs.js +3 -1
- package/lib/commonjs/components/Text/Text.js +7 -1
- package/lib/commonjs/components/Title/Title.js +99 -0
- package/lib/commonjs/components/UpiHandle/UpiHandle.js +5 -2
- package/lib/commonjs/components/index.js +52 -3
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/utils/index.js +18 -0
- package/lib/module/components/ChipSelect/ChipSelect.js +1 -2
- package/lib/module/components/Drawer/demo.xml +18 -0
- package/lib/module/components/FormField/FormField.js +1 -0
- package/lib/module/components/NoteInput/NoteInput.js +1 -2
- package/lib/module/components/Nudge/Nudge.js +138 -0
- package/lib/module/components/PaymentFeedback/PaymentFeedback.js +142 -0
- package/lib/module/components/SegmentedControl/SegmentedControl.js +126 -0
- package/lib/module/components/SupportText/SupportTextIcon.js +2 -3
- package/lib/module/components/Tabs/TabItem.js +9 -5
- package/lib/module/components/Tabs/Tabs.js +3 -1
- package/lib/module/components/Text/Text.js +7 -1
- package/lib/module/components/Title/Title.js +94 -0
- package/lib/module/components/UpiHandle/UpiHandle.js +5 -2
- package/lib/module/components/index.js +8 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/utils/index.js +3 -0
- package/lib/typescript/src/components/ChipSelect/ChipSelect.d.ts +1 -6
- package/lib/typescript/src/components/LinearMeter/LinearMeter.d.ts +1 -1
- package/lib/typescript/src/components/Nudge/Nudge.d.ts +31 -0
- package/lib/typescript/src/components/PaymentFeedback/PaymentFeedback.d.ts +23 -0
- package/lib/typescript/src/components/RechargeCard/RechargeCard.d.ts +1 -2
- package/lib/typescript/src/components/SegmentedControl/SegmentedControl.d.ts +49 -0
- package/lib/typescript/src/components/SupportText/SupportText.d.ts +1 -1
- package/lib/typescript/src/components/SupportText/SupportTextIcon.d.ts +1 -1
- package/lib/typescript/src/components/Text/Text.d.ts +3 -1
- package/lib/typescript/src/components/Title/Title.d.ts +20 -0
- package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +3 -1
- package/lib/typescript/src/components/index.d.ts +13 -5
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/utils/index.d.ts +2 -0
- package/package.json +2 -2
- package/src/components/ChipSelect/ChipSelect.tsx +1 -8
- package/src/components/Drawer/demo.xml +18 -0
- package/src/components/FormField/FormField.tsx +1 -0
- package/src/components/LinearMeter/LinearMeter.tsx +1 -1
- package/src/components/NoteInput/NoteInput.tsx +1 -1
- package/src/components/Nudge/Nudge.tsx +150 -0
- package/src/components/PaymentFeedback/PaymentFeedback.tsx +168 -0
- package/src/components/RechargeCard/RechargeCard.tsx +1 -1
- package/src/components/SegmentedControl/SegmentedControl.tsx +168 -0
- package/src/components/SupportText/SupportText.tsx +1 -1
- package/src/components/SupportText/SupportTextIcon.tsx +4 -3
- package/src/components/Tabs/TabItem.tsx +10 -5
- package/src/components/Tabs/Tabs.tsx +2 -0
- package/src/components/Text/Text.tsx +9 -0
- package/src/components/Title/Title.tsx +137 -0
- package/src/components/UpiHandle/UpiHandle.tsx +6 -2
- package/src/components/index.ts +13 -5
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/icons/registry.ts +1 -1
- package/src/index.ts +1 -0
- package/src/utils/index.ts +1 -0
- package/lib/commonjs/components/PageTitle/PageTitle.js +0 -90
- package/lib/module/components/PageTitle/PageTitle.js +0 -85
- package/lib/typescript/src/components/PageTitle/PageTitle.d.ts +0 -29
- package/src/components/PageTitle/PageTitle.tsx +0 -106
|
@@ -18,7 +18,6 @@ function ChipSelect({
|
|
|
18
18
|
label = 'Date',
|
|
19
19
|
active = false,
|
|
20
20
|
icon = 'ic_calendar_week',
|
|
21
|
-
close = true,
|
|
22
21
|
modes = {},
|
|
23
22
|
style,
|
|
24
23
|
labelSlot,
|
|
@@ -92,7 +91,7 @@ function ChipSelect({
|
|
|
92
91
|
name: icon,
|
|
93
92
|
size: iconSize,
|
|
94
93
|
color: textColor
|
|
95
|
-
}), renderLabel(), active &&
|
|
94
|
+
}), renderLabel(), active && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
96
95
|
name: "ic_close",
|
|
97
96
|
size: iconSize,
|
|
98
97
|
color: textColor
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<design>
|
|
2
|
+
<ListItem layout="Horizontal" leadingType="Avatar" navArrow="false" showSupportText="true" start="true" supportText="Support Text" title="Aasa Singh" trailing="true">
|
|
3
|
+
<Avatar monogram="MS" style="Image"></Avatar>
|
|
4
|
+
<frame horizontalSizing="FILL" name="text wrap" verticalSizing="HUG">
|
|
5
|
+
<slot name="supportText">
|
|
6
|
+
<text name="support text">₹10,000</text>
|
|
7
|
+
</slot>
|
|
8
|
+
<text name="Title">Aasa Singh</text>
|
|
9
|
+
</frame>
|
|
10
|
+
<frame horizontalSizing="HUG" modes='{"Context":"ListItem"}' name="end wrap" verticalSizing="HUG">
|
|
11
|
+
<slot name="slot">
|
|
12
|
+
<Button label="Button">
|
|
13
|
+
<text name="Label">Button</text>
|
|
14
|
+
</Button>
|
|
15
|
+
</slot>
|
|
16
|
+
</frame>
|
|
17
|
+
</ListItem>
|
|
18
|
+
</design>
|
|
@@ -87,6 +87,7 @@ function useFormField(props) {
|
|
|
87
87
|
borderWidth: inputBorderSize,
|
|
88
88
|
borderRadius: inputRadius,
|
|
89
89
|
paddingHorizontal: inputPaddingH,
|
|
90
|
+
paddingVertical: 0,
|
|
90
91
|
gap: inputGap
|
|
91
92
|
}), [inputBackground, inputBorderColor, inputBorderSize, inputRadius, inputPaddingH, inputGap]);
|
|
92
93
|
const inputTextStyle = (0, _react.useMemo)(() => ({
|
|
@@ -52,9 +52,8 @@ function NoteInput({
|
|
|
52
52
|
backgroundColor: background,
|
|
53
53
|
borderWidth: borderSize,
|
|
54
54
|
borderColor: borderColor,
|
|
55
|
-
gap: gap
|
|
55
|
+
gap: gap
|
|
56
56
|
// Add specific width when editing if requested by Figma design logic, though flex fits content generically
|
|
57
|
-
alignSelf: 'flex-start'
|
|
58
57
|
};
|
|
59
58
|
const baseTextStyle = {
|
|
60
59
|
color: foreground,
|
|
@@ -0,0 +1,143 @@
|
|
|
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 _Button = _interopRequireDefault(require("../Button/Button"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function Nudge({
|
|
16
|
+
variant = 'Default',
|
|
17
|
+
title = 'Split payment',
|
|
18
|
+
body = 'Split this transaction into installments',
|
|
19
|
+
buttonLabel = 'Button',
|
|
20
|
+
onPressButton,
|
|
21
|
+
buttonSlot,
|
|
22
|
+
startSlot,
|
|
23
|
+
children,
|
|
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)('nudge/background', modes) || '#f5f5f5';
|
|
35
|
+
const radius = (0, _figmaVariablesResolver.getVariableByName)('nudge/radius', modes) || 12;
|
|
36
|
+
const paddingH = (0, _figmaVariablesResolver.getVariableByName)('nudge/padding/horizontal', modes) || 12;
|
|
37
|
+
const paddingV = (0, _figmaVariablesResolver.getVariableByName)('nudge/padding/vertical', modes) || 12;
|
|
38
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('nudge/gap', modes) || 6;
|
|
39
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('nudge/title/color', modes) || '#0d0d0f';
|
|
40
|
+
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('nudge/title/fontSize', modes) || 14;
|
|
41
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('nudge/title/fontFamily', modes) || 'JioType Var';
|
|
42
|
+
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('nudge/title/lineHeight', modes) || 15;
|
|
43
|
+
const titleFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('nudge/title/fontWeight', modes) || 700;
|
|
44
|
+
const titleFontWeight = typeof titleFontWeightRaw === 'number' ? titleFontWeightRaw.toString() : titleFontWeightRaw;
|
|
45
|
+
const bodyColor = (0, _figmaVariablesResolver.getVariableByName)('nudge/body/color', modes) || '#1a1c1f';
|
|
46
|
+
const bodyFontSize = (0, _figmaVariablesResolver.getVariableByName)('nudge/body/fontSize', modes) || 12;
|
|
47
|
+
const bodyFontFamily = (0, _figmaVariablesResolver.getVariableByName)('nudge/body/fontFamily', modes) || 'JioType Var';
|
|
48
|
+
const bodyLineHeight = (0, _figmaVariablesResolver.getVariableByName)('nudge/body/lineHeight', modes) || 16;
|
|
49
|
+
const bodyFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('nudge/body/fontWeight', modes) || 500;
|
|
50
|
+
const bodyFontWeight = typeof bodyFontWeightRaw === 'number' ? bodyFontWeightRaw.toString() : bodyFontWeightRaw;
|
|
51
|
+
const textGap = (0, _figmaVariablesResolver.getVariableByName)('nudge/text/gap', modes) || 4;
|
|
52
|
+
const contentGap = (0, _figmaVariablesResolver.getVariableByName)('nudge/content/gap', modes) || 8;
|
|
53
|
+
const contentMinHeight = (0, _figmaVariablesResolver.getVariableByName)('nudge/content/minHeight', modes) || 20;
|
|
54
|
+
const containerStyle = {
|
|
55
|
+
backgroundColor: background,
|
|
56
|
+
borderRadius: radius,
|
|
57
|
+
paddingHorizontal: paddingH,
|
|
58
|
+
paddingVertical: paddingV,
|
|
59
|
+
gap,
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
...(variant === 'Variant2' ? {
|
|
62
|
+
flexDirection: 'column',
|
|
63
|
+
alignItems: 'flex-start'
|
|
64
|
+
} : {
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
alignItems: 'flex-start'
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
const titleStyle = {
|
|
70
|
+
color: titleColor,
|
|
71
|
+
fontSize: titleFontSize,
|
|
72
|
+
fontFamily: titleFontFamily,
|
|
73
|
+
lineHeight: titleLineHeight,
|
|
74
|
+
fontWeight: titleFontWeight
|
|
75
|
+
};
|
|
76
|
+
const bodyStyle = {
|
|
77
|
+
color: bodyColor,
|
|
78
|
+
fontSize: bodyFontSize,
|
|
79
|
+
fontFamily: bodyFontFamily,
|
|
80
|
+
lineHeight: bodyLineHeight,
|
|
81
|
+
fontWeight: bodyFontWeight
|
|
82
|
+
};
|
|
83
|
+
const processedStartSlot = startSlot ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(startSlot), modes) : null;
|
|
84
|
+
const startSlotElement = processedStartSlot && processedStartSlot.length > 0 ? processedStartSlot.length === 1 ? processedStartSlot[0] : processedStartSlot : null;
|
|
85
|
+
if (variant === 'Variant2') {
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
87
|
+
style: [containerStyle, style],
|
|
88
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
89
|
+
style: {
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
gap: 6,
|
|
93
|
+
width: '100%'
|
|
94
|
+
},
|
|
95
|
+
children: [startSlotElement, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
96
|
+
style: [titleStyle, {
|
|
97
|
+
flex: 1
|
|
98
|
+
}],
|
|
99
|
+
children: title
|
|
100
|
+
})]
|
|
101
|
+
}), children ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(children), modes) : null]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const defaultContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
105
|
+
style: {
|
|
106
|
+
gap: contentGap,
|
|
107
|
+
alignItems: 'flex-start',
|
|
108
|
+
width: '100%'
|
|
109
|
+
},
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
111
|
+
style: {
|
|
112
|
+
gap: textGap,
|
|
113
|
+
alignItems: 'flex-start',
|
|
114
|
+
width: '100%'
|
|
115
|
+
},
|
|
116
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
117
|
+
style: titleStyle,
|
|
118
|
+
children: title
|
|
119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
120
|
+
style: bodyStyle,
|
|
121
|
+
children: body
|
|
122
|
+
})]
|
|
123
|
+
}), buttonSlot ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(buttonSlot), modes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
124
|
+
label: buttonLabel,
|
|
125
|
+
onPress: onPressButton,
|
|
126
|
+
modes: modes
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
130
|
+
style: [containerStyle, style],
|
|
131
|
+
children: [startSlotElement, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
132
|
+
style: {
|
|
133
|
+
flex: 1,
|
|
134
|
+
minWidth: 1,
|
|
135
|
+
minHeight: contentMinHeight,
|
|
136
|
+
justifyContent: 'center',
|
|
137
|
+
overflow: 'hidden'
|
|
138
|
+
},
|
|
139
|
+
children: children ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(children), modes) : defaultContent
|
|
140
|
+
})]
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
var _default = exports.default = Nudge;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = PaymentFeedback;
|
|
7
|
+
var _react = _interopRequireWildcard(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 _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
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); }
|
|
15
|
+
function PaymentFeedback({
|
|
16
|
+
title = '₹50,000',
|
|
17
|
+
subtitle = 'Payment successful',
|
|
18
|
+
body = 'Your payment has been\nsuccessfully processed.',
|
|
19
|
+
details = '18 March 2025, 4:15 pm\nTransaction ID: TXN121466784',
|
|
20
|
+
showDetails = true,
|
|
21
|
+
iconName = 'ic_confirm',
|
|
22
|
+
renderMedia,
|
|
23
|
+
modes: propModes = {},
|
|
24
|
+
style
|
|
25
|
+
}) {
|
|
26
|
+
const {
|
|
27
|
+
modes: globalModes
|
|
28
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
29
|
+
const modes = {
|
|
30
|
+
...globalModes,
|
|
31
|
+
...propModes
|
|
32
|
+
};
|
|
33
|
+
const containerGap = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/container/gap', modes)) || 46;
|
|
34
|
+
const messageGap = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/message/gap', modes)) || 12;
|
|
35
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/title/color', modes) || '#0d0d0f';
|
|
36
|
+
const titleFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/title/fontSize', modes)) || 36;
|
|
37
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/title/fontFamily', modes) || 'JioType Var';
|
|
38
|
+
const titleLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/title/lineHeight', modes)) || 36;
|
|
39
|
+
const titleFontWeight = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/title/fontWeight', modes) || '900';
|
|
40
|
+
const subtitleColor = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/subtitle/color', modes) || '#24262b';
|
|
41
|
+
const subtitleFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/subtitle/fontSize', modes)) || 16;
|
|
42
|
+
const subtitleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/subtitle/fontFamily', modes) || 'JioType Var';
|
|
43
|
+
const subtitleLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/subtitle/lineHeight', modes)) || 19;
|
|
44
|
+
const subtitleFontWeight = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/subtitle/fontWeight', modes) || '500';
|
|
45
|
+
const bodyColor = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/body/color', modes) || '#24262b';
|
|
46
|
+
const bodyFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/body/fontSize', modes)) || 14;
|
|
47
|
+
const bodyFontFamily = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/body/fontFamily', modes) || 'JioType Var';
|
|
48
|
+
const bodyLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/body/lineHeight', modes)) || 17;
|
|
49
|
+
const bodyFontWeight = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/body/fontWeight', modes) || '500';
|
|
50
|
+
const detailsColor = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/details/color', modes) || '#24262b';
|
|
51
|
+
const detailsFontSize = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/details/fontSize', modes)) || 14;
|
|
52
|
+
const detailsFontFamily = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/details/fontFamily', modes) || 'JioType Var';
|
|
53
|
+
const detailsLineHeight = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/details/lineHeight', modes)) || 17;
|
|
54
|
+
const detailsFontWeight = (0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/details/fontWeight', modes) || '500';
|
|
55
|
+
const detailsParagraphSpacing = Number((0, _figmaVariablesResolver.getVariableByName)('paymnetFeedback/details/paragraphSpacing', modes)) || 4;
|
|
56
|
+
const containerStyle = {
|
|
57
|
+
flexDirection: 'column',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
gap: containerGap
|
|
60
|
+
};
|
|
61
|
+
const messageContainerStyle = {
|
|
62
|
+
flexDirection: 'column',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
gap: messageGap,
|
|
65
|
+
width: '100%'
|
|
66
|
+
};
|
|
67
|
+
const subtextContainerStyle = {
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
gap: 4,
|
|
71
|
+
width: '100%'
|
|
72
|
+
};
|
|
73
|
+
const titleStyle = {
|
|
74
|
+
color: titleColor,
|
|
75
|
+
fontSize: titleFontSize,
|
|
76
|
+
fontFamily: titleFontFamily,
|
|
77
|
+
lineHeight: titleLineHeight,
|
|
78
|
+
fontWeight: String(titleFontWeight),
|
|
79
|
+
textAlign: 'center'
|
|
80
|
+
};
|
|
81
|
+
const subtitleStyle = {
|
|
82
|
+
color: subtitleColor,
|
|
83
|
+
fontSize: subtitleFontSize,
|
|
84
|
+
fontFamily: subtitleFontFamily,
|
|
85
|
+
lineHeight: subtitleLineHeight,
|
|
86
|
+
fontWeight: String(subtitleFontWeight),
|
|
87
|
+
textAlign: 'center'
|
|
88
|
+
};
|
|
89
|
+
const bodyStyle = {
|
|
90
|
+
color: bodyColor,
|
|
91
|
+
fontSize: bodyFontSize,
|
|
92
|
+
fontFamily: bodyFontFamily,
|
|
93
|
+
lineHeight: bodyLineHeight,
|
|
94
|
+
fontWeight: String(bodyFontWeight),
|
|
95
|
+
textAlign: 'center'
|
|
96
|
+
};
|
|
97
|
+
const detailsStyle = {
|
|
98
|
+
color: detailsColor,
|
|
99
|
+
fontSize: detailsFontSize,
|
|
100
|
+
fontFamily: detailsFontFamily,
|
|
101
|
+
lineHeight: detailsLineHeight,
|
|
102
|
+
fontWeight: String(detailsFontWeight),
|
|
103
|
+
textAlign: 'center'
|
|
104
|
+
};
|
|
105
|
+
const mediaContent = /*#__PURE__*/(0, _react.isValidElement)(renderMedia) ? /*#__PURE__*/(0, _react.cloneElement)(renderMedia, {
|
|
106
|
+
modes
|
|
107
|
+
}) : renderMedia;
|
|
108
|
+
const defaultMedia = /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
|
|
109
|
+
iconName: iconName,
|
|
110
|
+
modes: {
|
|
111
|
+
...modes,
|
|
112
|
+
'Icon Capsule Size': 'L',
|
|
113
|
+
Emphasis: 'High',
|
|
114
|
+
'Semantic Intent': 'System',
|
|
115
|
+
AppearanceSystem: 'positive'
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const detailLines = details?.split('\n') ?? [];
|
|
119
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
120
|
+
style: [containerStyle, style],
|
|
121
|
+
children: [mediaContent ?? defaultMedia, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
122
|
+
style: messageContainerStyle,
|
|
123
|
+
children: [title ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
124
|
+
style: titleStyle,
|
|
125
|
+
children: title
|
|
126
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
127
|
+
style: subtextContainerStyle,
|
|
128
|
+
children: [subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
129
|
+
style: subtitleStyle,
|
|
130
|
+
children: subtitle
|
|
131
|
+
}) : null, body ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
132
|
+
style: bodyStyle,
|
|
133
|
+
children: body
|
|
134
|
+
}) : null]
|
|
135
|
+
})]
|
|
136
|
+
}), showDetails && details ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
137
|
+
style: {
|
|
138
|
+
alignItems: 'center'
|
|
139
|
+
},
|
|
140
|
+
children: detailLines.map((line, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
141
|
+
style: [detailsStyle, i < detailLines.length - 1 ? {
|
|
142
|
+
marginBottom: detailsParagraphSpacing
|
|
143
|
+
} : undefined],
|
|
144
|
+
children: line
|
|
145
|
+
}, i))
|
|
146
|
+
}) : null]
|
|
147
|
+
});
|
|
148
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
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); }
|
|
12
|
+
function SegmentedControlSegment({
|
|
13
|
+
label,
|
|
14
|
+
active,
|
|
15
|
+
onPress,
|
|
16
|
+
modes = {}
|
|
17
|
+
}) {
|
|
18
|
+
const resolvedModes = {
|
|
19
|
+
...modes,
|
|
20
|
+
'SegmentedControl/Segment': active ? 'Active' : 'Idle'
|
|
21
|
+
};
|
|
22
|
+
const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('segment/padding/horizontal', resolvedModes) ?? 16;
|
|
23
|
+
const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('segment/padding/vertical', resolvedModes) ?? 12;
|
|
24
|
+
const radius = (0, _figmaVariablesResolver.getVariableByName)('segment/radius', resolvedModes) ?? 20;
|
|
25
|
+
const background = (0, _figmaVariablesResolver.getVariableByName)('segment/background', resolvedModes) ?? (active ? '#5d00b5' : 'transparent');
|
|
26
|
+
const foreground = (0, _figmaVariablesResolver.getVariableByName)('segment/foreground', resolvedModes) ?? (active ? '#ffffff' : '#0c0d10');
|
|
27
|
+
const fontSize = (0, _figmaVariablesResolver.getVariableByName)('segment/fontSize', resolvedModes) ?? 16;
|
|
28
|
+
const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('segment/fontFamily', resolvedModes) ?? 'JioType Var';
|
|
29
|
+
const lineHeight = (0, _figmaVariablesResolver.getVariableByName)('segment/lineHeight', resolvedModes) ?? 19;
|
|
30
|
+
const fontWeight = (0, _figmaVariablesResolver.getVariableByName)('segment/fontWeight', resolvedModes) ?? '500';
|
|
31
|
+
const segmentStyle = {
|
|
32
|
+
flex: 1,
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
paddingHorizontal,
|
|
36
|
+
paddingVertical,
|
|
37
|
+
borderRadius: radius,
|
|
38
|
+
backgroundColor: background
|
|
39
|
+
};
|
|
40
|
+
const textStyle = {
|
|
41
|
+
color: foreground,
|
|
42
|
+
fontFamily,
|
|
43
|
+
fontSize,
|
|
44
|
+
lineHeight,
|
|
45
|
+
fontWeight: fontWeight
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
48
|
+
style: ({
|
|
49
|
+
pressed
|
|
50
|
+
}) => [segmentStyle, pressed && {
|
|
51
|
+
opacity: 0.8
|
|
52
|
+
}],
|
|
53
|
+
onPress: onPress,
|
|
54
|
+
accessibilityRole: "tab",
|
|
55
|
+
accessibilityState: {
|
|
56
|
+
selected: active
|
|
57
|
+
},
|
|
58
|
+
accessibilityLabel: label,
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
60
|
+
style: textStyle,
|
|
61
|
+
children: label
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* SegmentedControl component backed by Figma design tokens.
|
|
68
|
+
*
|
|
69
|
+
* Provides a horizontal row of mutually exclusive segments.
|
|
70
|
+
* Supports controlled (`selectedKey` + `onSelectionChange`) and
|
|
71
|
+
* uncontrolled (`defaultSelectedKey`) usage patterns.
|
|
72
|
+
*
|
|
73
|
+
* @component
|
|
74
|
+
* @param {SegmentedControlProps} props
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* const [selected, setSelected] = useState<React.Key>('daily');
|
|
79
|
+
*
|
|
80
|
+
* <SegmentedControl
|
|
81
|
+
* items={[
|
|
82
|
+
* { key: 'daily', label: 'Daily' },
|
|
83
|
+
* { key: 'weekly', label: 'Weekly' },
|
|
84
|
+
* { key: 'monthly', label: 'Monthly' },
|
|
85
|
+
* ]}
|
|
86
|
+
* selectedKey={selected}
|
|
87
|
+
* onSelectionChange={setSelected}
|
|
88
|
+
* modes={{ 'Color Mode': 'Light' }}
|
|
89
|
+
* />
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
function SegmentedControl({
|
|
93
|
+
items,
|
|
94
|
+
selectedKey: controlledSelectedKey,
|
|
95
|
+
defaultSelectedKey,
|
|
96
|
+
onSelectionChange,
|
|
97
|
+
modes = {},
|
|
98
|
+
style
|
|
99
|
+
}) {
|
|
100
|
+
const isControlled = controlledSelectedKey !== undefined;
|
|
101
|
+
const [internalSelectedKey, setInternalSelectedKey] = (0, _react.useState)(defaultSelectedKey ?? items[0]?.key);
|
|
102
|
+
const currentSelectedKey = isControlled ? controlledSelectedKey : internalSelectedKey;
|
|
103
|
+
const handlePress = (0, _react.useCallback)(key => {
|
|
104
|
+
if (!isControlled) {
|
|
105
|
+
setInternalSelectedKey(key);
|
|
106
|
+
}
|
|
107
|
+
onSelectionChange?.(key);
|
|
108
|
+
}, [isControlled, onSelectionChange]);
|
|
109
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('segmentedControl/gap', modes) ?? 8;
|
|
110
|
+
const background = (0, _figmaVariablesResolver.getVariableByName)('segmentedControl/background', modes) ?? '#f6f3ff';
|
|
111
|
+
const radius = (0, _figmaVariablesResolver.getVariableByName)('segmentedControl/radius', modes) ?? 24;
|
|
112
|
+
const containerStyle = {
|
|
113
|
+
flexDirection: 'row',
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
backgroundColor: background,
|
|
116
|
+
borderRadius: radius,
|
|
117
|
+
gap,
|
|
118
|
+
overflow: 'hidden'
|
|
119
|
+
};
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
121
|
+
style: [containerStyle, style],
|
|
122
|
+
accessibilityRole: "tablist",
|
|
123
|
+
children: items.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(SegmentedControlSegment, {
|
|
124
|
+
label: item.label,
|
|
125
|
+
active: item.key === currentSelectedKey,
|
|
126
|
+
onPress: () => handlePress(item.key),
|
|
127
|
+
modes: modes
|
|
128
|
+
}, String(item.key)))
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
var _default = exports.default = SegmentedControl;
|
|
@@ -13,10 +13,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
13
13
|
const STATUS_ICON_MAP = {
|
|
14
14
|
Neutral: 'ic_info',
|
|
15
15
|
Warning: 'ic_warning',
|
|
16
|
-
// Using ic_warning for Warning
|
|
17
16
|
Error: 'ic_warning',
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
Success: 'ic_status_successful',
|
|
18
|
+
Loading: 'ic_time'
|
|
20
19
|
};
|
|
21
20
|
function SupportTextIcon({
|
|
22
21
|
status = 'Neutral',
|
|
@@ -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, {
|
|
@@ -9,8 +9,13 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const TEXT_ALIGN_MAP = {
|
|
13
|
+
Left: 'left',
|
|
14
|
+
Center: 'center'
|
|
15
|
+
};
|
|
12
16
|
function Text({
|
|
13
17
|
text = 'Korem ipsum ',
|
|
18
|
+
textAlign = 'Left',
|
|
14
19
|
modes = {},
|
|
15
20
|
style,
|
|
16
21
|
numberOfLines
|
|
@@ -27,7 +32,8 @@ function Text({
|
|
|
27
32
|
fontSize: fontSize,
|
|
28
33
|
fontWeight: String(fontWeight),
|
|
29
34
|
lineHeight: lineHeight,
|
|
30
|
-
letterSpacing: letterSpacing
|
|
35
|
+
letterSpacing: letterSpacing,
|
|
36
|
+
textAlign: TEXT_ALIGN_MAP[textAlign]
|
|
31
37
|
};
|
|
32
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
33
39
|
style: [textStyle, style],
|
|
@@ -0,0 +1,99 @@
|
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const TEXT_ALIGN_MAP = {
|
|
14
|
+
Left: 'left',
|
|
15
|
+
Center: 'center'
|
|
16
|
+
};
|
|
17
|
+
function Title({
|
|
18
|
+
title = 'Title',
|
|
19
|
+
subtitle,
|
|
20
|
+
textAlign = 'Left',
|
|
21
|
+
modes: propModes = {},
|
|
22
|
+
style,
|
|
23
|
+
textStyle,
|
|
24
|
+
subtitleStyle,
|
|
25
|
+
numberOfLines,
|
|
26
|
+
accessibilityLabel,
|
|
27
|
+
accessibilityHint,
|
|
28
|
+
...rest
|
|
29
|
+
}) {
|
|
30
|
+
const {
|
|
31
|
+
modes: globalModes
|
|
32
|
+
} = (0, _JFSThemeProvider.useTokens)();
|
|
33
|
+
const modes = {
|
|
34
|
+
...globalModes,
|
|
35
|
+
...propModes
|
|
36
|
+
};
|
|
37
|
+
const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('title/padding/horizontal', modes) || 16;
|
|
38
|
+
const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('title/padding/vertical', modes) || 8;
|
|
39
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('title/gap', modes) || 8;
|
|
40
|
+
const labelColor = (0, _figmaVariablesResolver.getVariableByName)('title/label/color', modes) || '#0d0d0f';
|
|
41
|
+
const fontSize = (0, _figmaVariablesResolver.getVariableByName)('title/fontSize', modes) || 26;
|
|
42
|
+
const lineHeight = (0, _figmaVariablesResolver.getVariableByName)('title/lineHeight', modes) || 26;
|
|
43
|
+
const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('title/fontFamily', modes) || 'System';
|
|
44
|
+
const fontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('title/fontWeight', modes) || 900;
|
|
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;
|
|
52
|
+
const containerStyle = {
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
alignItems: textAlign === 'Center' ? 'center' : 'stretch',
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
paddingHorizontal,
|
|
57
|
+
paddingVertical,
|
|
58
|
+
gap,
|
|
59
|
+
width: '100%'
|
|
60
|
+
};
|
|
61
|
+
const titleTextStyle = {
|
|
62
|
+
color: labelColor,
|
|
63
|
+
fontSize,
|
|
64
|
+
lineHeight,
|
|
65
|
+
fontFamily,
|
|
66
|
+
fontWeight,
|
|
67
|
+
flexShrink: 1,
|
|
68
|
+
textAlign: TEXT_ALIGN_MAP[textAlign]
|
|
69
|
+
};
|
|
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, {
|
|
80
|
+
style: [containerStyle, style],
|
|
81
|
+
accessibilityRole: "header",
|
|
82
|
+
accessibilityLabel: accessibilityLabel,
|
|
83
|
+
accessibilityHint: accessibilityHint,
|
|
84
|
+
...rest,
|
|
85
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
86
|
+
style: [titleTextStyle, textStyle],
|
|
87
|
+
numberOfLines: numberOfLines !== undefined ? numberOfLines : 1,
|
|
88
|
+
accessibilityElementsHidden: true,
|
|
89
|
+
importantForAccessibility: "no",
|
|
90
|
+
children: title
|
|
91
|
+
}), subtitle != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
92
|
+
style: [subtitleTextStyle, subtitleStyle],
|
|
93
|
+
accessibilityElementsHidden: true,
|
|
94
|
+
importantForAccessibility: "no",
|
|
95
|
+
children: subtitle
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
var _default = exports.default = Title;
|