@mohamed-karawia/library 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +120 -3
- package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
- package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
- package/dist/stories/Community/Community.js +137 -0
- package/dist/stories/Events/Event/Event.js +116 -4
- package/dist/stories/Events/EventsList/EventsList.js +95 -16
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +80 -1
- package/dist/stories/Library/Notes/Notes.js +75 -1
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +134 -9
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +65 -23
- package/dist/stories/Navbar/Navbar.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +14 -5
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +76 -9
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +80 -9
- package/dist/stories/Preview/Preview.js +1 -0
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
- package/dist/stories/PreviewComponents/globalStyles.js +26 -0
- package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
- package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
- package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
- package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
- package/dist/stories/Reusable Components/Community/Community.js +76 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
- package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
- package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
- package/dist/stories/Sections/Sections.js +8 -2
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +77 -1
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
- package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
- package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
- package/dist/stories/helpers/util.js +36 -3
- package/dist/stories/store/communities.js +943 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +104 -5
- package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
- package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
- package/src/stories/Community/Community.jsx +110 -0
- package/src/stories/Events/Event/Event.jsx +97 -4
- package/src/stories/Events/EventsList/EventsList.jsx +91 -17
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +79 -1
- package/src/stories/Library/Notes/Notes.jsx +57 -1
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +125 -11
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +56 -26
- package/src/stories/Navbar/Navbar.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +12 -4
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
- package/src/stories/Pages/ViewWorld/styles.json +1 -1
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +57 -4
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +62 -9
- package/src/stories/Preview/Preview.jsx +9 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
- package/src/stories/PreviewComponents/globalStyles.js +20 -0
- package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
- package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
- package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
- package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
- package/src/stories/Reusable Components/Community/Community.jsx +70 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
- package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
- package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
- package/src/stories/Sections/Sections.jsx +5 -2
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +62 -3
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
- package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
- package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
- package/src/stories/helpers/util.js +24 -2
- package/src/stories/store/communities.js +705 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -0,0 +1,124 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import Preview from '../../Preview/Preview';
|
4
|
+
import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
|
5
|
+
|
6
|
+
import { Container, Left, Right } from '../globalStyles';
|
7
|
+
import Picker from '../../Common Inputs/Picker/Picker';
|
8
|
+
import TextField from '../../Common Inputs/TextField/TextField';
|
9
|
+
|
10
|
+
|
11
|
+
const VideoAlbumsPreview = (props) => {
|
12
|
+
const [videoAlbumsStyles, setVideoAlbumsStyles] = useState({});
|
13
|
+
const initialValues = {
|
14
|
+
headerStyles: {
|
15
|
+
headerBackground: '',
|
16
|
+
padding: 0,
|
17
|
+
titleColor: '',
|
18
|
+
titleFontSize: '',
|
19
|
+
titleFontWeight: '',
|
20
|
+
controlsStyles: {
|
21
|
+
iconSize: '',
|
22
|
+
iconColor: ''
|
23
|
+
}
|
24
|
+
},
|
25
|
+
customCardStyles: {
|
26
|
+
cardBackgroundColor: '',
|
27
|
+
onHoverBackgroundColor: '',
|
28
|
+
cardRadius: '',
|
29
|
+
cardTitleFontSize: '',
|
30
|
+
cardTitleFontWeight: '',
|
31
|
+
cardTitleColor: '',
|
32
|
+
cardImageRadius: '',
|
33
|
+
cardPadding: 0,
|
34
|
+
cardBorderSize: 0,
|
35
|
+
cardBorderColor: 'purple'
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
const sections = [
|
40
|
+
{
|
41
|
+
title: "Header Styles",
|
42
|
+
body: [
|
43
|
+
(<Picker label="Header Background" name="headerStyles.headerBackground" />),
|
44
|
+
(<TextField type="number" label="Padding" name="headerStyles.padding" />),
|
45
|
+
(<Picker label="Title Color" name="headerStyles.titleColor" />),
|
46
|
+
(<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
|
47
|
+
(<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />),
|
48
|
+
(<TextField type="number" label="Controls Size" name="headerStyles.controlsStyles.iconSize" />),
|
49
|
+
(<Picker label="Controls Color" name="headerStyles.controlsStyles.iconColor" />),
|
50
|
+
]
|
51
|
+
},
|
52
|
+
{
|
53
|
+
title: "Card Styles",
|
54
|
+
body: [
|
55
|
+
(<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
|
56
|
+
(<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
|
57
|
+
(<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
|
58
|
+
(<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
|
59
|
+
(<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
|
60
|
+
(<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
|
61
|
+
(<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
|
62
|
+
(<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
|
63
|
+
(<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
|
64
|
+
(<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
|
65
|
+
]
|
66
|
+
},
|
67
|
+
]
|
68
|
+
|
69
|
+
const handleChange = (values) => {
|
70
|
+
if(values){
|
71
|
+
props.formChanged(values)
|
72
|
+
setVideoAlbumsStyles(values)
|
73
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
const submitHandler = (values) => {
|
78
|
+
console.log(values);
|
79
|
+
}
|
80
|
+
|
81
|
+
const cancelHandler = () => {
|
82
|
+
console.log('Canceled')
|
83
|
+
}
|
84
|
+
return (
|
85
|
+
<Container>
|
86
|
+
<Left>
|
87
|
+
<ReusableForm
|
88
|
+
formTitle="Video Albums Styles"
|
89
|
+
initialValues={initialValues}
|
90
|
+
sections={sections}
|
91
|
+
headerStyles={{
|
92
|
+
padding: 10,
|
93
|
+
headerBackground: 'black',
|
94
|
+
titleColor: '#ffff',
|
95
|
+
}}
|
96
|
+
sectionHeaderStyles={{
|
97
|
+
padding: 6,
|
98
|
+
headerBackground: '#FE1744',
|
99
|
+
titleColor: '#ffff',
|
100
|
+
}}
|
101
|
+
bodyPadding={10}
|
102
|
+
saveBtnText="Save"
|
103
|
+
cancelBtnText="Cancel"
|
104
|
+
saveBtnHandle={submitHandler}
|
105
|
+
cancelHandler={cancelHandler}
|
106
|
+
handleChange={handleChange}
|
107
|
+
bodyRowGap={20}
|
108
|
+
bodyColumnGap={10}
|
109
|
+
/>
|
110
|
+
</Left>
|
111
|
+
<Right>
|
112
|
+
<Preview type={'Video-Albums'} componentProps={props.componentProps} stylingProps={videoAlbumsStyles} />
|
113
|
+
</Right>
|
114
|
+
</Container>
|
115
|
+
);
|
116
|
+
};
|
117
|
+
|
118
|
+
VideoAlbumsPreview.defaultProps = {};
|
119
|
+
|
120
|
+
VideoAlbumsPreview.propTypes = {
|
121
|
+
componentProps: PropTypes.object
|
122
|
+
}
|
123
|
+
|
124
|
+
export default VideoAlbumsPreview;
|
@@ -0,0 +1,125 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import Preview from '../../Preview/Preview';
|
4
|
+
import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
|
5
|
+
|
6
|
+
import { Container, Left, Right } from '../globalStyles';
|
7
|
+
import Picker from '../../Common Inputs/Picker/Picker';
|
8
|
+
import TextField from '../../Common Inputs/TextField/TextField';
|
9
|
+
|
10
|
+
const VideoPreview = (props) => {
|
11
|
+
const [videoStyles, setVideoStyles] = useState({});
|
12
|
+
const initialValues = {
|
13
|
+
headerStyles: {
|
14
|
+
headerBackground: '',
|
15
|
+
padding: 0,
|
16
|
+
titleColor: '',
|
17
|
+
titleFontSize: '',
|
18
|
+
titleFontWeight: '',
|
19
|
+
},
|
20
|
+
iconsColor: '',
|
21
|
+
backgroundColor: '',
|
22
|
+
detailsPadding: '',
|
23
|
+
titleFontSize: '',
|
24
|
+
titleColor: '',
|
25
|
+
discFontSize: '',
|
26
|
+
discColor: '',
|
27
|
+
dateFontSize: '',
|
28
|
+
dateColor: '',
|
29
|
+
commentBackgroundColor: '',
|
30
|
+
commentTitleColor: '',
|
31
|
+
commentTitleFontSize: ''
|
32
|
+
}
|
33
|
+
|
34
|
+
const sections = [
|
35
|
+
{
|
36
|
+
title: "Header Styles",
|
37
|
+
body: [
|
38
|
+
(<Picker label="Header Background" name="headerStyles.headerBackground" />),
|
39
|
+
(<TextField type="number" label="Padding" name="headerStyles.padding" />),
|
40
|
+
(<Picker label="Title Color" name="headerStyles.titleColor" />),
|
41
|
+
(<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
|
42
|
+
(<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
|
43
|
+
]
|
44
|
+
},
|
45
|
+
{
|
46
|
+
title: "Player Styles",
|
47
|
+
body: [
|
48
|
+
(<Picker label="Icons Color" name="iconsColor" />),
|
49
|
+
]
|
50
|
+
},
|
51
|
+
{
|
52
|
+
title: "Space Styles",
|
53
|
+
body: [
|
54
|
+
(<Picker label="Background Color" name="backgroundColor" />),
|
55
|
+
(<TextField type="number" label="Details Padding" name="detailsPadding" />),
|
56
|
+
(<TextField type="number" label="Title Font Size" name="titleFontSize" />),
|
57
|
+
(<Picker label="Title Color" name="titleColor" />),
|
58
|
+
(<TextField type="number" label="Discription Font Size" name="discFontSize" />),
|
59
|
+
(<Picker label="Discription Color" name="discColor" />),
|
60
|
+
(<TextField type="number" label="Date Font Size" name="dateFontSize" />),
|
61
|
+
(<Picker label="Date Color" name="dateColor" />),
|
62
|
+
(<Picker label="Comment Background Color" name="commentBackgroundColor" />),
|
63
|
+
(<Picker label="Comment Title Color" name="commentTitleColor" />),
|
64
|
+
(<TextField type="number" label="Comment title Font Size" name="commentTitleFontSize" />),
|
65
|
+
]
|
66
|
+
},
|
67
|
+
]
|
68
|
+
|
69
|
+
const handleChange = (values) => {
|
70
|
+
if(values){
|
71
|
+
props.formChanged(values)
|
72
|
+
setVideoStyles(values)
|
73
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
const submitHandler = (values) => {
|
78
|
+
console.log(values);
|
79
|
+
}
|
80
|
+
|
81
|
+
const cancelHandler = () => {
|
82
|
+
console.log('Canceled')
|
83
|
+
}
|
84
|
+
|
85
|
+
return (
|
86
|
+
<Container>
|
87
|
+
<Left>
|
88
|
+
<ReusableForm
|
89
|
+
formTitle="Video Styles"
|
90
|
+
initialValues={initialValues}
|
91
|
+
sections={sections}
|
92
|
+
headerStyles={{
|
93
|
+
padding: 10,
|
94
|
+
headerBackground: 'black',
|
95
|
+
titleColor: '#ffff',
|
96
|
+
}}
|
97
|
+
sectionHeaderStyles={{
|
98
|
+
padding: 6,
|
99
|
+
headerBackground: '#FE1744',
|
100
|
+
titleColor: '#ffff',
|
101
|
+
}}
|
102
|
+
bodyPadding={10}
|
103
|
+
saveBtnText="Save"
|
104
|
+
cancelBtnText="Cancel"
|
105
|
+
saveBtnHandle={submitHandler}
|
106
|
+
cancelHandler={cancelHandler}
|
107
|
+
handleChange={handleChange}
|
108
|
+
bodyRowGap={20}
|
109
|
+
bodyColumnGap={10}
|
110
|
+
/>
|
111
|
+
</Left>
|
112
|
+
<Right>
|
113
|
+
<Preview type={'Video-Space'} componentProps={props.componentProps} stylingProps={videoStyles} />
|
114
|
+
</Right>
|
115
|
+
</Container>
|
116
|
+
);
|
117
|
+
};
|
118
|
+
|
119
|
+
VideoPreview.defaultProps = {};
|
120
|
+
|
121
|
+
VideoPreview.propTypes = {
|
122
|
+
componentProps: PropTypes.object
|
123
|
+
}
|
124
|
+
|
125
|
+
export default VideoPreview;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
|
3
|
+
|
4
|
+
export const Container = styled.div`
|
5
|
+
width: 100%;
|
6
|
+
display: flex;
|
7
|
+
background-color: 'transparent';
|
8
|
+
align-items: flex-start;
|
9
|
+
`
|
10
|
+
|
11
|
+
export const Left = styled.div`
|
12
|
+
flex: 1;
|
13
|
+
`
|
14
|
+
|
15
|
+
export const Right = styled.div`
|
16
|
+
flex: 2;
|
17
|
+
position: sticky;
|
18
|
+
top: 0;
|
19
|
+
bottom: 0;
|
20
|
+
`
|
@@ -35,7 +35,7 @@ const CardStyle10 = ({
|
|
35
35
|
</SvgWrapper>
|
36
36
|
<Content {...props}>
|
37
37
|
<Title {...props}>{title}</Title>
|
38
|
-
<
|
38
|
+
<CardDescription {...props}>{description}</CardDescription>
|
39
39
|
</Content>
|
40
40
|
<Controls
|
41
41
|
controls={cardControls}
|
@@ -62,7 +62,6 @@ const Card = styled(MainCard)`
|
|
62
62
|
|
63
63
|
const Content = styled(globalContent)`
|
64
64
|
align-items: center;
|
65
|
-
justify-content: space-between;
|
66
65
|
|
67
66
|
`
|
68
67
|
|
@@ -75,6 +74,10 @@ const SvgWrapper = styled.div`
|
|
75
74
|
}
|
76
75
|
`
|
77
76
|
|
77
|
+
const CardDescription = styled(Description)`
|
78
|
+
text-align: center;
|
79
|
+
`
|
80
|
+
|
78
81
|
CardStyle10.defaultProps = {}
|
79
82
|
|
80
83
|
CardStyle10.propTypes = {
|
@@ -21,13 +21,13 @@ const CardStyle11 = ({ title, date, ...props }) => {
|
|
21
21
|
|
22
22
|
return (
|
23
23
|
<Card
|
24
|
-
|
24
|
+
|
25
25
|
{...props}>
|
26
|
-
<SvgWrapper {...props}>
|
26
|
+
<SvgWrapper onClick={cardClicked} {...props}>
|
27
27
|
<BiNotepad />
|
28
28
|
</SvgWrapper>
|
29
29
|
<Content {...props}>
|
30
|
-
<Title {...props}>{title}</Title>
|
30
|
+
<Title onClick={cardClicked} {...props}>{title}</Title>
|
31
31
|
<Date {...props}>{date}</Date>
|
32
32
|
</Content>
|
33
33
|
{props.cardControls
|
@@ -46,7 +46,7 @@ const Card = styled(MainCard)`
|
|
46
46
|
`
|
47
47
|
|
48
48
|
const Date = styled.h5`
|
49
|
-
color: gray;
|
49
|
+
color: ${props => props.dateColor || 'gray'};
|
50
50
|
font-weight: 300;
|
51
51
|
`
|
52
52
|
|
@@ -57,7 +57,7 @@ const Content = styled(globalContent)`
|
|
57
57
|
`
|
58
58
|
|
59
59
|
const SvgWrapper = styled.div`
|
60
|
-
|
60
|
+
cursor: pointer;
|
61
61
|
svg{
|
62
62
|
width: 50px;
|
63
63
|
height: 50px;
|
@@ -24,9 +24,9 @@ const CardStyle6 = ({ title, description, img, date, ...props }) => {
|
|
24
24
|
onMouseEnter={e => setShowIcons(true)}
|
25
25
|
onMouseLeave={e => setShowIcons(false)}
|
26
26
|
{...props}>
|
27
|
-
<ImgWrapper
|
28
|
-
|
29
|
-
|
27
|
+
<ImgWrapper
|
28
|
+
onClick={() => props.cardClicked()}
|
29
|
+
{...props}>
|
30
30
|
<Img src={img} />
|
31
31
|
</ImgWrapper>
|
32
32
|
<Content {...props}>
|
@@ -43,6 +43,12 @@ const CardStyle6 = ({ title, description, img, date, ...props }) => {
|
|
43
43
|
controls={props.cardControls}
|
44
44
|
show={showIcons}
|
45
45
|
onIconClicked={iconCliked}
|
46
|
+
showOnHover={true}
|
47
|
+
position='center'
|
48
|
+
dropdownFontColor="white"
|
49
|
+
iconBorderRadius={100}
|
50
|
+
iconSize={40}
|
51
|
+
iconsGap={10}
|
46
52
|
{...props.controlsStyles} />}
|
47
53
|
</Card>
|
48
54
|
)
|
@@ -51,12 +57,12 @@ const CardStyle6 = ({ title, description, img, date, ...props }) => {
|
|
51
57
|
const Card = styled(MainCard)`
|
52
58
|
flex-direction: column;
|
53
59
|
cursor: pointer;
|
54
|
-
|
60
|
+
overflow-y: scroll;
|
55
61
|
`
|
56
62
|
|
57
63
|
const ImgWrapper = styled.div`
|
58
64
|
width: 100%;
|
59
|
-
height:
|
65
|
+
min-height: 90%;
|
60
66
|
border-radius: ${props => props.cardRadius + 'px ' + props.cardRadius + 'px ' + '0 0'};
|
61
67
|
`
|
62
68
|
|
@@ -92,7 +98,7 @@ const Date = styled.p`
|
|
92
98
|
|
93
99
|
const Desc = styled(Description)`
|
94
100
|
padding: 2px 20px;
|
95
|
-
color: ${props => props.
|
101
|
+
color: ${props => props.cardDiscriptionColor};
|
96
102
|
`
|
97
103
|
|
98
104
|
CardStyle6.defaultProps = {}
|
@@ -29,7 +29,7 @@ const CardStyle8 = ({ username, date, text, img, media, ...props }) => {
|
|
29
29
|
<Content {...props}>
|
30
30
|
<Header>
|
31
31
|
<Title {...props}>{username}</Title>
|
32
|
-
<Date>{date}</Date>
|
32
|
+
<Date {...props}>{date}</Date>
|
33
33
|
</Header>
|
34
34
|
<Description {...props}>{text}</Description>
|
35
35
|
{media && <Media>
|
@@ -73,7 +73,7 @@ const Header = styled.div`
|
|
73
73
|
|
74
74
|
const Date = styled.p`
|
75
75
|
font-size: 14px;
|
76
|
-
color: gray;
|
76
|
+
color: ${props => props.dateColor || 'gray'};
|
77
77
|
`
|
78
78
|
|
79
79
|
const Media = styled.div`
|
@@ -24,7 +24,7 @@ export const globalContent = styled.div`
|
|
24
24
|
display: flex;
|
25
25
|
flex-direction: column;
|
26
26
|
flex-grow: 1;
|
27
|
-
gap: ${props => props.contentGap}px;
|
27
|
+
gap: ${props => props.contentGap || 10}px;
|
28
28
|
`
|
29
29
|
|
30
30
|
export const Title = styled.h3`
|
@@ -32,6 +32,7 @@ export const Title = styled.h3`
|
|
32
32
|
color: ${props => props.cardTitleColor || 'black'};
|
33
33
|
font-size: ${props => props.cardTitleFontSize}px;
|
34
34
|
font-weight: ${props => props.cardTitleFontWeight || 300};
|
35
|
+
cursor: pointer;
|
35
36
|
`
|
36
37
|
|
37
38
|
export const Description = styled.h5`
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import styled from 'styled-components'
|
4
|
+
|
5
|
+
// import Head from '../../Layout/Head/Head'
|
6
|
+
import Navbar from '../../Navbar/Navbar'
|
7
|
+
import Body from '../../Layout/Body/Body'
|
8
|
+
import Left from '../../Layout/Left/Left'
|
9
|
+
import Center from '../../Layout/Center/Center'
|
10
|
+
import Right from '../../Layout/Right/Right'
|
11
|
+
import WidgetContainer from "../../Reusable Components/WidgetContainer/WidgetContainer";
|
12
|
+
import styles from '../../styling.json'
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
const Community = ({
|
17
|
+
context,
|
18
|
+
...props
|
19
|
+
}) => {
|
20
|
+
|
21
|
+
const spaces = [
|
22
|
+
{
|
23
|
+
title: 'Main List',
|
24
|
+
data: [
|
25
|
+
{ title: 'Cargo Sprint', path: 'cago' },
|
26
|
+
{ title: 'Movies', path: 'movies' }
|
27
|
+
],
|
28
|
+
},
|
29
|
+
{
|
30
|
+
title: 'Entertainment',
|
31
|
+
data: [
|
32
|
+
{ title: 'Gaming', path: 'games' },
|
33
|
+
{ title: 'Music', path: 'music' }
|
34
|
+
]
|
35
|
+
}
|
36
|
+
]
|
37
|
+
|
38
|
+
return (
|
39
|
+
<Container>
|
40
|
+
<Navbar />
|
41
|
+
<Body>
|
42
|
+
<Left>
|
43
|
+
<WidgetContainer
|
44
|
+
widgetType='spaces-list'
|
45
|
+
widgetProps={{
|
46
|
+
listTitle: 'Your Spaces',
|
47
|
+
spaces: spaces,
|
48
|
+
cardClicked: () => alert('clicked'),
|
49
|
+
headerStyles: styles.widgetContainer.header,
|
50
|
+
sectionHeaderStyles: styles.widgetContainer.body.sectionHeaderStyles,
|
51
|
+
customCardStyles: styles.widgetContainer.body.customCardStyles,
|
52
|
+
}}
|
53
|
+
/>
|
54
|
+
</Left>
|
55
|
+
<Center>{props.center}</Center>
|
56
|
+
<Right>{props.right}</Right>
|
57
|
+
</Body>
|
58
|
+
</Container>
|
59
|
+
);
|
60
|
+
};
|
61
|
+
|
62
|
+
const Container = styled.div`
|
63
|
+
width: 100%;
|
64
|
+
height: auto;
|
65
|
+
display: flex;
|
66
|
+
min-height: 100vh;
|
67
|
+
flex-direction: column;
|
68
|
+
`
|
69
|
+
|
70
|
+
export default Community;
|
@@ -11,15 +11,21 @@ const Gallery = ({ data, cardStyle, customCardStyles, type, cardControls = null,
|
|
11
11
|
let child;
|
12
12
|
|
13
13
|
const iconCliked = (action) => {
|
14
|
-
props.
|
14
|
+
if (!props.preview) {
|
15
|
+
props.iconClicked(action)
|
16
|
+
}
|
15
17
|
}
|
16
18
|
|
17
19
|
const clicked = (index, cardProps) => {
|
20
|
+
if (!props.preview) {
|
18
21
|
props.cardClicked(index, cardProps)
|
22
|
+
}
|
19
23
|
}
|
20
24
|
|
21
25
|
const cardIconClicked = (action, index) => {
|
26
|
+
if (!props.preview) {
|
22
27
|
props.cardIconClicked(action, index)
|
28
|
+
}
|
23
29
|
}
|
24
30
|
|
25
31
|
const mapOverCardsData = (data) => {
|
@@ -69,8 +75,7 @@ const GalleryBody = styled.div`
|
|
69
75
|
display: ${({ type }) => type === 'flat' ? 'grid' : 'flex'};
|
70
76
|
flex-direction: column;
|
71
77
|
grid-template-columns: ${props => 'repeat(' + props.columnsNumber + ', 1fr)'};
|
72
|
-
grid-auto-rows: ${props => props.rowsHeight
|
73
|
-
/* grid-auto-rows: ${props => props.rowsHeight + 'px' || 'minmax(min-content, 400px)'}; */
|
78
|
+
grid-auto-rows: ${props => props.rowsHeight ? `${props.rowsHeight}px` : '1fr'};
|
74
79
|
column-gap: ${props => props.galleryColumnGap}px;
|
75
80
|
row-gap: ${props => props.galleryRowGap}px;
|
76
81
|
`
|
@@ -83,12 +88,8 @@ const Section = styled.div`
|
|
83
88
|
row-gap: ${props => props.galleryRowGap}px;
|
84
89
|
`
|
85
90
|
|
86
|
-
const SectionBody = styled
|
87
|
-
padding: ${props => props.galleryBodyPadding}px;
|
91
|
+
const SectionBody = styled(GalleryBody)`
|
88
92
|
display: grid;
|
89
|
-
grid-template-columns: ${props => 'repeat(' + props.columnsNumber + ', 1fr)'};
|
90
|
-
column-gap: ${props => props.galleryColumnGap}px;
|
91
|
-
row-gap: ${props => props.galleryRowGap}px;
|
92
93
|
`
|
93
94
|
|
94
95
|
Gallery.defaultProps = {
|
@@ -108,7 +109,7 @@ Gallery.propTypes = {
|
|
108
109
|
galleryColumnGap: PropTypes.number,
|
109
110
|
galleryRowGap: PropTypes.number,
|
110
111
|
rowsHeight: PropTypes.number
|
111
|
-
|
112
|
+
|
112
113
|
};
|
113
114
|
|
114
115
|
export default Gallery
|
@@ -17,42 +17,22 @@ const ReactModalComponent = ({
|
|
17
17
|
closeModal,
|
18
18
|
children,
|
19
19
|
exitModalButton,
|
20
|
-
|
20
|
+
shouldCloseOnOverlayClick
|
21
21
|
}) => {
|
22
22
|
return (
|
23
|
-
<
|
23
|
+
<Modal
|
24
24
|
isOpen={modalIsOpen}
|
25
25
|
onRequestClose={closeModal}
|
26
|
-
ariaHideApp={false}
|
27
|
-
contentLabel={title}
|
28
|
-
shouldCloseOnOverlayClick={onOverlayCloseClick === 'true'}
|
29
|
-
borderColor={borderColor}
|
30
|
-
boxShadow={boxShadow}
|
31
|
-
backgroundColor={backgroundColor}
|
32
|
-
padding={padding}
|
33
|
-
height={height}
|
34
|
-
width={width}
|
35
|
-
color={color}
|
36
|
-
borderRadius={borderRadius}
|
37
26
|
>
|
38
27
|
{children}
|
39
|
-
|
40
|
-
</ModalContainer>
|
28
|
+
</Modal>
|
41
29
|
);
|
42
30
|
};
|
43
31
|
|
44
32
|
const ModalContainer = styled(Modal)`
|
45
|
-
position: absolute;
|
46
|
-
top: 45%;
|
47
|
-
left: 50%;
|
48
|
-
right: auto;
|
49
|
-
bottom: auto;
|
50
|
-
transform: translate(-50%, -50%);
|
51
33
|
background-color: ${({backgroundColor}) => backgroundColor};
|
52
34
|
border-radius: ${({borderRadius}) => borderRadius}px;
|
53
35
|
box-shadow: ${({boxShadow}) => boxShadow};
|
54
|
-
height: ${({height}) => height};
|
55
|
-
width: ${({width}) => width};
|
56
36
|
color: ${({color}) => color};
|
57
37
|
border-color: ${({borderColor}) => borderColor};
|
58
38
|
padding: ${({padding}) => padding}px;
|
@@ -69,8 +49,6 @@ ReactModalComponent.propTypes = {
|
|
69
49
|
|
70
50
|
ReactModalComponent.defaultProps = {
|
71
51
|
title: "",
|
72
|
-
height: "80vh",
|
73
|
-
width: "50vw",
|
74
52
|
};
|
75
53
|
|
76
54
|
export default ReactModalComponent;
|
@@ -1,13 +1,24 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { useEffect } from 'react';
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
|
5
|
-
import { Formik, Form } from 'formik';
|
5
|
+
import { useFormikContext, Formik, Form } from 'formik';
|
6
6
|
import ReusableHeader from '../ReusableHeader/ReusableHeader';
|
7
7
|
import Buttons from '../../Buttons/Buttons/Buttons';
|
8
8
|
|
9
9
|
const ReusableForm = ({ formTitle, sections, initialValues, ...props }) => {
|
10
10
|
|
11
|
+
const AutoSubmitToken = () => {
|
12
|
+
const { values, submitForm } = useFormikContext();
|
13
|
+
useEffect(() => {
|
14
|
+
if (props.handleChange) {
|
15
|
+
props.handleChange(values)
|
16
|
+
}
|
17
|
+
}, [values, submitForm]);
|
18
|
+
return null;
|
19
|
+
|
20
|
+
};
|
21
|
+
|
11
22
|
const submitHandler = (values) => {
|
12
23
|
props.saveHandler(values)
|
13
24
|
}
|
@@ -18,9 +29,9 @@ const ReusableForm = ({ formTitle, sections, initialValues, ...props }) => {
|
|
18
29
|
|
19
30
|
return (
|
20
31
|
<Formik
|
21
|
-
|
22
|
-
|
23
|
-
|
32
|
+
initialValues={initialValues}
|
33
|
+
validationSchema={props.formSchema}
|
34
|
+
onSubmit={values => submitHandler(values)}
|
24
35
|
>
|
25
36
|
<CreateForm {...props}>
|
26
37
|
<ReusableHeader title={formTitle} {...props.headerStyles} />
|
@@ -51,7 +62,7 @@ const ReusableForm = ({ formTitle, sections, initialValues, ...props }) => {
|
|
51
62
|
size="md"
|
52
63
|
variant="primary"
|
53
64
|
type="submit"
|
54
|
-
buttonClicked={() => {}}
|
65
|
+
buttonClicked={() => { }}
|
55
66
|
/>
|
56
67
|
{
|
57
68
|
props.cancelBtnText &&
|
@@ -63,6 +74,7 @@ const ReusableForm = ({ formTitle, sections, initialValues, ...props }) => {
|
|
63
74
|
buttonClicked={handleCancel} />
|
64
75
|
}
|
65
76
|
</FormFooter>}
|
77
|
+
<AutoSubmitToken />
|
66
78
|
</CreateForm>
|
67
79
|
</Formik>
|
68
80
|
)
|