@proulr/sdui-components 0.1.20 → 0.1.21
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/package.json
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
13
13
|
import type { SduiBlock } from '@proulr/sdui-contract';
|
|
14
14
|
import { TextField as UiTextField } from '../ui/TextField';
|
|
15
|
+
import { AppIcon } from '../ui/app-icon';
|
|
15
16
|
import { colors, fonts, gradients, m3Colors, m3Elevation, m3Shape, spacing } from '../theme/proulr-theme';
|
|
16
17
|
import { resolveDataRef, resolveDataRefString } from '../lib/resolve-data-ref';
|
|
17
18
|
import { useSduiHybridRenderer } from '../sdui-hybrid-renderer-context';
|
|
@@ -128,6 +129,7 @@ export function SduiDiscoverProfileCardBlock({ block, data, onAction }: SduiBloc
|
|
|
128
129
|
) : null}
|
|
129
130
|
{person.traveling ? (
|
|
130
131
|
<View style={[styles.travelBadge, person.has_new_media ? styles.travelBadgeOffset : null]}>
|
|
132
|
+
<AppIcon name="travel" size={11} color={m3Colors.onSecondaryContainer} />
|
|
131
133
|
<Text style={styles.travelBadgeText}>Viajando</Text>
|
|
132
134
|
</View>
|
|
133
135
|
) : null}
|
|
@@ -411,6 +413,9 @@ const styles = StyleSheet.create({
|
|
|
411
413
|
position: 'absolute',
|
|
412
414
|
top: spacing.sm,
|
|
413
415
|
right: spacing.sm,
|
|
416
|
+
flexDirection: 'row',
|
|
417
|
+
alignItems: 'center',
|
|
418
|
+
gap: 4,
|
|
414
419
|
backgroundColor: m3Colors.secondaryContainer,
|
|
415
420
|
paddingHorizontal: 8,
|
|
416
421
|
paddingVertical: 3,
|
|
@@ -76,6 +76,7 @@ import {
|
|
|
76
76
|
ComposeGalleryGlyph,
|
|
77
77
|
ComposeGlobeGlyph,
|
|
78
78
|
ComposeMentionGlyph,
|
|
79
|
+
ComposeTravelGlyph,
|
|
79
80
|
ComposeTrashGlyph,
|
|
80
81
|
ComposeVideoGlyph,
|
|
81
82
|
} from './compose-glyphs';
|
|
@@ -102,6 +103,7 @@ const ICON_REGISTRY: Record<AppIconName, ComponentType<AppChromeGlyphProps>> = {
|
|
|
102
103
|
camera: ComposeCameraGlyph,
|
|
103
104
|
trash: ComposeTrashGlyph,
|
|
104
105
|
globe: ComposeGlobeGlyph,
|
|
106
|
+
travel: ComposeTravelGlyph,
|
|
105
107
|
'tab-discover': AppChromeTabDiscoverGlyph,
|
|
106
108
|
'tab-vibes': AppChromeTabVibesGlyph,
|
|
107
109
|
'tab-flash': AppChromeTabFlashGlyph,
|
|
@@ -160,6 +160,44 @@ export function ComposeGlobeGlyph({ color = m3Colors.primary, size = 16 }: Glyph
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/** Mala / viagem — chrome badge. */
|
|
164
|
+
export function ComposeTravelGlyph({ color = m3Colors.primary, size = 24 }: GlyphProps) {
|
|
165
|
+
const stroke = Math.max(1.4, size * 0.07);
|
|
166
|
+
const bodyW = size * 0.72;
|
|
167
|
+
const bodyH = size * 0.52;
|
|
168
|
+
const handleW = size * 0.34;
|
|
169
|
+
const handleH = size * 0.18;
|
|
170
|
+
return (
|
|
171
|
+
<View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
|
|
172
|
+
<View
|
|
173
|
+
style={{
|
|
174
|
+
width: handleW,
|
|
175
|
+
height: handleH,
|
|
176
|
+
borderTopLeftRadius: handleW * 0.35,
|
|
177
|
+
borderTopRightRadius: handleW * 0.35,
|
|
178
|
+
borderWidth: stroke,
|
|
179
|
+
borderBottomWidth: 0,
|
|
180
|
+
borderColor: color,
|
|
181
|
+
marginBottom: -stroke,
|
|
182
|
+
}}
|
|
183
|
+
/>
|
|
184
|
+
<View
|
|
185
|
+
style={{
|
|
186
|
+
width: bodyW,
|
|
187
|
+
height: bodyH,
|
|
188
|
+
borderRadius: size * 0.1,
|
|
189
|
+
borderWidth: stroke,
|
|
190
|
+
borderColor: color,
|
|
191
|
+
alignItems: 'center',
|
|
192
|
+
justifyContent: 'center',
|
|
193
|
+
}}
|
|
194
|
+
>
|
|
195
|
+
<View style={{ width: stroke, height: bodyH * 0.55, backgroundColor: color, borderRadius: 1 }} />
|
|
196
|
+
</View>
|
|
197
|
+
</View>
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
163
201
|
export function ComposeFollowersGlyph({ color = m3Colors.onPrimary, size = 20 }: GlyphProps) {
|
|
164
202
|
const head = size * 0.22;
|
|
165
203
|
return (
|