@blerp/design 1.3.16 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
- package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
- package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
- package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
- package/dist/cjs/Blerp.js +9 -16
- package/dist/cjs/BlerpAudioContextProvider.js +2 -2
- package/dist/cjs/BlerpListView.js +318 -168
- package/dist/cjs/BlerpListViewPremium.js +155 -130
- package/dist/cjs/BlerpListViewSkeleton.js +60 -13
- package/dist/cjs/BlerpSkeleton.js +32 -9
- package/dist/cjs/CollectionCard.js +139 -60
- package/dist/cjs/CollectionListViewPremium.js +368 -297
- package/dist/cjs/CollectionSkeleton.js +74 -13
- package/dist/cjs/Dropdown.js +272 -172
- package/dist/cjs/EllipsisLoader.js +66 -21
- package/dist/cjs/GroupCard.js +64 -57
- package/dist/cjs/Icons/Icons.js +288 -426
- package/dist/cjs/ImageEditor.js +247 -0
- package/dist/cjs/ImageUpload.js +226 -0
- package/dist/cjs/NewBlerp.js +354 -160
- package/dist/cjs/NewBlerpTest.js +10 -792
- package/dist/cjs/NewCollectionModal.js +294 -310
- package/dist/cjs/PremiumCollectionCard.js +191 -454
- package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/cjs/ReactionButtons.js +26 -13
- package/dist/cjs/SnackbarContextProvider.js +200 -116
- package/dist/cjs/Theme.js +217 -90
- package/dist/cjs/Toggle.js +86 -32
- package/dist/cjs/UserCard.js +13 -32
- package/dist/cjs/UserPage/LibraryControls.js +180 -93
- package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
- package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
- package/dist/cjs/UsernameWithPopout.js +12 -8
- package/dist/cjs/colors.js +15 -8
- package/dist/cjs/helpers.js +131 -0
- package/dist/cjs/index.js +98 -52
- package/dist/cjs/neo-components/Autocomplete.js +280 -0
- package/dist/cjs/neo-components/BottomNavigation.js +120 -0
- package/dist/cjs/neo-components/Box.js +48 -0
- package/dist/cjs/neo-components/Button.js +206 -0
- package/dist/cjs/neo-components/CircularProgress.js +92 -0
- package/dist/cjs/neo-components/Container.js +75 -0
- package/dist/cjs/neo-components/Dialog.js +441 -0
- package/dist/cjs/neo-components/Fab.js +237 -0
- package/dist/cjs/neo-components/FormControls.js +1057 -0
- package/dist/cjs/neo-components/Grid.js +256 -0
- package/dist/cjs/neo-components/IconButton.js +111 -0
- package/dist/cjs/neo-components/Input.js +493 -0
- package/dist/cjs/neo-components/Layout.js +1213 -0
- package/dist/cjs/neo-components/Misc.js +858 -0
- package/dist/cjs/neo-components/Navigation.js +1578 -0
- package/dist/cjs/neo-components/Paper.js +256 -0
- package/dist/cjs/neo-components/Stack.js +194 -0
- package/dist/cjs/neo-components/Stepper.js +291 -0
- package/dist/cjs/neo-components/Text.js +290 -0
- package/dist/cjs/neo-components/ThemeProvider.js +731 -0
- package/dist/cjs/neo-components/ToggleButton.js +223 -0
- package/dist/cjs/neo-components/createTheme.js +306 -0
- package/dist/cjs/neo-components/withSx.js +164 -0
- package/dist/cjs/neo-utils/sxToStyle.js +508 -0
- package/dist/esm/Blerp/BlerpImageRow.js +166 -46
- package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
- package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
- package/dist/esm/Blerp/BlerpTopRow.js +85 -16
- package/dist/esm/Blerp.js +4 -12
- package/dist/esm/BlerpAudioContextProvider.js +1 -2
- package/dist/esm/BlerpListView.js +313 -160
- package/dist/esm/BlerpListViewPremium.js +135 -109
- package/dist/esm/BlerpListViewSkeleton.js +60 -11
- package/dist/esm/BlerpSkeleton.js +32 -7
- package/dist/esm/CollectionCard.js +118 -38
- package/dist/esm/CollectionListViewPremium.js +367 -294
- package/dist/esm/CollectionSkeleton.js +73 -11
- package/dist/esm/Dropdown.js +260 -161
- package/dist/esm/EllipsisLoader.js +63 -18
- package/dist/esm/GroupCard.js +54 -46
- package/dist/esm/Icons/Icons.js +226 -367
- package/dist/esm/ImageEditor.js +240 -0
- package/dist/esm/ImageUpload.js +217 -0
- package/dist/esm/NewBlerp.js +282 -79
- package/dist/esm/NewBlerpTest.js +11 -781
- package/dist/esm/NewCollectionModal.js +289 -304
- package/dist/esm/PremiumCollectionCard.js +192 -451
- package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/esm/ReactionButtons.js +23 -8
- package/dist/esm/SnackbarContextProvider.js +196 -110
- package/dist/esm/Theme.js +187 -66
- package/dist/esm/Toggle.js +84 -29
- package/dist/esm/UserCard.js +1 -20
- package/dist/esm/UserPage/LibraryControls.js +159 -65
- package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
- package/dist/esm/UserPage/UserProfileHeader.js +100 -79
- package/dist/esm/UsernameWithPopout.js +7 -4
- package/dist/esm/colors.js +11 -9
- package/dist/esm/helpers.js +122 -0
- package/dist/esm/icons.js +1 -1
- package/dist/esm/index.js +39 -3
- package/dist/esm/neo-components/Autocomplete.js +269 -0
- package/dist/esm/neo-components/BottomNavigation.js +109 -0
- package/dist/esm/neo-components/Box.js +36 -0
- package/dist/esm/neo-components/Button.js +194 -0
- package/dist/esm/neo-components/CircularProgress.js +81 -0
- package/dist/esm/neo-components/Container.js +63 -0
- package/dist/esm/neo-components/Dialog.js +423 -0
- package/dist/esm/neo-components/Fab.js +225 -0
- package/dist/esm/neo-components/FormControls.js +1041 -0
- package/dist/esm/neo-components/Grid.js +244 -0
- package/dist/esm/neo-components/IconButton.js +99 -0
- package/dist/esm/neo-components/Input.js +478 -0
- package/dist/esm/neo-components/Layout.js +1179 -0
- package/dist/esm/neo-components/Misc.js +840 -0
- package/dist/esm/neo-components/Navigation.js +1556 -0
- package/dist/esm/neo-components/Paper.js +243 -0
- package/dist/esm/neo-components/Stack.js +182 -0
- package/dist/esm/neo-components/Stepper.js +278 -0
- package/dist/esm/neo-components/Text.js +277 -0
- package/dist/esm/neo-components/ThemeProvider.js +718 -0
- package/dist/esm/neo-components/ToggleButton.js +214 -0
- package/dist/esm/neo-components/createTheme.js +297 -0
- package/dist/esm/neo-components/withSx.js +153 -0
- package/dist/esm/neo-utils/sxToStyle.js +502 -0
- package/package.json +19 -15
|
@@ -1,20 +1,131 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
1
2
|
import { Stack, Text, Box, Input, Button, Popover, IconButton, Divider } from '../index.js';
|
|
2
|
-
import {
|
|
3
|
-
import React, { useContext, useState, useRef } from 'react';
|
|
4
|
-
import '@mui/icons-material/FilterAltRounded';
|
|
5
|
-
import MenuRoundedIcon from '@mui/icons-material/MenuRounded';
|
|
6
|
-
import ViewModuleRoundedIcon from '@mui/icons-material/ViewModuleRounded';
|
|
7
|
-
import '@mui/icons-material/SettingsRounded';
|
|
8
|
-
import { ThemeContext } from 'styled-components';
|
|
9
|
-
import MoreHorizRoundedIcon from '@mui/icons-material/MoreHorizRounded';
|
|
10
|
-
import SortRoundedIcon from '@mui/icons-material/SortRounded';
|
|
11
|
-
import ChevronRightRoundedIcon from '@mui/icons-material/ChevronRightRounded';
|
|
3
|
+
import React, { useState, useRef } from 'react';
|
|
12
4
|
import { useWindowSize } from '../ScreenSizeHook.js';
|
|
13
|
-
import PersonRoundedIcon from '@mui/icons-material/PersonRounded';
|
|
14
|
-
import SearchRoundedIcon from '@mui/icons-material/SearchRounded';
|
|
15
|
-
import CloseRoundedIcon from '@mui/icons-material/CloseRounded';
|
|
16
5
|
|
|
17
|
-
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
|
+
|
|
10
|
+
const IconPerson = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
color = "currentColor"
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
15
|
+
width: "24",
|
|
16
|
+
height: "24",
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
fill: color
|
|
19
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const IconSearch = _ref2 => {
|
|
25
|
+
let {
|
|
26
|
+
color = "currentColor"
|
|
27
|
+
} = _ref2;
|
|
28
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
29
|
+
width: "24",
|
|
30
|
+
height: "24",
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
fill: color
|
|
33
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
34
|
+
d: "M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const IconClose = _ref3 => {
|
|
39
|
+
let {
|
|
40
|
+
color = "currentColor",
|
|
41
|
+
onClick,
|
|
42
|
+
style
|
|
43
|
+
} = _ref3;
|
|
44
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
45
|
+
width: "24",
|
|
46
|
+
height: "24",
|
|
47
|
+
viewBox: "0 0 24 24",
|
|
48
|
+
fill: color,
|
|
49
|
+
onClick: onClick,
|
|
50
|
+
style: _objectSpread({
|
|
51
|
+
cursor: "pointer"
|
|
52
|
+
}, style)
|
|
53
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
54
|
+
d: "M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const IconMenu = _ref4 => {
|
|
59
|
+
let {
|
|
60
|
+
color = "currentColor"
|
|
61
|
+
} = _ref4;
|
|
62
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
63
|
+
width: "24",
|
|
64
|
+
height: "24",
|
|
65
|
+
viewBox: "0 0 24 24",
|
|
66
|
+
fill: color
|
|
67
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
68
|
+
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const IconGrid = _ref5 => {
|
|
73
|
+
let {
|
|
74
|
+
color = "currentColor"
|
|
75
|
+
} = _ref5;
|
|
76
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
77
|
+
width: "24",
|
|
78
|
+
height: "24",
|
|
79
|
+
viewBox: "0 0 24 24",
|
|
80
|
+
fill: color
|
|
81
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
82
|
+
d: "M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z"
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const IconMoreHoriz = _ref6 => {
|
|
87
|
+
let {
|
|
88
|
+
color = "currentColor"
|
|
89
|
+
} = _ref6;
|
|
90
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
91
|
+
width: "24",
|
|
92
|
+
height: "24",
|
|
93
|
+
viewBox: "0 0 24 24",
|
|
94
|
+
fill: color
|
|
95
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
96
|
+
d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const IconSort = _ref7 => {
|
|
101
|
+
let {
|
|
102
|
+
color = "currentColor"
|
|
103
|
+
} = _ref7;
|
|
104
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
105
|
+
width: "24",
|
|
106
|
+
height: "24",
|
|
107
|
+
viewBox: "0 0 24 24",
|
|
108
|
+
fill: color
|
|
109
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
110
|
+
d: "M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const IconChevronRight = _ref8 => {
|
|
115
|
+
let {
|
|
116
|
+
color = "currentColor"
|
|
117
|
+
} = _ref8;
|
|
118
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
119
|
+
width: "24",
|
|
120
|
+
height: "24",
|
|
121
|
+
viewBox: "0 0 24 24",
|
|
122
|
+
fill: color
|
|
123
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
124
|
+
d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
125
|
+
}));
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const LibraryControls = _ref9 => {
|
|
18
129
|
var _activeBoard$ownerObj;
|
|
19
130
|
|
|
20
131
|
let {
|
|
@@ -26,8 +137,7 @@ const LibraryControls = _ref => {
|
|
|
26
137
|
setShowSearch,
|
|
27
138
|
setActiveBoard,
|
|
28
139
|
hideLayoutButtons
|
|
29
|
-
} =
|
|
30
|
-
useContext(ThemeContext);
|
|
140
|
+
} = _ref9;
|
|
31
141
|
const size = useWindowSize();
|
|
32
142
|
const [anchor, setAnchor] = useState(null);
|
|
33
143
|
const [filterAnchor, setFilterAnchor] = useState(null);
|
|
@@ -36,16 +146,19 @@ const LibraryControls = _ref => {
|
|
|
36
146
|
const [inputValue, setInputValue] = useState("");
|
|
37
147
|
const open = Boolean(anchor);
|
|
38
148
|
const openFilter = Boolean(filterAnchor);
|
|
39
|
-
let timeout = null;
|
|
149
|
+
let timeout = null; // Get theme color for icons (you may need to adjust based on your theme setup)
|
|
150
|
+
|
|
151
|
+
const iconColor = "#333"; // notBlack.main equivalent
|
|
152
|
+
|
|
153
|
+
const greyColor = "#888"; // grey6.main equivalent
|
|
154
|
+
|
|
40
155
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
41
156
|
direction: "row",
|
|
42
157
|
alignItems: "center",
|
|
43
158
|
justifyContent: "space-around",
|
|
44
159
|
marginTop: size.width <= 675 && "20px"
|
|
45
|
-
}, activeBoard && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
46
|
-
|
|
47
|
-
color: "notBlack.main"
|
|
48
|
-
}
|
|
160
|
+
}, activeBoard && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPerson, {
|
|
161
|
+
color: iconColor
|
|
49
162
|
}), /*#__PURE__*/React.createElement(Text, null, activeBoard === null || activeBoard === void 0 ? void 0 : (_activeBoard$ownerObj = activeBoard.ownerObject) === null || _activeBoard$ownerObj === void 0 ? void 0 : _activeBoard$ownerObj.username)), !hideSearch && /*#__PURE__*/React.createElement(Box, {
|
|
50
163
|
sx: {
|
|
51
164
|
display: "flex",
|
|
@@ -59,14 +172,12 @@ const LibraryControls = _ref => {
|
|
|
59
172
|
value: inputValue,
|
|
60
173
|
onChange: e => {
|
|
61
174
|
setInputValue(e.target.value);
|
|
62
|
-
clearTimeout(timeout);
|
|
63
|
-
|
|
175
|
+
clearTimeout(timeout);
|
|
64
176
|
timeout = setTimeout(() => {
|
|
65
177
|
setSearchTerm(e.target.value);
|
|
66
178
|
}, 1000);
|
|
67
179
|
},
|
|
68
180
|
onKeyDown: e => {
|
|
69
|
-
// e.preventDefault();
|
|
70
181
|
if (e.key === "Enter") {
|
|
71
182
|
setShowSearch(true);
|
|
72
183
|
}
|
|
@@ -85,20 +196,15 @@ const LibraryControls = _ref => {
|
|
|
85
196
|
color: "grey6.main",
|
|
86
197
|
borderColor: "grey6.main"
|
|
87
198
|
},
|
|
88
|
-
startAdornment: /*#__PURE__*/React.createElement(
|
|
89
|
-
position: "
|
|
90
|
-
}, /*#__PURE__*/React.createElement(
|
|
91
|
-
|
|
92
|
-
color: "grey6.main"
|
|
93
|
-
}
|
|
199
|
+
startAdornment: /*#__PURE__*/React.createElement(Stack, {
|
|
200
|
+
position: "center"
|
|
201
|
+
}, /*#__PURE__*/React.createElement(IconSearch, {
|
|
202
|
+
color: greyColor
|
|
94
203
|
})),
|
|
95
|
-
endAdornment: /*#__PURE__*/React.createElement(
|
|
204
|
+
endAdornment: /*#__PURE__*/React.createElement(Stack, {
|
|
96
205
|
position: "end"
|
|
97
|
-
}, inputValue && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
98
|
-
|
|
99
|
-
cursor: "pointer",
|
|
100
|
-
color: "grey6.main"
|
|
101
|
-
},
|
|
206
|
+
}, inputValue && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconClose, {
|
|
207
|
+
color: greyColor,
|
|
102
208
|
onClick: () => {
|
|
103
209
|
setSearchTerm("");
|
|
104
210
|
setInputValue("");
|
|
@@ -184,21 +290,17 @@ const LibraryControls = _ref => {
|
|
|
184
290
|
color: "notBlack",
|
|
185
291
|
ref: filterRef,
|
|
186
292
|
onClick: () => setFilterAnchor(filterRef.current)
|
|
187
|
-
}, /*#__PURE__*/React.createElement(Text, null, "Sort"), /*#__PURE__*/React.createElement(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
})), /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(
|
|
192
|
-
|
|
193
|
-
color: "notBlack.main"
|
|
194
|
-
}
|
|
293
|
+
}, /*#__PURE__*/React.createElement(Text, null, "Sort"), /*#__PURE__*/React.createElement(IconSort, {
|
|
294
|
+
color: iconColor
|
|
295
|
+
})), /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(IconMenu, {
|
|
296
|
+
color: iconColor
|
|
297
|
+
})), /*#__PURE__*/React.createElement(IconButton, null, /*#__PURE__*/React.createElement(IconGrid, {
|
|
298
|
+
color: iconColor
|
|
195
299
|
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
196
300
|
ref: divRef,
|
|
197
301
|
onClick: () => setAnchor(divRef.current)
|
|
198
|
-
}, /*#__PURE__*/React.createElement(
|
|
199
|
-
|
|
200
|
-
color: "notBlack.main"
|
|
201
|
-
}
|
|
302
|
+
}, /*#__PURE__*/React.createElement(IconMoreHoriz, {
|
|
303
|
+
color: iconColor
|
|
202
304
|
})), /*#__PURE__*/React.createElement(Popover, {
|
|
203
305
|
id: "library-controls-popover",
|
|
204
306
|
open: open,
|
|
@@ -238,10 +340,8 @@ const LibraryControls = _ref => {
|
|
|
238
340
|
backgroundColor: "grey2.main"
|
|
239
341
|
}
|
|
240
342
|
}
|
|
241
|
-
}, /*#__PURE__*/React.createElement(
|
|
242
|
-
|
|
243
|
-
color: "notBlack.main"
|
|
244
|
-
}
|
|
343
|
+
}, /*#__PURE__*/React.createElement(IconMenu, {
|
|
344
|
+
color: iconColor
|
|
245
345
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
246
346
|
color: "notBlack.main",
|
|
247
347
|
margin: "0 15px",
|
|
@@ -257,10 +357,8 @@ const LibraryControls = _ref => {
|
|
|
257
357
|
backgroundColor: "grey2.main"
|
|
258
358
|
}
|
|
259
359
|
}
|
|
260
|
-
}, /*#__PURE__*/React.createElement(
|
|
261
|
-
|
|
262
|
-
color: "notBlack.main"
|
|
263
|
-
}
|
|
360
|
+
}, /*#__PURE__*/React.createElement(IconGrid, {
|
|
361
|
+
color: iconColor
|
|
264
362
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
265
363
|
color: "notBlack.main",
|
|
266
364
|
margin: "0 15px",
|
|
@@ -283,19 +381,15 @@ const LibraryControls = _ref => {
|
|
|
283
381
|
}
|
|
284
382
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
285
383
|
direction: "row"
|
|
286
|
-
}, /*#__PURE__*/React.createElement(
|
|
287
|
-
|
|
288
|
-
color: "notBlack.main"
|
|
289
|
-
}
|
|
384
|
+
}, /*#__PURE__*/React.createElement(IconSort, {
|
|
385
|
+
color: iconColor
|
|
290
386
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
291
387
|
fontSize: "18px",
|
|
292
388
|
color: "notBlack.main",
|
|
293
389
|
margin: "0 15px"
|
|
294
|
-
}, "Sort")), /*#__PURE__*/React.createElement(
|
|
295
|
-
|
|
296
|
-
color: "notBlack.main"
|
|
297
|
-
}
|
|
390
|
+
}, "Sort")), /*#__PURE__*/React.createElement(IconChevronRight, {
|
|
391
|
+
color: iconColor
|
|
298
392
|
}))))));
|
|
299
393
|
};
|
|
300
394
|
|
|
301
|
-
export default
|
|
395
|
+
export { LibraryControls as default };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React
|
|
3
|
-
import { ThemeContext } from 'styled-components';
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import { Box, Stack, Button } from '../index.js';
|
|
5
4
|
import { useWindowSize } from '../ScreenSizeHook.js';
|
|
6
5
|
import LibraryControls from './LibraryControls.js';
|
|
7
6
|
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
+
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
10
|
+
|
|
8
11
|
const UserLibraryHeader = _ref => {
|
|
9
12
|
let {
|
|
10
13
|
sx,
|
|
@@ -21,15 +24,13 @@ const UserLibraryHeader = _ref => {
|
|
|
21
24
|
hideLayoutButtons
|
|
22
25
|
} = _ref;
|
|
23
26
|
const size = useWindowSize();
|
|
24
|
-
useContext(ThemeContext);
|
|
25
27
|
return /*#__PURE__*/React.createElement(Box, {
|
|
26
|
-
sx: {
|
|
28
|
+
sx: _objectSpread({
|
|
27
29
|
backgroundColor: "grey2.main",
|
|
28
30
|
position: "sticky",
|
|
29
31
|
top: size.width >= 1000 ? "80px" : "110px",
|
|
30
|
-
zIndex: "5"
|
|
31
|
-
|
|
32
|
-
}
|
|
32
|
+
zIndex: "5"
|
|
33
|
+
}, sx)
|
|
33
34
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
34
35
|
direction: "row",
|
|
35
36
|
style: {
|
|
@@ -61,7 +62,14 @@ const UserLibraryHeader = _ref => {
|
|
|
61
62
|
},
|
|
62
63
|
variant: tabSelection.includes(tab) ? "contained" : "outlined",
|
|
63
64
|
size: "small",
|
|
64
|
-
endIcon: tabSelection.includes(tab) && /*#__PURE__*/React.createElement(
|
|
65
|
+
endIcon: tabSelection.includes(tab) && /*#__PURE__*/React.createElement("svg", {
|
|
66
|
+
width: "18",
|
|
67
|
+
height: "18",
|
|
68
|
+
viewBox: "0 0 24 24",
|
|
69
|
+
fill: "currentColor"
|
|
70
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
71
|
+
d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
|
|
72
|
+
})),
|
|
65
73
|
sx: {
|
|
66
74
|
fontWeight: "normal",
|
|
67
75
|
marginRight: "10px",
|
|
@@ -84,4 +92,4 @@ const UserLibraryHeader = _ref => {
|
|
|
84
92
|
}))));
|
|
85
93
|
};
|
|
86
94
|
|
|
87
|
-
export default
|
|
95
|
+
export { UserLibraryHeader as default };
|
|
@@ -1,108 +1,127 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import ModeEditRoundedIcon from '@mui/icons-material/ModeEditRounded';
|
|
6
|
-
import PersonAddRoundedIcon from '@mui/icons-material/PersonAddRounded';
|
|
7
|
-
import PinterestIcon from '@mui/icons-material/Pinterest';
|
|
8
|
-
import TwitterIcon from '@mui/icons-material/Twitter';
|
|
9
|
-
import YouTubeIcon from '@mui/icons-material/YouTube';
|
|
10
|
-
import PersonRemoveRoundedIcon from '@mui/icons-material/PersonRemoveRounded';
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
+
import React, { useState, useEffect } from 'react';
|
|
11
5
|
import { Stack, IconButton, Box, Text, Divider, Button } from '../index.js';
|
|
12
6
|
import { useWindowSize } from '../ScreenSizeHook.js';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { extractDominantColor } from '../helpers.js';
|
|
8
|
+
import { useBlerpTheme } from '../Theme.js';
|
|
15
9
|
import { TwitchIcon } from '../Icons/Icons.js';
|
|
16
10
|
|
|
17
|
-
const
|
|
18
|
-
|
|
11
|
+
const _excluded = ["path", "sx", "size"];
|
|
12
|
+
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
16
|
+
|
|
17
|
+
const Icon = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
path,
|
|
20
|
+
sx,
|
|
21
|
+
size = "24px"
|
|
22
|
+
} = _ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
|
|
25
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
26
|
+
component: "svg",
|
|
27
|
+
viewBox: "0 0 24 24",
|
|
28
|
+
width: size,
|
|
29
|
+
height: size,
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
sx: _objectSpread({
|
|
32
|
+
display: 'inline-block',
|
|
33
|
+
flexShrink: 0
|
|
34
|
+
}, sx)
|
|
35
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
36
|
+
d: path
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const paths = {
|
|
41
|
+
add: "M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z",
|
|
42
|
+
edit: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",
|
|
43
|
+
personAdd: "M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",
|
|
44
|
+
personRemove: "M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",
|
|
45
|
+
// Simplified
|
|
46
|
+
facebook: "M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z",
|
|
47
|
+
twitter: "M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.48.75 2.78 1.89 3.54-.7 0-1.35-.2-1.92-.53v.05c0 2.03 1.44 3.73 3.35 4.12-.35.1-.73.15-1.12.15-.27 0-.54-.03-.8-.08.54 1.66 2.08 2.87 3.91 2.91-1.42 1.12-3.23 1.78-5.2 1.78-.34 0-.67-.02-1-.06C3.04 20.1 5.31 20.8 7.72 20.8c9.27 0 14.34-7.68 14.34-14.34 0-.22 0-.44-.01-.66.98-.7 1.84-1.59 2.51-2.6z",
|
|
48
|
+
instagram: "M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z",
|
|
49
|
+
youtube: "M10 15l5.19-3L10 9v6m11.56-7.83c.13.47.22 1.1.28 1.9.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83-.25.9-.83 1.48-1.73 1.73-.47.13-1.33.22-2.65.28-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44-.9-.25-1.48-.83-1.73-1.73-.13-.47-.22-1.1-.28-1.9-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83.25-.9.83-1.48 1.73-1.73.47-.13 1.33-.22 2.65-.28 1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44.9.25 1.48.83 1.73 1.73z",
|
|
50
|
+
pinterest: "M12.2 2C7.12 2 3 6.12 3 11.2c0 3.9 2.42 7.23 5.87 8.58-.08-.72-.15-1.83.03-2.62.16-.71 1.05-4.44 1.05-4.44s-.27-.54-.27-1.33c0-1.25.72-2.18 1.63-2.18.77 0 1.14.58 1.14 1.27 0 .77-.49 1.93-.74 3-.21.87.44 1.58 1.29 1.58 1.55 0 2.74-1.64 2.74-4 0-2.09-1.5-3.55-3.64-3.55-2.48 0-3.93 1.86-3.93 3.77 0 .75.29 1.55.65 1.99.07.09.08.17.06.25-.07.28-.22.88-.25.99-.04.16-.14.2-.32.11-1.19-.55-1.93-2.3-1.93-3.7 0-3.02 2.2-5.78 6.32-5.78 3.32 0 5.89 2.36 5.89 5.52 0 3.3-2.08 5.96-4.97 5.96-.97 0-1.88-.5-2.2-.1l-.59 2.27c-.22.82-.8 1.85-1.19 2.48 1.1.34 2.26.52 3.47.52 5.08 0 9.2-4.12 9.2-9.2C21.4 6.12 17.28 2 12.2 2z"
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const UserProfileHeader = _ref2 => {
|
|
54
|
+
var _userData$profileImag3, _userData$profileImag4, _userData$headerImage, _userData$headerImage2, _userData$headerImage3, _userData$headerImage4, _userData$profileImag5, _userData$profileImag6, _userData$socialLinks2;
|
|
19
55
|
|
|
20
56
|
let {
|
|
21
57
|
followUser,
|
|
22
58
|
isOwner,
|
|
23
59
|
userData,
|
|
24
60
|
openEdit
|
|
25
|
-
} =
|
|
26
|
-
const theme =
|
|
61
|
+
} = _ref2;
|
|
62
|
+
const theme = useBlerpTheme();
|
|
27
63
|
const [profileColors, setProfileColors] = useState(null);
|
|
28
64
|
const size = useWindowSize();
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
var _userData$profileImag, _userData$profileImag2;
|
|
67
|
+
|
|
68
|
+
if (userData !== null && userData !== void 0 && (_userData$profileImag = userData.profileImage) !== null && _userData$profileImag !== void 0 && (_userData$profileImag2 = _userData$profileImag.original) !== null && _userData$profileImag2 !== void 0 && _userData$profileImag2.url) {
|
|
69
|
+
extractDominantColor(userData.profileImage.original.url, setProfileColors);
|
|
70
|
+
}
|
|
71
|
+
}, [userData === null || userData === void 0 ? void 0 : (_userData$profileImag3 = userData.profileImage) === null || _userData$profileImag3 === void 0 ? void 0 : (_userData$profileImag4 = _userData$profileImag3.original) === null || _userData$profileImag4 === void 0 ? void 0 : _userData$profileImag4.url]);
|
|
29
72
|
|
|
30
73
|
const renderSocialLinks = () => {
|
|
31
74
|
var _userData$socialLinks;
|
|
32
75
|
|
|
33
76
|
return userData === null || userData === void 0 ? void 0 : (_userData$socialLinks = userData.socialLinks) === null || _userData$socialLinks === void 0 ? void 0 : _userData$socialLinks.map((socialItem, index) => {
|
|
34
77
|
let icon;
|
|
78
|
+
const commonSx = {
|
|
79
|
+
color: "notBlack.main",
|
|
80
|
+
cursor: "pointer",
|
|
81
|
+
":hover": {
|
|
82
|
+
color: "starling.main"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
35
85
|
|
|
36
86
|
switch (socialItem.name) {
|
|
37
87
|
case "twitch":
|
|
38
88
|
icon = /*#__PURE__*/React.createElement(TwitchIcon, {
|
|
39
|
-
sx:
|
|
40
|
-
color: "notBlack.main",
|
|
41
|
-
cursor: "pointer",
|
|
42
|
-
":hover": {
|
|
43
|
-
color: "starling.main"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
89
|
+
sx: commonSx
|
|
46
90
|
});
|
|
47
91
|
break;
|
|
48
92
|
|
|
49
93
|
case "twitter":
|
|
50
|
-
icon = /*#__PURE__*/React.createElement(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cursor: "pointer",
|
|
54
|
-
":hover": {
|
|
55
|
-
color: "starling.main"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
94
|
+
icon = /*#__PURE__*/React.createElement(Icon, {
|
|
95
|
+
path: paths.twitter,
|
|
96
|
+
sx: commonSx
|
|
58
97
|
});
|
|
59
98
|
break;
|
|
60
99
|
|
|
61
100
|
case "youtube":
|
|
62
|
-
icon = /*#__PURE__*/React.createElement(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
cursor: "pointer",
|
|
66
|
-
":hover": {
|
|
67
|
-
color: "starling.main"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
101
|
+
icon = /*#__PURE__*/React.createElement(Icon, {
|
|
102
|
+
path: paths.youtube,
|
|
103
|
+
sx: commonSx
|
|
70
104
|
});
|
|
71
105
|
break;
|
|
72
106
|
|
|
73
107
|
case "instagram":
|
|
74
|
-
icon = /*#__PURE__*/React.createElement(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
cursor: "pointer",
|
|
78
|
-
":hover": {
|
|
79
|
-
color: "starling.main"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
108
|
+
icon = /*#__PURE__*/React.createElement(Icon, {
|
|
109
|
+
path: paths.instagram,
|
|
110
|
+
sx: commonSx
|
|
82
111
|
});
|
|
83
112
|
break;
|
|
84
113
|
|
|
85
114
|
case "pinterest":
|
|
86
|
-
icon = /*#__PURE__*/React.createElement(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
cursor: "pointer",
|
|
90
|
-
":hover": {
|
|
91
|
-
color: "starling.main"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
115
|
+
icon = /*#__PURE__*/React.createElement(Icon, {
|
|
116
|
+
path: paths.pinterest,
|
|
117
|
+
sx: commonSx
|
|
94
118
|
});
|
|
95
119
|
break;
|
|
96
120
|
|
|
97
121
|
case "facebook":
|
|
98
|
-
icon = /*#__PURE__*/React.createElement(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
cursor: "pointer",
|
|
102
|
-
":hover": {
|
|
103
|
-
color: "starling.main"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
122
|
+
icon = /*#__PURE__*/React.createElement(Icon, {
|
|
123
|
+
path: paths.facebook,
|
|
124
|
+
sx: commonSx
|
|
106
125
|
});
|
|
107
126
|
break;
|
|
108
127
|
}
|
|
@@ -120,10 +139,7 @@ const UserProfileHeader = _ref => {
|
|
|
120
139
|
});
|
|
121
140
|
};
|
|
122
141
|
|
|
123
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
124
|
-
src: userData === null || userData === void 0 ? void 0 : (_userData$profileImag = userData.profileImage) === null || _userData$profileImag === void 0 ? void 0 : (_userData$profileImag2 = _userData$profileImag.original) === null || _userData$profileImag2 === void 0 ? void 0 : _userData$profileImag2.url,
|
|
125
|
-
getColors: colors => setProfileColors(colors)
|
|
126
|
-
}), /*#__PURE__*/React.createElement(Stack, {
|
|
142
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Stack, {
|
|
127
143
|
width: "100%",
|
|
128
144
|
sx: {
|
|
129
145
|
height: "250px",
|
|
@@ -149,8 +165,9 @@ const UserProfileHeader = _ref => {
|
|
|
149
165
|
}
|
|
150
166
|
},
|
|
151
167
|
onClick: () => openEdit()
|
|
152
|
-
}, /*#__PURE__*/React.createElement(
|
|
153
|
-
|
|
168
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
169
|
+
path: paths.edit,
|
|
170
|
+
size: "16px"
|
|
154
171
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
155
172
|
direction: "row",
|
|
156
173
|
width: "80%",
|
|
@@ -196,12 +213,15 @@ const UserProfileHeader = _ref => {
|
|
|
196
213
|
}
|
|
197
214
|
});
|
|
198
215
|
}
|
|
199
|
-
}, isOwner ? /*#__PURE__*/React.createElement(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
216
|
+
}, isOwner ? /*#__PURE__*/React.createElement(Icon, {
|
|
217
|
+
path: paths.edit,
|
|
218
|
+
size: "20px"
|
|
219
|
+
}) : userData !== null && userData !== void 0 && userData.loggedInIsFollower ? /*#__PURE__*/React.createElement(Icon, {
|
|
220
|
+
path: paths.personRemove,
|
|
221
|
+
size: "20px"
|
|
222
|
+
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
223
|
+
path: paths.personAdd,
|
|
224
|
+
size: "20px"
|
|
205
225
|
})), /*#__PURE__*/React.createElement("img", {
|
|
206
226
|
style: {
|
|
207
227
|
borderRadius: "50%",
|
|
@@ -211,7 +231,7 @@ const UserProfileHeader = _ref => {
|
|
|
211
231
|
margin: "0 20px"
|
|
212
232
|
},
|
|
213
233
|
alt: "profile img",
|
|
214
|
-
src: userData === null || userData === void 0 ? void 0 : (_userData$
|
|
234
|
+
src: userData === null || userData === void 0 ? void 0 : (_userData$profileImag5 = userData.profileImage) === null || _userData$profileImag5 === void 0 ? void 0 : (_userData$profileImag6 = _userData$profileImag5.original) === null || _userData$profileImag6 === void 0 ? void 0 : _userData$profileImag6.url
|
|
215
235
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
216
236
|
marginLeft: "20px"
|
|
217
237
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -260,9 +280,10 @@ const UserProfileHeader = _ref => {
|
|
|
260
280
|
}
|
|
261
281
|
},
|
|
262
282
|
onClick: () => openEdit()
|
|
263
|
-
}, /*#__PURE__*/React.createElement(
|
|
264
|
-
|
|
283
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
284
|
+
path: paths.add,
|
|
285
|
+
size: "16px"
|
|
265
286
|
})) : /*#__PURE__*/React.createElement(React.Fragment, null), renderSocialLinks()))));
|
|
266
287
|
};
|
|
267
288
|
|
|
268
|
-
export default
|
|
289
|
+
export { UserProfileHeader as default };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
3
|
import { Stack, Popover, Text } from './index.js';
|
|
3
4
|
import { UserCard } from './UserCard.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5
9
|
const UsernameWithPopout = _ref => {
|
|
6
10
|
let {
|
|
7
11
|
user,
|
|
@@ -64,7 +68,7 @@ const UsernameWithPopout = _ref => {
|
|
|
64
68
|
collapsed: collapsed,
|
|
65
69
|
user: user
|
|
66
70
|
})), /*#__PURE__*/React.createElement(Text, {
|
|
67
|
-
sx: {
|
|
71
|
+
sx: _objectSpread({
|
|
68
72
|
fontWeight: "300",
|
|
69
73
|
fontSize: "12px",
|
|
70
74
|
color: "grey7.main",
|
|
@@ -75,9 +79,8 @@ const UsernameWithPopout = _ref => {
|
|
|
75
79
|
cursor: "pointer",
|
|
76
80
|
"&:hover": {
|
|
77
81
|
textDecoration: "underline"
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
},
|
|
82
|
+
}
|
|
83
|
+
}, textStyle),
|
|
81
84
|
onClick: onUsernameClick
|
|
82
85
|
}, user === null || user === void 0 ? void 0 : user.username));
|
|
83
86
|
};
|