@mohamed-karawia/library 0.1.18 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +114 -4
- 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 +159 -0
- package/dist/stories/Events/Event/Event.js +123 -4
- package/dist/stories/Events/EventsList/EventsList.js +98 -16
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +94 -9
- package/dist/stories/Library/Notes/Notes.js +94 -9
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +98 -10
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +96 -34
- 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 +94 -17
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +88 -10
- 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 +53 -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 +85 -19
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +108 -4
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +84 -9
- 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 +941 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +110 -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 +109 -0
- package/src/stories/Events/Event/Event.jsx +105 -4
- package/src/stories/Events/EventsList/EventsList.jsx +98 -17
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +94 -7
- package/src/stories/Library/Notes/Notes.jsx +73 -7
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +81 -11
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +78 -34
- 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 +68 -6
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +69 -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 +47 -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 +64 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +77 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +64 -9
- 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 +703 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -0,0 +1,181 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _CustomSelect = _interopRequireDefault(require("../../Common Inputs/CustomSelect/CustomSelect"));
|
21
|
+
|
22
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
23
|
+
|
24
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
25
|
+
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
27
|
+
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
29
|
+
|
30
|
+
var MusicAlbumsPreview = function MusicAlbumsPreview(props) {
|
31
|
+
var _useState = (0, _react.useState)({}),
|
32
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
33
|
+
musicAlbumsStyles = _useState2[0],
|
34
|
+
setMusicAlbumsStyles = _useState2[1];
|
35
|
+
|
36
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
37
|
+
headerStyles: {
|
38
|
+
headerBackground: '',
|
39
|
+
padding: 0,
|
40
|
+
titleColor: '',
|
41
|
+
titleFontSize: '',
|
42
|
+
titleFontWeight: ''
|
43
|
+
},
|
44
|
+
customCardStyles: {
|
45
|
+
cardBackgroundColor: '',
|
46
|
+
onHoverBackgroundColor: '',
|
47
|
+
cardRadius: '',
|
48
|
+
cardTitleFontSize: '',
|
49
|
+
cardTitleFontWeight: '',
|
50
|
+
cardTitleColor: '',
|
51
|
+
cardImageRadius: '',
|
52
|
+
cardDescriptionFontSize: '',
|
53
|
+
cardDescriptionColor: '',
|
54
|
+
cardPadding: 0,
|
55
|
+
imgSize: 0,
|
56
|
+
cardBorderSize: 0,
|
57
|
+
cardBorderColor: 'purple'
|
58
|
+
}
|
59
|
+
};
|
60
|
+
var sections = [{
|
61
|
+
title: "Header Styles",
|
62
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
63
|
+
label: "Header Background",
|
64
|
+
name: "headerStyles.headerBackground"
|
65
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
66
|
+
type: "number",
|
67
|
+
label: "Padding",
|
68
|
+
name: "headerStyles.padding"
|
69
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
70
|
+
label: "Title Color",
|
71
|
+
name: "headerStyles.titleColor"
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
73
|
+
type: "number",
|
74
|
+
label: "Title Font Size",
|
75
|
+
name: "headerStyles.titleFontSize"
|
76
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
77
|
+
type: "number",
|
78
|
+
label: "Title Font Weight",
|
79
|
+
name: "headerStyles.titleFontWeight"
|
80
|
+
})]
|
81
|
+
}, {
|
82
|
+
title: "Card Styles",
|
83
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
84
|
+
label: "Card Background",
|
85
|
+
name: "customCardStyles.cardBackgroundColor"
|
86
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
87
|
+
label: "Hover Color",
|
88
|
+
name: "customCardStyles.onHoverBackgroundColor"
|
89
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
90
|
+
type: "number",
|
91
|
+
label: "Card Radius",
|
92
|
+
name: "customCardStyles.cardRadius"
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
94
|
+
type: "number",
|
95
|
+
label: "Title Font Size",
|
96
|
+
name: "customCardStyles.cardTitleFontSize"
|
97
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
98
|
+
type: "number",
|
99
|
+
label: "Title Font Weight",
|
100
|
+
name: "customCardStyles.cardTitleFontWeight"
|
101
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
102
|
+
label: "Title Color",
|
103
|
+
name: "customCardStyles.cardTitleColor"
|
104
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
105
|
+
type: "number",
|
106
|
+
label: "Card Image Radius",
|
107
|
+
name: "customCardStyles.cardImageRadius"
|
108
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
109
|
+
type: "number",
|
110
|
+
label: "Artist Font Size",
|
111
|
+
name: "customCardStyles.cardDescriptionFontSize"
|
112
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
113
|
+
label: "Artist Font Color",
|
114
|
+
name: "customCardStyles.cardDescriptionColor"
|
115
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
116
|
+
type: "number",
|
117
|
+
label: "Card Padding",
|
118
|
+
name: "customCardStyles.cardPadding"
|
119
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
120
|
+
type: "number",
|
121
|
+
label: "Image Size",
|
122
|
+
name: "customCardStyles.imgSize"
|
123
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
124
|
+
type: "number",
|
125
|
+
label: "Border Size",
|
126
|
+
name: "customCardStyles.cardBorderSize"
|
127
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
128
|
+
label: "Border Color",
|
129
|
+
name: "customCardStyles.cardBorderColor"
|
130
|
+
})]
|
131
|
+
}];
|
132
|
+
|
133
|
+
var handleChange = function handleChange(values) {
|
134
|
+
if (values) {
|
135
|
+
props.formChanged(values);
|
136
|
+
setMusicAlbumsStyles(values);
|
137
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
138
|
+
}
|
139
|
+
};
|
140
|
+
|
141
|
+
var submitHandler = function submitHandler(values) {
|
142
|
+
console.log(values);
|
143
|
+
};
|
144
|
+
|
145
|
+
var cancelHandler = function cancelHandler() {
|
146
|
+
console.log('Canceled');
|
147
|
+
};
|
148
|
+
|
149
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
150
|
+
formTitle: "Music Albums Styles",
|
151
|
+
initialValues: initialValues,
|
152
|
+
sections: sections,
|
153
|
+
headerStyles: {
|
154
|
+
padding: 10,
|
155
|
+
headerBackground: 'black',
|
156
|
+
titleColor: '#ffff'
|
157
|
+
},
|
158
|
+
sectionHeaderStyles: {
|
159
|
+
padding: 6,
|
160
|
+
headerBackground: '#FE1744',
|
161
|
+
titleColor: '#ffff'
|
162
|
+
},
|
163
|
+
bodyPadding: 10,
|
164
|
+
saveBtnText: "Save",
|
165
|
+
cancelBtnText: "Cancel",
|
166
|
+
saveBtnHandle: submitHandler,
|
167
|
+
cancelHandler: cancelHandler,
|
168
|
+
handleChange: handleChange,
|
169
|
+
bodyRowGap: 20,
|
170
|
+
bodyColumnGap: 10
|
171
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
172
|
+
type: 'MusicAlbums',
|
173
|
+
componentProps: props.componentProps,
|
174
|
+
stylingProps: musicAlbumsStyles,
|
175
|
+
da: true
|
176
|
+
})));
|
177
|
+
};
|
178
|
+
|
179
|
+
MusicAlbumsPreview.defaultProps = {};
|
180
|
+
var _default = MusicAlbumsPreview;
|
181
|
+
exports.default = _default;
|
@@ -0,0 +1,153 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _CustomSelect = _interopRequireDefault(require("../../Common Inputs/CustomSelect/CustomSelect"));
|
21
|
+
|
22
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
23
|
+
|
24
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
25
|
+
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
27
|
+
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
29
|
+
|
30
|
+
var MusicPlayerPreview = function MusicPlayerPreview(props) {
|
31
|
+
var _useState = (0, _react.useState)({}),
|
32
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
33
|
+
musicPlayerStyles = _useState2[0],
|
34
|
+
setMusicPlayerStyles = _useState2[1];
|
35
|
+
|
36
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
37
|
+
headerStyles: {
|
38
|
+
headerBackground: '',
|
39
|
+
padding: 0,
|
40
|
+
titleColor: '',
|
41
|
+
titleFontSize: '',
|
42
|
+
titleFontWeight: '',
|
43
|
+
DiscriptionColor: '',
|
44
|
+
DiscriptionFontSize: '',
|
45
|
+
DiscriptionFontWeight: ''
|
46
|
+
},
|
47
|
+
backgroundColor: '',
|
48
|
+
primaryColor: '',
|
49
|
+
borderRadius: 0,
|
50
|
+
padding: 0,
|
51
|
+
fontColor: '',
|
52
|
+
fontSize: 20
|
53
|
+
};
|
54
|
+
var sections = [{
|
55
|
+
title: "Header Styles",
|
56
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
57
|
+
label: "Header Background",
|
58
|
+
name: "headerStyles.headerBackground"
|
59
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
60
|
+
type: "number",
|
61
|
+
label: "Padding",
|
62
|
+
name: "headerStyles.padding"
|
63
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
64
|
+
label: "Title Color",
|
65
|
+
name: "headerStyles.titleColor"
|
66
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
67
|
+
type: "number",
|
68
|
+
label: "Title Font Size",
|
69
|
+
name: "headerStyles.titleFontSize"
|
70
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
71
|
+
type: "number",
|
72
|
+
label: "Title Font Weight",
|
73
|
+
name: "headerStyles.titleFontWeight"
|
74
|
+
})]
|
75
|
+
}, {
|
76
|
+
title: "Player Styles",
|
77
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
78
|
+
label: "Background Color",
|
79
|
+
name: "backgroundColor"
|
80
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
81
|
+
label: "Primary Color",
|
82
|
+
name: "primaryColor"
|
83
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
84
|
+
type: "number",
|
85
|
+
label: "Border Radius",
|
86
|
+
name: "borderRadius"
|
87
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
88
|
+
type: "number",
|
89
|
+
label: "Padding",
|
90
|
+
name: "customCardStyles.cardTitleFontSize"
|
91
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
92
|
+
type: "number",
|
93
|
+
label: "Title Font Weight",
|
94
|
+
name: "padding"
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
96
|
+
label: "Font Color",
|
97
|
+
name: "fontColor"
|
98
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
99
|
+
type: "number",
|
100
|
+
label: "Font Size",
|
101
|
+
name: "fontSize"
|
102
|
+
})]
|
103
|
+
}];
|
104
|
+
|
105
|
+
var handleChange = function handleChange(values) {
|
106
|
+
if (values) {
|
107
|
+
props.formChanged(values);
|
108
|
+
setMusicPlayerStyles(values);
|
109
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
110
|
+
}
|
111
|
+
};
|
112
|
+
|
113
|
+
var submitHandler = function submitHandler(values) {
|
114
|
+
console.log(values);
|
115
|
+
};
|
116
|
+
|
117
|
+
var cancelHandler = function cancelHandler() {
|
118
|
+
console.log('Canceled');
|
119
|
+
};
|
120
|
+
|
121
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
122
|
+
formTitle: "Music Albums Styles",
|
123
|
+
initialValues: initialValues,
|
124
|
+
sections: sections,
|
125
|
+
headerStyles: {
|
126
|
+
padding: 10,
|
127
|
+
headerBackground: 'black',
|
128
|
+
titleColor: '#ffff'
|
129
|
+
},
|
130
|
+
sectionHeaderStyles: {
|
131
|
+
padding: 6,
|
132
|
+
headerBackground: '#FE1744',
|
133
|
+
titleColor: '#ffff'
|
134
|
+
},
|
135
|
+
bodyPadding: 10,
|
136
|
+
saveBtnText: "Save",
|
137
|
+
cancelBtnText: "Cancel",
|
138
|
+
saveBtnHandle: submitHandler,
|
139
|
+
cancelHandler: cancelHandler,
|
140
|
+
handleChange: handleChange,
|
141
|
+
bodyRowGap: 20,
|
142
|
+
bodyColumnGap: 10
|
143
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
144
|
+
type: 'MusicPlayer',
|
145
|
+
componentProps: props.componentProps,
|
146
|
+
stylingProps: musicPlayerStyles,
|
147
|
+
da: true
|
148
|
+
})));
|
149
|
+
};
|
150
|
+
|
151
|
+
MusicPlayerPreview.defaultProps = {};
|
152
|
+
var _default = MusicPlayerPreview;
|
153
|
+
exports.default = _default;
|
@@ -0,0 +1,112 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _CustomSelect = _interopRequireDefault(require("../../Common Inputs/CustomSelect/CustomSelect"));
|
21
|
+
|
22
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
23
|
+
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
+
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
|
+
|
28
|
+
var NavbarPreview = function NavbarPreview(props) {
|
29
|
+
var _useState = (0, _react.useState)({}),
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
31
|
+
navbarStyles = _useState2[0],
|
32
|
+
setNavbarStyles = _useState2[1];
|
33
|
+
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
|
+
iconSize: 'md',
|
36
|
+
iconBackgroundColor: 'black',
|
37
|
+
navbarColor: 'white'
|
38
|
+
};
|
39
|
+
var sections = [{
|
40
|
+
title: "Navbar Styles",
|
41
|
+
body: [/*#__PURE__*/_react.default.createElement(_CustomSelect.default, {
|
42
|
+
label: "Icon Size",
|
43
|
+
options: [{
|
44
|
+
label: 'select an option',
|
45
|
+
value: ''
|
46
|
+
}, {
|
47
|
+
label: 'small',
|
48
|
+
value: 'sm'
|
49
|
+
}, {
|
50
|
+
label: 'medium',
|
51
|
+
value: 'md'
|
52
|
+
}, {
|
53
|
+
label: 'large',
|
54
|
+
value: 'lg'
|
55
|
+
}],
|
56
|
+
name: "iconSize"
|
57
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
58
|
+
label: "Icon Color",
|
59
|
+
name: "iconBackgroundColor"
|
60
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
61
|
+
label: "Background Color",
|
62
|
+
name: "navbarColor"
|
63
|
+
})]
|
64
|
+
}];
|
65
|
+
|
66
|
+
var handleChange = function handleChange(values) {
|
67
|
+
if (values) {
|
68
|
+
props.formChanged(values);
|
69
|
+
setNavbarStyles(values);
|
70
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
71
|
+
}
|
72
|
+
};
|
73
|
+
|
74
|
+
var submitHandler = function submitHandler(values) {
|
75
|
+
console.log(values);
|
76
|
+
};
|
77
|
+
|
78
|
+
var cancelHandler = function cancelHandler() {
|
79
|
+
console.log('Canceled');
|
80
|
+
};
|
81
|
+
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
83
|
+
formTitle: "Reusable form",
|
84
|
+
initialValues: initialValues,
|
85
|
+
sections: sections,
|
86
|
+
headerStyles: {
|
87
|
+
padding: 10,
|
88
|
+
headerBackground: 'black',
|
89
|
+
titleColor: '#ffff'
|
90
|
+
},
|
91
|
+
sectionHeaderStyles: {
|
92
|
+
padding: 6,
|
93
|
+
headerBackground: '#FE1744',
|
94
|
+
titleColor: '#ffff'
|
95
|
+
},
|
96
|
+
bodyPadding: 10,
|
97
|
+
saveBtnText: "Save",
|
98
|
+
cancelBtnText: "Cancel",
|
99
|
+
saveBtnHandle: submitHandler,
|
100
|
+
cancelHandler: cancelHandler,
|
101
|
+
handleChange: handleChange,
|
102
|
+
bodyRowGap: 20,
|
103
|
+
bodyColumnGap: 10
|
104
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
105
|
+
type: 'Navbar',
|
106
|
+
stylingProps: navbarStyles
|
107
|
+
})));
|
108
|
+
};
|
109
|
+
|
110
|
+
NavbarPreview.defaultProps = {};
|
111
|
+
var _default = NavbarPreview;
|
112
|
+
exports.default = _default;
|
@@ -0,0 +1,173 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
21
|
+
|
22
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
23
|
+
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
+
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
|
+
|
28
|
+
var NotesPreview = function NotesPreview(props) {
|
29
|
+
var _useState = (0, _react.useState)({}),
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
31
|
+
notesStyles = _useState2[0],
|
32
|
+
setNotesStyles = _useState2[1];
|
33
|
+
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
|
+
headerStyles: {
|
36
|
+
headerBackground: '',
|
37
|
+
padding: 0,
|
38
|
+
titleColor: '',
|
39
|
+
titleFontSize: '',
|
40
|
+
titleFontWeight: ''
|
41
|
+
},
|
42
|
+
customCardStyles: {
|
43
|
+
cardBackgroundColor: '',
|
44
|
+
onHoverBackgroundColor: '',
|
45
|
+
cardRadius: '',
|
46
|
+
cardTitleFontSize: '',
|
47
|
+
cardTitleFontWeight: '',
|
48
|
+
cardTitleColor: '',
|
49
|
+
cardImageRadius: '',
|
50
|
+
cardPadding: 0,
|
51
|
+
imgSize: 0,
|
52
|
+
cardBorderSize: 0,
|
53
|
+
cardBorderColor: '',
|
54
|
+
iconColor: ''
|
55
|
+
}
|
56
|
+
};
|
57
|
+
var sections = [{
|
58
|
+
title: "Header Styles",
|
59
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
60
|
+
label: "Header Background",
|
61
|
+
name: "headerStyles.headerBackground"
|
62
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
63
|
+
type: "number",
|
64
|
+
label: "Padding",
|
65
|
+
name: "headerStyles.padding"
|
66
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
67
|
+
label: "Title Color",
|
68
|
+
name: "headerStyles.titleColor"
|
69
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
70
|
+
type: "number",
|
71
|
+
label: "Title Font Size",
|
72
|
+
name: "headerStyles.titleFontSize"
|
73
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
74
|
+
type: "number",
|
75
|
+
label: "Title Font Weight",
|
76
|
+
name: "headerStyles.titleFontWeight"
|
77
|
+
})]
|
78
|
+
}, {
|
79
|
+
title: "Card Styles",
|
80
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
81
|
+
label: "Card Background",
|
82
|
+
name: "customCardStyles.cardBackgroundColor"
|
83
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
84
|
+
label: "Hover Color",
|
85
|
+
name: "customCardStyles.onHoverBackgroundColor"
|
86
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
87
|
+
type: "number",
|
88
|
+
label: "Card Radius",
|
89
|
+
name: "customCardStyles.cardRadius"
|
90
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
91
|
+
type: "number",
|
92
|
+
label: "Title Font Size",
|
93
|
+
name: "customCardStyles.cardTitleFontSize"
|
94
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
95
|
+
type: "number",
|
96
|
+
label: "Title Font Weight",
|
97
|
+
name: "customCardStyles.cardTitleFontWeight"
|
98
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
99
|
+
label: "Title Color",
|
100
|
+
name: "customCardStyles.cardTitleColor"
|
101
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
102
|
+
type: "number",
|
103
|
+
label: "Card Image Radius",
|
104
|
+
name: "customCardStyles.cardImageRadius"
|
105
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
106
|
+
type: "number",
|
107
|
+
label: "Card Padding",
|
108
|
+
name: "customCardStyles.cardPadding"
|
109
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
110
|
+
type: "number",
|
111
|
+
label: "Image Size",
|
112
|
+
name: "customCardStyles.imgSize"
|
113
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
114
|
+
type: "number",
|
115
|
+
label: "Border Size",
|
116
|
+
name: "customCardStyles.cardBorderSize"
|
117
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
118
|
+
label: "Border Color",
|
119
|
+
name: "customCardStyles.cardBorderColor"
|
120
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
121
|
+
label: "Icon Color",
|
122
|
+
name: "customCardStyles.iconColor"
|
123
|
+
})]
|
124
|
+
}];
|
125
|
+
|
126
|
+
var handleChange = function handleChange(values) {
|
127
|
+
if (values) {
|
128
|
+
props.formChanged(values);
|
129
|
+
setNotesStyles(values);
|
130
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
131
|
+
}
|
132
|
+
};
|
133
|
+
|
134
|
+
var submitHandler = function submitHandler(values) {
|
135
|
+
console.log(values);
|
136
|
+
};
|
137
|
+
|
138
|
+
var cancelHandler = function cancelHandler() {
|
139
|
+
console.log('Canceled');
|
140
|
+
};
|
141
|
+
|
142
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
143
|
+
formTitle: "Notes Styles",
|
144
|
+
initialValues: initialValues,
|
145
|
+
sections: sections,
|
146
|
+
headerStyles: {
|
147
|
+
padding: 10,
|
148
|
+
headerBackground: 'black',
|
149
|
+
titleColor: '#ffff'
|
150
|
+
},
|
151
|
+
sectionHeaderStyles: {
|
152
|
+
padding: 6,
|
153
|
+
headerBackground: '#FE1744',
|
154
|
+
titleColor: '#ffff'
|
155
|
+
},
|
156
|
+
bodyPadding: 10,
|
157
|
+
saveBtnText: "Save",
|
158
|
+
cancelBtnText: "Cancel",
|
159
|
+
saveBtnHandle: submitHandler,
|
160
|
+
cancelHandler: cancelHandler,
|
161
|
+
handleChange: handleChange,
|
162
|
+
bodyRowGap: 20,
|
163
|
+
bodyColumnGap: 10
|
164
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
165
|
+
type: 'Notes',
|
166
|
+
componentProps: props.componentProps,
|
167
|
+
stylingProps: notesStyles
|
168
|
+
})));
|
169
|
+
};
|
170
|
+
|
171
|
+
NotesPreview.defaultProps = {};
|
172
|
+
var _default = NotesPreview;
|
173
|
+
exports.default = _default;
|