react-native-my-survey-sdk 3.0.4 → 3.0.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XeboRatingView.d.ts","sourceRoot":"","sources":["../../src/components/XeboRatingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGhE,UAAU,KAAK;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;
|
|
1
|
+
{"version":3,"file":"XeboRatingView.d.ts","sourceRoot":"","sources":["../../src/components/XeboRatingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGhE,UAAU,KAAK;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAsID,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6I1C,CAAC"}
|
|
@@ -81,13 +81,11 @@ function FlatEmoji({ index, selected }) {
|
|
|
81
81
|
</react_native_1.View>)}
|
|
82
82
|
</react_native_1.View>);
|
|
83
83
|
}
|
|
84
|
-
function RatingIcon({ style, index, selected, filled, color,
|
|
85
|
-
var _a;
|
|
84
|
+
function RatingIcon({ style, index, selected, filled, color, }) {
|
|
86
85
|
const activeColor = color || '#F59E0B';
|
|
87
|
-
const inactive = '#E5E7EB';
|
|
88
86
|
switch (style) {
|
|
89
87
|
case 'heart':
|
|
90
|
-
return (<react_native_1.Text style={{ fontSize: 34, color: filled ? activeColor :
|
|
88
|
+
return (<react_native_1.Text style={{ fontSize: 34, color: filled ? activeColor : '#E5E7EB' }}>
|
|
91
89
|
{filled ? '♥' : '♡'}
|
|
92
90
|
</react_native_1.Text>);
|
|
93
91
|
case 'circle':
|
|
@@ -95,38 +93,39 @@ function RatingIcon({ style, index, selected, filled, color, totalSteps, }) {
|
|
|
95
93
|
width: 38,
|
|
96
94
|
height: 38,
|
|
97
95
|
borderRadius: 19,
|
|
98
|
-
backgroundColor: filled ? activeColor :
|
|
99
|
-
borderWidth:
|
|
100
|
-
borderColor: '#D1D5DB',
|
|
96
|
+
backgroundColor: filled ? activeColor : 'transparent',
|
|
97
|
+
borderWidth: 2,
|
|
98
|
+
borderColor: filled ? activeColor : '#D1D5DB',
|
|
101
99
|
}}/>);
|
|
102
100
|
case 'tile':
|
|
103
101
|
return (<react_native_1.View style={{
|
|
104
|
-
width:
|
|
105
|
-
height:
|
|
106
|
-
borderRadius:
|
|
107
|
-
backgroundColor: filled ? activeColor :
|
|
102
|
+
width: 44,
|
|
103
|
+
height: 44,
|
|
104
|
+
borderRadius: 8,
|
|
105
|
+
backgroundColor: filled ? activeColor : '#F3F4F6',
|
|
106
|
+
borderWidth: filled ? 0 : 1.5,
|
|
107
|
+
borderColor: '#D1D5DB',
|
|
108
108
|
alignItems: 'center',
|
|
109
109
|
justifyContent: 'center',
|
|
110
110
|
}}>
|
|
111
|
-
<react_native_1.Text style={{ fontSize:
|
|
111
|
+
<react_native_1.Text style={{ fontSize: 15, fontWeight: '700', color: filled ? '#FFF' : '#6B7280' }}>
|
|
112
112
|
{index + 1}
|
|
113
113
|
</react_native_1.Text>
|
|
114
114
|
</react_native_1.View>);
|
|
115
115
|
case 'emoji':
|
|
116
116
|
case 'flat_emoji':
|
|
117
117
|
case 'flatEmoji':
|
|
118
|
+
case 'smiley':
|
|
119
|
+
case 'smileys':
|
|
120
|
+
case 'faces':
|
|
118
121
|
return <FlatEmoji index={index} selected={selected}/>;
|
|
119
122
|
case '3d_emoji': {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const emoji = (_a = emojiScale[Math.round(index * step)]) !== null && _a !== void 0 ? _a : '😐';
|
|
123
|
-
return (<react_native_1.Text style={{ fontSize: 36, opacity: selected ? 1 : 0.35 }}>
|
|
124
|
-
{emoji}
|
|
125
|
-
</react_native_1.Text>);
|
|
123
|
+
// Use FlatEmoji (View-based) — reliable on all iOS versions
|
|
124
|
+
return <FlatEmoji index={index} selected={selected}/>;
|
|
126
125
|
}
|
|
127
126
|
case 'star':
|
|
128
127
|
default:
|
|
129
|
-
return (<react_native_1.Text style={{ fontSize: 34, color: filled ? activeColor :
|
|
128
|
+
return (<react_native_1.Text style={{ fontSize: 34, color: filled ? activeColor : '#E5E7EB' }}>
|
|
130
129
|
{filled ? '★' : '☆'}
|
|
131
130
|
</react_native_1.Text>);
|
|
132
131
|
}
|
|
@@ -231,8 +230,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
231
230
|
scrollContent: { paddingTop: 16, paddingBottom: 8 },
|
|
232
231
|
title: { fontSize: 18, fontWeight: '700', marginBottom: 16 },
|
|
233
232
|
subtitle: { fontSize: 14, opacity: 0.6, marginBottom: 16 },
|
|
234
|
-
iconsRow: { flexDirection: 'row', marginTop: 4, marginBottom: 20, flexWrap: 'nowrap', justifyContent: '
|
|
235
|
-
iconButton: { alignItems: 'center', justifyContent: 'center' },
|
|
233
|
+
iconsRow: { flexDirection: 'row', marginTop: 4, marginBottom: 20, flexWrap: 'nowrap', justifyContent: 'center', gap: 16 },
|
|
234
|
+
iconButton: { alignItems: 'center', justifyContent: 'center', padding: 4 },
|
|
236
235
|
colLabels: {
|
|
237
236
|
flexDirection: 'row',
|
|
238
237
|
justifyContent: 'space-between',
|