@proulr/sdui-components 0.1.54 → 0.1.55
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 +1 -1
- package/src/bdc/components/bdc-components.test.ts +2 -0
- package/src/bdc/components/native-blocks.tsx +1 -0
- package/src/bdc/index.ts +1 -0
- package/src/renderer/blocks/SduiNativeDomainBlocks.tsx +7 -0
- package/src/renderer/sdui-component-registry.tsx +2 -0
- package/src/renderer/sdui-hybrid-renderer-context.tsx +1 -0
- package/src/renderer/ui/story-surface-picker.tsx +9 -3
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
DiscoverBrowseLocation,
|
|
30
30
|
NewPostComposer,
|
|
31
31
|
NewStoryComposer,
|
|
32
|
+
StoryViewersPanel,
|
|
32
33
|
PostComments,
|
|
33
34
|
ProfileOnboarding,
|
|
34
35
|
ProfileReport,
|
|
@@ -130,6 +131,7 @@ describe('bdc discover/forms/social/inbox/native', () => {
|
|
|
130
131
|
AlbumDetail,
|
|
131
132
|
NewPostComposer,
|
|
132
133
|
NewStoryComposer,
|
|
134
|
+
StoryViewersPanel,
|
|
133
135
|
PostComments,
|
|
134
136
|
SocialProfile,
|
|
135
137
|
SettingsHome,
|
|
@@ -30,6 +30,7 @@ export const AlbumGrid: BdcComponent = (props) => nativeBlock('album_grid', prop
|
|
|
30
30
|
export const AlbumDetail: BdcComponent = (props) => nativeBlock('album_detail', props);
|
|
31
31
|
export const NewPostComposer: BdcComponent = (props) => nativeBlock('new_post_composer', props);
|
|
32
32
|
export const NewStoryComposer: BdcComponent = (props) => nativeBlock('new_story_composer', props);
|
|
33
|
+
export const StoryViewersPanel: BdcComponent = (props) => nativeBlock('story_viewers_panel', props);
|
|
33
34
|
export const PostComments: BdcComponent = (props) => nativeBlock('post_comments', props);
|
|
34
35
|
export const SocialProfile: BdcComponent = (props) => nativeBlock('social_profile', props);
|
|
35
36
|
export const SettingsHome: BdcComponent = (props) => nativeBlock('settings_home', props);
|
package/src/bdc/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ function NativeBlockShell({
|
|
|
30
30
|
| 'renderAlbumDetail'
|
|
31
31
|
| 'renderNewPostComposer'
|
|
32
32
|
| 'renderNewStoryComposer'
|
|
33
|
+
| 'renderStoryViewersPanel'
|
|
33
34
|
| 'renderPostComments'
|
|
34
35
|
| 'renderSocialProfile'
|
|
35
36
|
| 'renderSettingsHome'
|
|
@@ -118,6 +119,12 @@ export function SduiNewStoryComposerBlock(props: SduiBlockRenderProps) {
|
|
|
118
119
|
return <NativeBlockShell {...props} rendererKey="renderNewStoryComposer" fallbackLabel="Novo story" />;
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
export function SduiStoryViewersPanelBlock(props: SduiBlockRenderProps) {
|
|
123
|
+
return (
|
|
124
|
+
<NativeBlockShell {...props} rendererKey="renderStoryViewersPanel" fallbackLabel="Story viewers" />
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
121
128
|
export function SduiPostCommentsBlock(props: SduiBlockRenderProps) {
|
|
122
129
|
return <NativeBlockShell {...props} rendererKey="renderPostComments" fallbackLabel="Comentários" />;
|
|
123
130
|
}
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
SduiChatThreadBlock,
|
|
51
51
|
SduiNewPostComposerBlock,
|
|
52
52
|
SduiNewStoryComposerBlock,
|
|
53
|
+
SduiStoryViewersPanelBlock,
|
|
53
54
|
SduiPostCommentsBlock,
|
|
54
55
|
SduiProfileOnboardingBlock,
|
|
55
56
|
SduiProfileSelfBlock,
|
|
@@ -117,6 +118,7 @@ const REGISTRY: Record<string, SduiBlockComponent> = {
|
|
|
117
118
|
album_detail: SduiAlbumDetailBlock,
|
|
118
119
|
new_post_composer: SduiNewPostComposerBlock,
|
|
119
120
|
new_story_composer: SduiNewStoryComposerBlock,
|
|
121
|
+
story_viewers_panel: SduiStoryViewersPanelBlock,
|
|
120
122
|
post_comments: SduiPostCommentsBlock,
|
|
121
123
|
social_profile: SduiSocialProfileBlock,
|
|
122
124
|
settings_home: SduiSettingsHomeBlock,
|
|
@@ -66,6 +66,7 @@ export type SduiHybridRenderers = {
|
|
|
66
66
|
renderAlbumDetail?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
67
67
|
renderNewPostComposer?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
68
68
|
renderNewStoryComposer?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
69
|
+
renderStoryViewersPanel?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
69
70
|
renderPostComments?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
70
71
|
renderSocialProfile?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
71
72
|
renderSettingsHome?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
@@ -12,23 +12,29 @@ export function StorySurfacePicker({
|
|
|
12
12
|
visible,
|
|
13
13
|
value,
|
|
14
14
|
options,
|
|
15
|
+
title,
|
|
16
|
+
subtitle,
|
|
17
|
+
closeLabel,
|
|
15
18
|
onClose,
|
|
16
19
|
onSelect,
|
|
17
20
|
}: {
|
|
18
21
|
visible: boolean;
|
|
19
22
|
value: string;
|
|
20
23
|
options: StorySurfaceOption[];
|
|
24
|
+
title: string;
|
|
25
|
+
subtitle: string;
|
|
26
|
+
closeLabel: string;
|
|
21
27
|
onClose: () => void;
|
|
22
28
|
onSelect: (value: string) => void;
|
|
23
29
|
}) {
|
|
24
30
|
return (
|
|
25
31
|
<Modal visible={visible} transparent animationType="slide" onRequestClose={onClose}>
|
|
26
32
|
<View style={styles.backdrop}>
|
|
27
|
-
<Pressable style={styles.backdropPress} onPress={onClose} accessibilityLabel=
|
|
33
|
+
<Pressable style={styles.backdropPress} onPress={onClose} accessibilityLabel={closeLabel} />
|
|
28
34
|
<View style={styles.sheet}>
|
|
29
35
|
<View style={styles.handle} />
|
|
30
|
-
<Text style={styles.title}>
|
|
31
|
-
<Text style={styles.subtitle}>
|
|
36
|
+
<Text style={styles.title}>{title}</Text>
|
|
37
|
+
<Text style={styles.subtitle}>{subtitle}</Text>
|
|
32
38
|
|
|
33
39
|
{options.map((option) => {
|
|
34
40
|
const selected = option.value === value;
|