@mohamed-karawia/library 0.1.16 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/dist/stories/Chat/Chat.js +129 -14
  2. package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
  3. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  4. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  5. package/dist/stories/Community/Community.js +137 -0
  6. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +10 -12
  7. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -1
  8. package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
  9. package/dist/stories/Events/Event/Event.js +117 -5
  10. package/dist/stories/Events/EventsList/EventsList.js +98 -19
  11. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  12. package/dist/stories/Library/Folders/Folders.js +82 -6
  13. package/dist/stories/Library/Notes/Notes.js +78 -4
  14. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  15. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +138 -15
  16. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +67 -28
  17. package/dist/stories/Navbar/Navbar.js +1 -1
  18. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +8 -0
  19. package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
  20. package/dist/stories/Pages/Enrollment/Forms/Forms.js +3 -1
  21. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  22. package/dist/stories/Pages/Events/Events/Events.js +1 -0
  23. package/dist/stories/Pages/Library/Folders/Library.js +2 -1
  24. package/dist/stories/Pages/Music/MusicAlbum/Music.js +8 -6
  25. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  26. package/dist/stories/Pages/Photos/Albums/Albums.js +4 -1
  27. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -19
  28. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +83 -25
  29. package/dist/stories/Preview/Preview.js +37 -0
  30. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  31. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  32. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  33. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  34. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  35. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  36. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  37. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  38. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  39. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  40. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  41. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  42. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  43. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  44. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  45. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  46. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  47. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  48. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  49. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  50. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  51. package/dist/stories/Reusable Components/Community/Community.js +76 -0
  52. package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
  53. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  54. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
  55. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  56. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  57. package/dist/stories/Sections/Sections.js +8 -2
  58. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  59. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  60. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
  61. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
  62. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  63. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  64. package/dist/stories/helpers/util.js +60 -3
  65. package/dist/stories/store/communities.js +943 -0
  66. package/dist/stories/store/store.js +44 -0
  67. package/package.json +5 -2
  68. package/src/stories/Chat/Chat.jsx +109 -13
  69. package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
  70. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  71. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  72. package/src/stories/Community/Community.jsx +110 -0
  73. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +7 -9
  74. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -2
  75. package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
  76. package/src/stories/Events/Event/Event.jsx +98 -5
  77. package/src/stories/Events/EventsList/EventsList.jsx +101 -22
  78. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  79. package/src/stories/Library/Folders/Folders.jsx +82 -6
  80. package/src/stories/Library/Notes/Notes.jsx +65 -5
  81. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  82. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -14
  83. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +61 -32
  84. package/src/stories/Navbar/Navbar.jsx +1 -1
  85. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +10 -1
  86. package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
  87. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +3 -1
  88. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  89. package/src/stories/Pages/Events/Events/Events.jsx +75 -74
  90. package/src/stories/Pages/Library/Folders/Library.jsx +2 -1
  91. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +8 -6
  92. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  93. package/src/stories/Pages/Photos/Albums/Albums.jsx +3 -0
  94. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -13
  95. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +66 -33
  96. package/src/stories/Preview/Preview.jsx +35 -0
  97. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  98. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  99. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  100. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  101. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  102. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  103. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  104. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  105. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  106. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  107. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  108. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  109. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  110. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  111. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  112. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  113. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  114. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  115. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  116. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  117. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  118. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  119. package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
  120. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  121. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
  122. package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
  123. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  124. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  125. package/src/stories/Sections/Sections.jsx +5 -2
  126. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  127. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  128. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
  129. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
  130. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  131. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  132. package/src/stories/helpers/util.js +42 -2
  133. package/src/stories/store/communities.js +705 -0
  134. package/src/stories/store/store.js +33 -0
  135. package/src/stories/styling.json +92 -0
