@proulr/sdui-components 0.1.18 → 0.1.20

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,4 +1,5 @@
1
1
  import { Pressable, StyleSheet, Text } from 'react-native';
2
+ import { AppIcon } from './app-icon';
2
3
  import { fonts, m3Colors, m3Shape, spacing } from '../theme/proulr-theme';
3
4
 
4
5
  export function ComposeAudiencePill({
@@ -17,7 +18,7 @@ export function ComposeAudiencePill({
17
18
  style={({ pressed }) => [styles.pill, pressed && onPress && { opacity: 0.82 }]}
18
19
  >
19
20
  <Text style={styles.label}>{label}</Text>
20
- <Text style={styles.chevron}>{'\u25BE'}</Text>
21
+ <AppIcon name="chevron-down" size={14} color={m3Colors.onPrimaryContainer} />
21
22
  </Pressable>
22
23
  );
23
24
  }
@@ -39,9 +40,4 @@ const styles = StyleSheet.create({
39
40
  fontFamily: fonts.medium,
40
41
  fontSize: 13,
41
42
  },
42
- chevron: {
43
- color: m3Colors.onPrimaryContainer,
44
- fontSize: 14,
45
- marginTop: 1,
46
- },
47
43
  });
@@ -1,5 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { Image, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
3
+ import { AppIcon } from './app-icon';
3
4
  import { fonts, m3Colors, m3Shape, spacing } from '../theme/proulr-theme';
4
5
 
5
6
  export type ComposeMediaCarouselItem = {
@@ -49,7 +50,7 @@ export function ComposeMediaCarousel({
49
50
  accessibilityLabel="Remover mídia"
50
51
  style={styles.removeBtn}
51
52
  >
52
- <Text style={styles.removeIcon}>{'\u2715'}</Text>
53
+ <AppIcon name="close" size={14} color={m3Colors.onPrimary} />
53
54
  </Pressable>
54
55
  </View>
55
56
  ))}
@@ -102,11 +103,6 @@ const styles = StyleSheet.create({
102
103
  alignItems: 'center',
103
104
  justifyContent: 'center',
104
105
  },
105
- removeIcon: {
106
- color: m3Colors.onPrimary,
107
- fontSize: 14,
108
- fontFamily: fonts.semibold,
109
- },
110
106
  counter: {
111
107
  marginTop: spacing.xs,
112
108
  color: m3Colors.onSurfaceVariant,
@@ -1,5 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { Modal, Pressable, StyleSheet, Text, View } from 'react-native';
3
+ import { AppIcon } from './app-icon';
3
4
  import { fonts, m3Colors, m3Shape, m3Type, spacing } from '../theme/proulr-theme';
4
5
 
5
6
  export type ComposeReplyAudienceValue = 'everyone' | 'followers' | 'mentioned';
@@ -55,7 +56,7 @@ export function ComposeReplyAudienceSheet({
55
56
  </View>
56
57
  {selected ? (
57
58
  <View style={styles.checkBadge}>
58
- <Text style={styles.checkMark}>{'\u2713'}</Text>
59
+ <AppIcon name="check" size={14} color={m3Colors.onPrimary} />
59
60
  </View>
60
61
  ) : (
61
62
  <View style={styles.checkSpacer} />
@@ -144,11 +145,6 @@ const styles = StyleSheet.create({
144
145
  alignItems: 'center',
145
146
  justifyContent: 'center',
146
147
  },
147
- checkMark: {
148
- color: m3Colors.onPrimary,
149
- fontSize: 14,
150
- fontFamily: fonts.bold,
151
- },
152
148
  checkSpacer: {
153
149
  width: 24,
154
150
  },
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { useCallback, useState } from 'react';
3
3
  import { Modal, Pressable, StyleSheet, Text, View } from 'react-native';
4
+ import { AppIcon, APP_ICON_SIZE } from './app-icon';
4
5
  import { fonts, m3Colors, m3Elevation, spacing } from '../theme/proulr-theme';
5
6
 
6
7
  export type FloatingCreateMenuAction = {
@@ -50,7 +51,11 @@ export function FloatingCreateMenu({
50
51
  pressed && { opacity: 0.9 },
51
52
  ]}
52
53
  >
53
- <Text style={[styles.mainFabGlyph]}>{open ? '\u2715' : '\u002B'}</Text>
54
+ <AppIcon
55
+ name={open ? 'close' : 'plus'}
56
+ size={APP_ICON_SIZE.fab}
57
+ color={open ? m3Colors.onSurface : m3Colors.onSecondary}
58
+ />
54
59
  </Pressable>
55
60
 
56
61
  <Modal visible={open} transparent animationType="fade" onRequestClose={close}>
@@ -111,11 +116,6 @@ const styles = StyleSheet.create({
111
116
  borderWidth: 1,
112
117
  borderColor: m3Colors.outlineVariant,
113
118
  },
114
- mainFabGlyph: {
115
- color: m3Colors.onSecondary,
116
- fontSize: 30,
117
- fontFamily: fonts.bold,
118
- },
119
119
  overlay: {
120
120
  flex: 1,
121
121
  },
@@ -21,14 +21,22 @@ export {
21
21
  ComposeVideoGlyph,
22
22
  } from './compose-glyphs';
23
23
  export {
24
+ AppChromeArrowDownRightGlyph,
25
+ AppChromeArrowRightGlyph,
26
+ AppChromeArrowUpRightGlyph,
27
+ AppChromeAttachmentGlyph,
24
28
  AppChromeBackGlyph,
29
+ AppChromeBellGlyph,
25
30
  AppChromeBookmarkGlyph,
26
31
  AppChromeBoostGlyph,
27
32
  AppChromeChatGlyph,
33
+ AppChromeCheckGlyph,
28
34
  AppChromeChevronDownGlyph,
29
35
  AppChromeChevronRightGlyph,
30
36
  AppChromeCloseGlyph,
31
37
  AppChromeCommunitiesGlyph,
38
+ AppChromeCopyGlyph,
39
+ AppChromeDownloadGlyph,
32
40
  AppChromeEditGlyph,
33
41
  AppChromeEventsGlyph,
34
42
  AppChromeFireGlyph,
@@ -36,24 +44,30 @@ export {
36
44
  AppChromeFlipCameraGlyph,
37
45
  AppChromeHeartFilledGlyph,
38
46
  AppChromeHeartGlyph,
39
- AppChromeThumbsUpFilledGlyph,
40
- AppChromeThumbsUpGlyph,
47
+ AppChromeHourglassGlyph,
41
48
  AppChromeHuntGlyph,
42
49
  AppChromeIncognitoGlyph,
50
+ AppChromeInfoGlyph,
43
51
  AppChromeListGlyph,
44
52
  AppChromeLocationGlyph,
53
+ AppChromeLockGlyph,
45
54
  AppChromeMicGlyph,
46
55
  AppChromeOverflowGlyph,
47
56
  AppChromePauseGlyph,
57
+ AppChromePendingGlyph,
48
58
  AppChromePlayGlyph,
49
59
  AppChromePlusGlyph,
60
+ AppChromePollGlyph,
50
61
  AppChromeProfileGlyph,
51
62
  AppChromePublishGlyph,
63
+ AppChromeRadioUncheckedGlyph,
64
+ AppChromeReplyGlyph,
52
65
  AppChromeRepostGlyph,
53
66
  AppChromeSearchGlyph,
54
67
  AppChromeSendGlyph,
55
68
  AppChromeSettingsGlyph,
56
69
  AppChromeShieldGlyph,
70
+ AppChromeSignalGlyph,
57
71
  AppChromeSignOutGlyph,
58
72
  AppChromeStarGlyph,
59
73
  AppChromeStoryEffectsGlyph,
@@ -66,9 +80,22 @@ export {
66
80
  AppChromeTabDiscoverGlyph,
67
81
  AppChromeTabFlashGlyph,
68
82
  AppChromeTabVibesGlyph,
83
+ AppChromeThumbsUpFilledGlyph,
84
+ AppChromeThumbsUpGlyph,
85
+ AppChromeVisibilityGlyph,
86
+ AppChromeVisibilityOffGlyph,
87
+ AppChromeVolumeOffGlyph,
88
+ AppChromeVolumeOnGlyph,
89
+ AppChromeWarningGlyph,
69
90
  type AppChromeGlyphProps,
70
91
  } from './app-glyphs';
71
- export { AppIcon, APP_ICON_SIZE, type AppIconName, type AppIconProps } from './app-icon';
92
+ export {
93
+ AppIcon,
94
+ APP_ICON_SIZE,
95
+ isAppIconName,
96
+ type AppIconName,
97
+ type AppIconProps,
98
+ } from './app-icon';
72
99
  export { ComposeMediaCarousel, type ComposeMediaCarouselItem } from './compose-media-carousel';
73
100
  export { ComposeMediaShortcut, COMPOSE_MEDIA_TILE_SIZE } from './compose-media-shortcut';
74
101
  export { ComposeRecentMediaGrid, type ComposeRecentMediaItem } from './compose-recent-media-grid';
@@ -1,4 +1,5 @@
1
1
  import { Text, View } from 'react-native';
2
+ import { AppIcon } from './app-icon';
2
3
  import { m3Colors } from '../theme/proulr-theme';
3
4
 
4
5
  type GlyphProps = {
@@ -49,11 +50,7 @@ export function StoryTextGlyph({ color = m3Colors.onSurface, size = 28 }: GlyphP
49
50
  }
50
51
 
51
52
  export function StoryMusicGlyph({ color = m3Colors.onSurface, size = 28 }: GlyphProps) {
52
- return (
53
- <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
54
- <Text style={{ color, fontSize: size * 0.58 }}>{'\u266A'}</Text>
55
- </View>
56
- );
53
+ return <AppIcon name="story-music" color={color} size={size} />;
57
54
  }
58
55
 
59
56
  export function StoryCollageGlyph({ color = m3Colors.onSurface, size = 28 }: GlyphProps) {
@@ -111,11 +108,7 @@ export function StoryStickerGlyph({ color = m3Colors.onPrimary, size = 22 }: Gly
111
108
  }
112
109
 
113
110
  export function StoryEffectsGlyph({ color = m3Colors.onPrimary, size = 22 }: GlyphProps) {
114
- return (
115
- <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
116
- <Text style={{ color, fontSize: size * 0.62 }}>{'\u2728'}</Text>
117
- </View>
118
- );
111
+ return <AppIcon name="story-effects" color={color} size={size} />;
119
112
  }
120
113
 
121
114
  export function StoryMentionGlyph({ color = m3Colors.onPrimary, size = 22 }: GlyphProps) {
@@ -1,4 +1,5 @@
1
1
  import { Modal, Pressable, StyleSheet, Text, View } from 'react-native';
2
+ import { AppIcon } from './app-icon';
2
3
  import { fonts, m3Colors, m3Shape, m3Type, spacing } from '../theme/proulr-theme';
3
4
 
4
5
  export type StorySurfaceOption = {
@@ -46,7 +47,11 @@ export function StorySurfacePicker({
46
47
  <Text style={styles.optionLabel}>{option.label}</Text>
47
48
  <Text style={styles.optionHint}>{option.hint}</Text>
48
49
  </View>
49
- {selected ? <Text style={styles.check}>{'\u2713'}</Text> : null}
50
+ {selected ? (
51
+ <View style={styles.checkWrap}>
52
+ <AppIcon name="check" size={18} color={m3Colors.primary} />
53
+ </View>
54
+ ) : null}
50
55
  </Pressable>
51
56
  );
52
57
  })}
@@ -115,10 +120,7 @@ const styles = StyleSheet.create({
115
120
  ...m3Type.bodySmall,
116
121
  marginTop: 2,
117
122
  },
118
- check: {
119
- color: m3Colors.primary,
120
- fontSize: 18,
121
- fontFamily: fonts.bold,
123
+ checkWrap: {
122
124
  marginLeft: spacing.sm,
123
125
  },
124
126
  });