@@ -0,0 +1,93 @@
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 CustomSelect from '../../Common Inputs/CustomSelect/CustomSelect';
8
+ import Picker from '../../Common Inputs/Picker/Picker';
9
+
10
+ const NavbarPreview = (props) => {
11
+ const [navbarStyles, setNavbarStyles] = useState({})
12
+
13
+ const initialValues = {
14
+ iconSize: 'md',
15
+ iconBackgroundColor: 'black',
16
+ navbarColor: 'white',
17
+ }
18
+
19
+ const sections = [
20
+ {
21
+ title: "Navbar Styles",
22
+ body: [
23
+ (
24
+ <CustomSelect label="Icon Size" options={[
25
+ { label: 'select an option', value: '' },
26
+ { label: 'small', value: 'sm' },
27
+ { label: 'medium', value: 'md' },
28
+ { label: 'large', value: 'lg' },
29
+ ]} name="iconSize" />
30
+ ),
31
+ (<Picker label="Icon Color" name="iconBackgroundColor" />),
32
+ (<Picker label="Background Color" name="navbarColor" />)
33
+ ]
34
+ },
35
+ ]
36
+
37
+ const handleChange = (values) => {
38
+ if(values){
39
+ props.formChanged(values)
40
+ setNavbarStyles(values)
41
+ localStorage.setItem('formStyles', JSON.stringify(values))
42
+ }
43
+ }
44
+
45
+ const submitHandler = (values) => {
46
+ console.log(values);
47
+ }
48
+
49
+ const cancelHandler = () => {
50
+ console.log('Canceled')
51
+ }
52
+
53
+ return (
54
+ <Container>
55
+ <Left>
56
+ <ReusableForm
57
+ formTitle="Reusable form"
58
+ initialValues={initialValues}
59
+ sections={sections}
60
+ headerStyles={{
61
+ padding: 10,
62
+ headerBackground: 'black',
63
+ titleColor: '#ffff',
64
+ }}
65
+ sectionHeaderStyles={{
66
+ padding: 6,
67
+ headerBackground: '#FE1744',
68
+ titleColor: '#ffff',
69
+ }}
70
+ bodyPadding={10}
71
+ saveBtnText="Save"
72
+ cancelBtnText="Cancel"
73
+ saveBtnHandle={submitHandler}
74
+ cancelHandler={cancelHandler}
75
+ handleChange={handleChange}
76
+ bodyRowGap={20}
77
+ bodyColumnGap={10}
78
+ />
79
+ </Left>
80
+ <Right>
81
+ <Preview type={'Navbar'} stylingProps={navbarStyles} />
82
+ </Right>
83
+ </Container>
84
+ )
85
+ };
86
+
87
+ NavbarPreview.defaultProps = {};
88
+
89
+ NavbarPreview.propTypes = {
90
+ componentProps: PropTypes.object
91
+ }
92
+
93
+ export default NavbarPreview;
@@ -0,0 +1,122 @@
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 NotesPreview = (props) => {
12
+ const [notesStyles, setNotesStyles] = useState({});
13
+ const initialValues = {
14
+ headerStyles: {
15
+ headerBackground: '',
16
+ padding: 0,
17
+ titleColor: '',
18
+ titleFontSize: '',
19
+ titleFontWeight: '',
20
+ },
21
+ customCardStyles: {
22
+ cardBackgroundColor: '',
23
+ onHoverBackgroundColor: '',
24
+ cardRadius: '',
25
+ cardTitleFontSize: '',
26
+ cardTitleFontWeight: '',
27
+ cardTitleColor: '',
28
+ cardImageRadius: '',
29
+ cardPadding: 0,
30
+ imgSize: 0,
31
+ cardBorderSize: 0,
32
+ cardBorderColor: '',
33
+ iconColor: ''
34
+ }
35
+ }
36
+
37
+ const sections = [
38
+ {
39
+ title: "Header Styles",
40
+ body: [
41
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
42
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
43
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
44
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
45
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
46
+ ]
47
+ },
48
+ {
49
+ title: "Card Styles",
50
+ body: [
51
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
52
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
53
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
54
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
55
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
56
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
57
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
58
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
59
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
60
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
61
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
62
+ (<Picker label="Icon Color" name="customCardStyles.iconColor" />),
63
+ ]
64
+ },
65
+ ]
66
+
67
+ const handleChange = (values) => {
68
+ if(values){
69
+ props.formChanged(values)
70
+ setNotesStyles(values)
71
+ localStorage.setItem('formStyles', JSON.stringify(values))
72
+ }
73
+ }
74
+
75
+ const submitHandler = (values) => {
76
+ console.log(values);
77
+ }
78
+
79
+ const cancelHandler = () => {
80
+ console.log('Canceled')
81
+ }
82
+ return (
83
+ <Container>
84
+ <Left>
85
+ <ReusableForm
86
+ formTitle="Notes Styles"
87
+ initialValues={initialValues}
88
+ sections={sections}
89
+ headerStyles={{
90
+ padding: 10,
91
+ headerBackground: 'black',
92
+ titleColor: '#ffff',
93
+ }}
94
+ sectionHeaderStyles={{
95
+ padding: 6,
96
+ headerBackground: '#FE1744',
97
+ titleColor: '#ffff',
98
+ }}
99
+ bodyPadding={10}
100
+ saveBtnText="Save"
101
+ cancelBtnText="Cancel"
102
+ saveBtnHandle={submitHandler}
103
+ cancelHandler={cancelHandler}
104
+ handleChange={handleChange}
105
+ bodyRowGap={20}
106
+ bodyColumnGap={10}
107
+ />
108
+ </Left>
109
+ <Right>
110
+ <Preview type={'Notes'} componentProps={props.componentProps} stylingProps={notesStyles} />
111
+ </Right>
112
+ </Container>
113
+ );
114
+ };
115
+
116
+ NotesPreview.defaultProps = {};
117
+
118
+ NotesPreview.propTypes = {
119
+ componentProps: PropTypes.object
120
+ }
121
+
122
+ export default NotesPreview;
@@ -0,0 +1,129 @@
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 PhotoAlbumPreview = (props) => {
11
+ const [photoAlbumStyles, setPhotoAlbumStyles] = useState({});
12
+ const initialValues = {
13
+ headerStyles: {
14
+ headerBackground: '',
15
+ padding: 0,
16
+ titleColor: '',
17
+ titleFontSize: '',
18
+ titleFontWeight: '',
19
+ controlsStyles: {
20
+ iconSize: '',
21
+ iconColor: ''
22
+ }
23
+ },
24
+ customCardStyles: {
25
+ cardBackgroundColor: '',
26
+ onHoverBackgroundColor: '',
27
+ cardRadius: '',
28
+ cardTitleFontSize: '',
29
+ cardTitleFontWeight: '',
30
+ cardTitleColor: '',
31
+ cardImageRadius: '',
32
+ cardDescriptionFontSize: '',
33
+ cardDescriptionColor: '',
34
+ cardPadding: 0,
35
+ imgSize: 0,
36
+ cardBorderSize: 0,
37
+ cardBorderColor: ''
38
+ }
39
+ }
40
+
41
+ const sections = [
42
+ {
43
+ title: "Header Styles",
44
+ body: [
45
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
46
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
47
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
48
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
49
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />),
50
+ (<TextField type="number" label="Controls Size" name="headerStyles.controlsStyles.iconSize" />),
51
+ (<Picker label="Controls Color" name="headerStyles.controlsStyles.iconColor" />),
52
+ ]
53
+ },
54
+ {
55
+ title: "Card Styles",
56
+ body: [
57
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
58
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
59
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
60
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
61
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
62
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
63
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
64
+ (<TextField type="number" label="Discription Font Size" name="customCardStyles.cardDescriptionFontSize" />),
65
+ (<Picker label="Discription Font Color" name="customCardStyles.cardDescriptionColor" />),
66
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
67
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
68
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
69
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
70
+ ]
71
+ },
72
+ ]
73
+
74
+ const handleChange = (values) => {
75
+ if(values){
76
+ props.formChanged(values)
77
+ setPhotoAlbumStyles(values)
78
+ localStorage.setItem('formStyles', JSON.stringify(values))
79
+ }
80
+ }
81
+
82
+ const submitHandler = (values) => {
83
+ console.log(values);
84
+ }
85
+
86
+ const cancelHandler = () => {
87
+ console.log('Canceled')
88
+ }
89
+ return (
90
+ <Container>
91
+ <Left>
92
+ <ReusableForm
93
+ formTitle="Photo Album Styles"
94
+ initialValues={initialValues}
95
+ sections={sections}
96
+ headerStyles={{
97
+ padding: 10,
98
+ headerBackground: 'black',
99
+ titleColor: '#ffff',
100
+ }}
101
+ sectionHeaderStyles={{
102
+ padding: 6,
103
+ headerBackground: '#FE1744',
104
+ titleColor: '#ffff',
105
+ }}
106
+ bodyPadding={10}
107
+ saveBtnText="Save"
108
+ cancelBtnText="Cancel"
109
+ saveBtnHandle={submitHandler}
110
+ cancelHandler={cancelHandler}
111
+ handleChange={handleChange}
112
+ bodyRowGap={20}
113
+ bodyColumnGap={10}
114
+ />
115
+ </Left>
116
+ <Right>
117
+ <Preview type={'PhotoAlbum'} componentProps={props.componentProps} stylingProps={photoAlbumStyles} />
118
+ </Right>
119
+ </Container>
120
+ );
121
+ };
122
+
123
+ PhotoAlbumPreview.defaultProps = {};
124
+
125
+ PhotoAlbumPreview.propTypes = {
126
+ componentProps: PropTypes.object
127
+ }
128
+
129
+ export default PhotoAlbumPreview;
@@ -0,0 +1,129 @@
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 PhotoAlbumsPreview = (props) => {
11
+ const [photoAlbumsStyles, setPhotoAlbumsStyles] = useState({});
12
+ const initialValues = {
13
+ headerStyles: {
14
+ headerBackground: '',
15
+ padding: 0,
16
+ titleColor: '',
17
+ titleFontSize: '',
18
+ titleFontWeight: '',
19
+ controlsStyles: {
20
+ iconSize: '',
21
+ iconColor: ''
22
+ }
23
+ },
24
+ customCardStyles: {
25
+ cardBackgroundColor: '',
26
+ onHoverBackgroundColor: '',
27
+ cardRadius: '',
28
+ cardTitleFontSize: '',
29
+ cardTitleFontWeight: '',
30
+ cardTitleColor: '',
31
+ countColor: '',
32
+ countFontSize: '',
33
+ cardImageRadius: '',
34
+ cardPadding: 0,
35
+ imgSize: 0,
36
+ cardBorderSize: 0,
37
+ cardBorderColor: 'purple'
38
+ }
39
+ }
40
+
41
+ const sections = [
42
+ {
43
+ title: "Header Styles",
44
+ body: [
45
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
46
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
47
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
48
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
49
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />),
50
+ (<TextField type="number" label="Controls Size" name="headerStyles.controlsStyles.iconSize" />),
51
+ (<Picker label="Controls Color" name="headerStyles.controlsStyles.iconColor" />),
52
+ ]
53
+ },
54
+ {
55
+ title: "Card Styles",
56
+ body: [
57
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
58
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
59
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
60
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
61
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
62
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
63
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
64
+ (<TextField type="number" label="Count Font Size" name="customCardStyles.countFontSize" />),
65
+ (<Picker label="Count Font Color" name="customCardStyles.countColor" />),
66
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
67
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
68
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
69
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
70
+ ]
71
+ },
72
+ ]
73
+
74
+ const handleChange = (values) => {
75
+ if(values){
76
+ props.formChanged(values)
77
+ setPhotoAlbumsStyles(values)
78
+ localStorage.setItem('formStyles', JSON.stringify(values))
79
+ }
80
+ }
81
+
82
+ const submitHandler = (values) => {
83
+ console.log(values);
84
+ }
85
+
86
+ const cancelHandler = () => {
87
+ console.log('Canceled')
88
+ }
89
+ return (
90
+ <Container>
91
+ <Left>
92
+ <ReusableForm
93
+ formTitle="Photo Albums Styles"
94
+ initialValues={initialValues}
95
+ sections={sections}
96
+ headerStyles={{
97
+ padding: 10,
98
+ headerBackground: 'black',
99
+ titleColor: '#ffff',
100
+ }}
101
+ sectionHeaderStyles={{
102
+ padding: 6,
103
+ headerBackground: '#FE1744',
104
+ titleColor: '#ffff',
105
+ }}
106
+ bodyPadding={10}
107
+ saveBtnText="Save"
108
+ cancelBtnText="Cancel"
109
+ saveBtnHandle={submitHandler}
110
+ cancelHandler={cancelHandler}
111
+ handleChange={handleChange}
112
+ bodyRowGap={20}
113
+ bodyColumnGap={10}
114
+ />
115
+ </Left>
116
+ <Right>
117
+ <Preview type={'PhotoAlbums'} componentProps={props.componentProps} stylingProps={photoAlbumsStyles} />
118
+ </Right>
119
+ </Container>
120
+ );
121
+ };
122
+
123
+ PhotoAlbumsPreview.defaultProps = {};
124
+
125
+ PhotoAlbumsPreview.propTypes = {
126
+ componentProps: PropTypes.object
127
+ }
128
+
129
+ export default PhotoAlbumsPreview;
@@ -0,0 +1,138 @@
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 SpacesListPreview = (props) => {
11
+ const [spacesStyles, setSpacesStyles] = useState({});
12
+ const initialValues = {
13
+ headerStyles: {
14
+ headerBackground: '',
15
+ padding: 0,
16
+ titleColor: '',
17
+ titleFontSize: '',
18
+ titleFontWeight: '',
19
+ },
20
+ sectionHeaderStyles: {
21
+ headerBackground: '',
22
+ padding: 0,
23
+ titleColor: '',
24
+ titleFontSize: '',
25
+ titleFontWeight: '',
26
+ },
27
+ customCardStyles: {
28
+ cardBackgroundColor: '',
29
+ onHoverBackgroundColor: '',
30
+ cardRadius: '',
31
+ cardTitleFontSize: '',
32
+ cardTitleFontWeight: '',
33
+ cardTitleColor: '',
34
+ cardImageRadius: '',
35
+ cardPadding: 0,
36
+ imgSize: 0,
37
+ cardBorderSize: 0,
38
+ cardBorderColor: 'purple'
39
+ }
40
+ }
41
+
42
+ const sections = [
43
+ {
44
+ title: "Header Styles",
45
+ body: [
46
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
47
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
48
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
49
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
50
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
51
+ ]
52
+ },
53
+ {
54
+ title: "Section Header Styles",
55
+ body: [
56
+ (<Picker label="Header Background" name="sectionHeaderStyles.headerBackground" />),
57
+ (<TextField type="number" label="Padding" name="sectionHeaderStyles.padding" />),
58
+ (<Picker label="Title Color" name="sectionHeaderStyles.titleColor" />),
59
+ (<TextField type="number" label="Title Font Size" name="sectionHeaderStyles.titleFontSize" />),
60
+ (<TextField type="number" label="Title Font Weight" name="sectionHeaderStyles.titleFontWeight" />)
61
+ ]
62
+ },
63
+ {
64
+ title: "Card Styles",
65
+ body: [
66
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
67
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
68
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
69
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
70
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
71
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
72
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
73
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
74
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
75
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
76
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
77
+ ]
78
+ },
79
+ ]
80
+
81
+ const handleChange = (values) => {
82
+ if(values){
83
+ props.formChanged(values)
84
+ setSpacesStyles(values)
85
+ localStorage.setItem('formStyles', JSON.stringify(values))
86
+ }
87
+ }
88
+
89
+ const submitHandler = (values) => {
90
+ console.log(values);
91
+ }
92
+
93
+ const cancelHandler = () => {
94
+ console.log('Canceled')
95
+ }
96
+
97
+
98
+ return (
99
+ <Container>
100
+ <Left>
101
+ <ReusableForm
102
+ formTitle="Spaces List Styles"
103
+ initialValues={initialValues}
104
+ sections={sections}
105
+ headerStyles={{
106
+ padding: 10,
107
+ headerBackground: 'black',
108
+ titleColor: '#ffff',
109
+ }}
110
+ sectionHeaderStyles={{
111
+ padding: 6,
112
+ headerBackground: '#FE1744',
113
+ titleColor: '#ffff',
114
+ }}
115
+ bodyPadding={10}
116
+ saveBtnText="Save"
117
+ cancelBtnText="Cancel"
118
+ saveBtnHandle={submitHandler}
119
+ cancelHandler={cancelHandler}
120
+ handleChange={handleChange}
121
+ bodyRowGap={20}
122
+ bodyColumnGap={10}
123
+ />
124
+ </Left>
125
+ <Right>
126
+ <Preview type={'Spaces-List'} componentProps={props.componentProps} stylingProps={spacesStyles} />
127
+ </Right>
128
+ </Container>
129
+ );
130
+ };
131
+
132
+ SpacesListPreview.defaultProps = {};
133
+
134
+ SpacesListPreview.propTypes = {
135
+ componentProps: PropTypes.object
136
+ }
137
+
138
+ export default SpacesListPreview;