@blerp/design 1.3.17 → 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 +92 -58
- 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 +32 -2
- 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,48 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import 'prop-types';
|
|
7
|
-
import React, { useState, useContext } from 'react';
|
|
8
|
-
import { usePalette } from 'react-palette';
|
|
9
|
-
import styled, { ThemeContext } from 'styled-components';
|
|
10
|
-
import { Stack, Text, IconButton } from './index.js';
|
|
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 } from 'react';
|
|
5
|
+
import { Stack, Box, Text, IconButton } from './index.js';
|
|
11
6
|
import { useWindowSize } from './ScreenSizeHook.js';
|
|
7
|
+
import { useCustomPalette } from './helpers.js';
|
|
8
|
+
import { useBlerpTheme } from './Theme.js';
|
|
12
9
|
import { DiamondIcon } from './Icons/Icons.js';
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let {
|
|
22
|
-
sizeParams
|
|
23
|
-
} = _ref2;
|
|
24
|
-
return sizeParams.width;
|
|
25
|
-
}, _ref3 => {
|
|
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 => {
|
|
26
18
|
let {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const TopBox = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 3;\n border: 2px transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ", ";\n height: 100%;\n border-radius: 8px;\n border-right-width: 0px;\n border-left-width: 0px;\n transition: 0.2s;\n position: relative;\n overflow: hidden;\n"])), props => props.theme.colors.white);
|
|
33
|
-
const MidBox = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n z-index: 2;\n position: absolute;\n background-color: ", ";\n width: 95%;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n border-radius: 8px;\n border-right-width: 0px;\n border-left-width: 0px;\n transition: 0.2s;\n overflow: hidden;\n"])), props => props.theme.colors.grey5);
|
|
34
|
-
const BackBox = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: blue;\n background-color: ", ";\n position: absolute;\n width: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n border-radius: 8px;\n border-right-width: 0px;\n border-left-width: 0px;\n transition: 0.2s;\n overflow: hidden;\n"])), props => props.theme.colors.grey7);
|
|
35
|
-
const PhotoBackground = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: url(", ");\n background-size: cover;\n border-radius: 8px;\n overflow: hidden;\n background-position: center;\n"])), props => props.url);
|
|
36
|
-
const BlurBackground = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: 8px;\n backdrop-filter: blur(4px);\n"])));
|
|
37
|
-
const GradientBackground = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 100%;\n opacity: 0.7;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: 8px;\n width: 100%;\n height: 100%;\n"])));
|
|
38
|
-
const InteractionBox = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: calc(100% - 4px);\n height: 100%;\n border-radius: 8px;\n border-right-width: 0px;\n border-left-width: 0px;\n margin: 0 auto;\n transition: 0.2s;\n position: relative;\n"]))); // Box on the left of the Collection that is clicked to save/unsave
|
|
19
|
+
path,
|
|
20
|
+
sx,
|
|
21
|
+
size = "24px"
|
|
22
|
+
} = _ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
39
24
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
bookmark: "M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z",
|
|
42
|
+
bookmarkAdd: "M21 7V5h2V3h-2V1h-2v2h-2v2h2v2h2zm-4 7V5c0-1.1-.9-2-2-2H7c-1.1 0-2 .9-2 2v16l7-3 7 3v-7h-2z",
|
|
43
|
+
arrowRight: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",
|
|
44
|
+
lock: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"
|
|
45
|
+
};
|
|
46
|
+
const CollectionListViewPremium = _ref2 => {
|
|
47
|
+
var _collection$image, _collection$image$ori, _theme$colors, _theme$colors2, _theme$colors3, _collection$image2, _collection$image2$or;
|
|
46
48
|
|
|
47
49
|
let {
|
|
48
50
|
collection,
|
|
@@ -54,26 +56,19 @@ const CollectionListViewPremium = _ref4 => {
|
|
|
54
56
|
handleClickTitle,
|
|
55
57
|
isLinkTitle,
|
|
56
58
|
fluid
|
|
57
|
-
} =
|
|
58
|
-
useState(false);
|
|
59
|
-
|
|
59
|
+
} = _ref2;
|
|
60
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
60
61
|
const {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} = usePalette(collection === null || collection === void 0 ? void 0 : (_collection$image = collection.image) === null || _collection$image === void 0 ? void 0 : (_collection$image$ori = _collection$image.original) === null || _collection$image$ori === void 0 ? void 0 : _collection$image$ori.url);
|
|
65
|
-
const theme = useContext(ThemeContext);
|
|
62
|
+
data
|
|
63
|
+
} = useCustomPalette(collection === null || collection === void 0 ? void 0 : (_collection$image = collection.image) === null || _collection$image === void 0 ? void 0 : (_collection$image$ori = _collection$image.original) === null || _collection$image$ori === void 0 ? void 0 : _collection$image$ori.url);
|
|
64
|
+
const theme = useBlerpTheme();
|
|
66
65
|
const size = useWindowSize();
|
|
67
|
-
console.log("Collleeeeection", collection);
|
|
68
66
|
let sizeParams;
|
|
69
67
|
const smallSize = {
|
|
70
68
|
width: "300px",
|
|
71
69
|
height: 40,
|
|
72
70
|
fontSize: "16px",
|
|
73
71
|
saveBoxSize: "36px",
|
|
74
|
-
reactionSpacing: 1,
|
|
75
|
-
reactionPadding: "3px",
|
|
76
|
-
reactionSize: "20px",
|
|
77
72
|
buttonSize: "small"
|
|
78
73
|
};
|
|
79
74
|
const mediumSize = {
|
|
@@ -81,9 +76,6 @@ const CollectionListViewPremium = _ref4 => {
|
|
|
81
76
|
height: 48,
|
|
82
77
|
fontSize: "18px",
|
|
83
78
|
saveBoxSize: "44px",
|
|
84
|
-
reactionSpacing: 1,
|
|
85
|
-
reactionPadding: "3px",
|
|
86
|
-
reactionSize: "23px",
|
|
87
79
|
buttonSize: "medium"
|
|
88
80
|
};
|
|
89
81
|
const largeSize = {
|
|
@@ -91,264 +83,345 @@ const CollectionListViewPremium = _ref4 => {
|
|
|
91
83
|
height: 56,
|
|
92
84
|
fontSize: "20px",
|
|
93
85
|
saveBoxSize: "52px",
|
|
94
|
-
reactionSpacing: 1,
|
|
95
|
-
reactionPadding: "5px",
|
|
96
|
-
reactionSize: "30px",
|
|
97
86
|
buttonFontSize: "large"
|
|
98
87
|
};
|
|
99
88
|
|
|
100
89
|
if (!variantSize) {
|
|
101
90
|
if (fluid) {
|
|
102
|
-
sizeParams = {
|
|
103
|
-
width: "100%"
|
|
104
|
-
|
|
105
|
-
fontSize: "18px",
|
|
106
|
-
saveBoxSize: "44px",
|
|
107
|
-
reactionSpacing: 1,
|
|
108
|
-
reactionPadding: "3px",
|
|
109
|
-
reactionSize: "23px",
|
|
110
|
-
buttonSize: "medium"
|
|
111
|
-
};
|
|
91
|
+
sizeParams = _objectSpread(_objectSpread({}, mediumSize), {}, {
|
|
92
|
+
width: "100%"
|
|
93
|
+
});
|
|
112
94
|
} else if (size.width <= 400) {
|
|
113
95
|
sizeParams = smallSize;
|
|
114
96
|
} else if (size.width <= 900) {
|
|
115
97
|
sizeParams = mediumSize;
|
|
116
|
-
} else
|
|
98
|
+
} else {
|
|
117
99
|
sizeParams = largeSize;
|
|
118
100
|
}
|
|
119
101
|
} else {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} else if (variantSize === "medium") {
|
|
123
|
-
console.log(variantSize);
|
|
124
|
-
sizeParams = mediumSize;
|
|
125
|
-
} else if (variantSize === "large") {
|
|
126
|
-
sizeParams = largeSize;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
102
|
+
sizeParams = variantSize === "small" ? smallSize : variantSize === "large" ? largeSize : mediumSize;
|
|
103
|
+
} // Styles
|
|
129
104
|
|
|
130
|
-
return (
|
|
131
|
-
/*#__PURE__*/
|
|
132
|
-
// This is the master container. All children's size should be in relation to this box. This box's should not be dependent on its children, but should be dependent on either screen size or the variantSize prop ONLY.
|
|
133
105
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
106
|
+
const masterContainerStyle = {
|
|
107
|
+
display: "flex",
|
|
108
|
+
height: sizeParams.height + 2 + "px",
|
|
109
|
+
width: sizeParams.width,
|
|
110
|
+
minWidth: fluid ? "300px" : "0",
|
|
111
|
+
borderRadius: "8px",
|
|
112
|
+
boxShadow: "2px 2px 4px 0px #999999a1",
|
|
113
|
+
position: "relative"
|
|
114
|
+
};
|
|
115
|
+
const yellowHoverBorderStyle = {
|
|
116
|
+
position: "absolute",
|
|
117
|
+
height: "113%",
|
|
118
|
+
width: "102%",
|
|
119
|
+
top: "50%",
|
|
120
|
+
left: "50%",
|
|
121
|
+
transform: "translate(-50%, -50%)",
|
|
122
|
+
border: "3px solid rgb(255, 225, 76)",
|
|
123
|
+
borderRadius: "14px",
|
|
124
|
+
transition: "opacity 0.2s ease-in-out",
|
|
125
|
+
opacity: isHovered ? 1 : 0,
|
|
126
|
+
pointerEvents: "none"
|
|
127
|
+
};
|
|
128
|
+
const topBoxStyle = {
|
|
129
|
+
zIndex: 3,
|
|
130
|
+
display: "flex",
|
|
131
|
+
justifyContent: "center",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.white) || "#ffffff",
|
|
134
|
+
height: "100%",
|
|
135
|
+
borderRadius: "8px",
|
|
136
|
+
transition: "0.2s",
|
|
137
|
+
position: "relative",
|
|
138
|
+
overflow: "hidden",
|
|
139
|
+
width: !(collection !== null && collection !== void 0 && collection.owned) ? "100%" : "90%",
|
|
140
|
+
cursor: "pointer"
|
|
141
|
+
};
|
|
142
|
+
const midBoxStyle = {
|
|
143
|
+
zIndex: 2,
|
|
144
|
+
position: "absolute",
|
|
145
|
+
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.grey5) || "#e0e0e0",
|
|
146
|
+
width: isHovered ? "96%" : "95%",
|
|
147
|
+
top: 0,
|
|
148
|
+
bottom: 0,
|
|
149
|
+
left: 0,
|
|
150
|
+
right: 0,
|
|
151
|
+
borderRadius: "8px",
|
|
152
|
+
transition: "0.2s"
|
|
153
|
+
};
|
|
154
|
+
const backBoxStyle = {
|
|
155
|
+
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.grey7) || "#616161",
|
|
156
|
+
position: "absolute",
|
|
157
|
+
width: isHovered ? collection !== null && collection !== void 0 && collection.owned ? "102%" : "100%" : "100%",
|
|
158
|
+
top: 0,
|
|
159
|
+
bottom: 0,
|
|
160
|
+
left: 0,
|
|
161
|
+
right: 0,
|
|
162
|
+
borderRadius: "8px",
|
|
163
|
+
transition: "0.2s"
|
|
164
|
+
};
|
|
165
|
+
const photoBackgroundStyle = {
|
|
166
|
+
position: "absolute",
|
|
167
|
+
width: "100%",
|
|
168
|
+
height: "100%",
|
|
169
|
+
backgroundImage: "url(".concat(collection === null || collection === void 0 ? void 0 : (_collection$image2 = collection.image) === null || _collection$image2 === void 0 ? void 0 : (_collection$image2$or = _collection$image2.original) === null || _collection$image2$or === void 0 ? void 0 : _collection$image2$or.url, ")"),
|
|
170
|
+
backgroundSize: "cover",
|
|
171
|
+
borderRadius: "8px",
|
|
172
|
+
backgroundPosition: "center"
|
|
173
|
+
};
|
|
174
|
+
const blurBackgroundStyle = {
|
|
175
|
+
position: "absolute",
|
|
176
|
+
width: "100%",
|
|
177
|
+
height: "100%",
|
|
178
|
+
borderRadius: "8px",
|
|
179
|
+
backdropFilter: "blur(4px)"
|
|
180
|
+
};
|
|
181
|
+
const gradientBackgroundStyle = {
|
|
182
|
+
width: "100%",
|
|
183
|
+
height: "100%",
|
|
184
|
+
opacity: 0.7,
|
|
185
|
+
position: "absolute",
|
|
186
|
+
borderRadius: "8px",
|
|
187
|
+
background: "linear-gradient(135deg,".concat(data.vibrant || "rgb(204,204,204)", ", #444444)")
|
|
188
|
+
};
|
|
189
|
+
const interactionBoxStyle = {
|
|
190
|
+
display: "flex",
|
|
191
|
+
justifyContent: "space-between",
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
width: "calc(100% - 4px)",
|
|
194
|
+
height: "100%",
|
|
195
|
+
borderRadius: "8px",
|
|
196
|
+
position: "relative"
|
|
197
|
+
};
|
|
198
|
+
const saveBoxTopStyle = {
|
|
199
|
+
zIndex: 5,
|
|
200
|
+
width: sizeParams.saveBoxSize,
|
|
201
|
+
height: sizeParams.saveBoxSize,
|
|
202
|
+
position: "relative",
|
|
203
|
+
display: "flex",
|
|
204
|
+
justifyContent: "center",
|
|
205
|
+
alignItems: "center",
|
|
206
|
+
borderRadius: "4px",
|
|
207
|
+
transition: "0.4s",
|
|
208
|
+
background: data.darkVibrant || "#999999"
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const getSaveBoxShadowSquareStyle = depth => ({
|
|
212
|
+
position: "absolute",
|
|
213
|
+
height: depth === "1" ? "94%" : "83%",
|
|
214
|
+
width: depth === "1" ? "100%" : "97%",
|
|
215
|
+
borderRadius: "4px",
|
|
216
|
+
transform: depth === "1" ? "skewX(-5deg)" : "skewX(-12deg)",
|
|
217
|
+
left: depth === "1" ? "2px" : "5px",
|
|
218
|
+
bottom: 0,
|
|
219
|
+
background: depth === "1" ? "linear-gradient(".concat(data.darkVibrant || "rgba(230,230,230,1)", ", rgba(0,0,0,0))") : "linear-gradient(".concat(data.darkVibrant || "rgba(180,180,180,1)", ", rgba(0,0,0,1))")
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const secondButtonStyle = {
|
|
223
|
+
opacity: isHovered ? 1 : 0,
|
|
224
|
+
marginLeft: isHovered ? "5px" : "0px",
|
|
225
|
+
marginRight: isHovered ? "10px" : "15px",
|
|
226
|
+
padding: "5px",
|
|
227
|
+
transition: "opacity .4s ease-in-out, margin-left .4s ease-in-out, margin-right .4s ease-in-out"
|
|
228
|
+
};
|
|
229
|
+
const bookmarkIconStyle = {
|
|
230
|
+
width: "30px",
|
|
231
|
+
height: "30px",
|
|
232
|
+
color: "white.override",
|
|
233
|
+
position: "relative",
|
|
234
|
+
bottom: "1px"
|
|
235
|
+
};
|
|
236
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
237
|
+
style: masterContainerStyle,
|
|
238
|
+
onMouseEnter: () => setIsHovered(true),
|
|
239
|
+
onMouseLeave: () => setIsHovered(false)
|
|
240
|
+
}, !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement("div", {
|
|
241
|
+
style: yellowHoverBorderStyle
|
|
242
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
243
|
+
onClick: e => {
|
|
244
|
+
e.stopPropagation();
|
|
245
|
+
if (handleClickBackground) handleClickBackground();
|
|
246
|
+
},
|
|
247
|
+
style: topBoxStyle
|
|
248
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
249
|
+
style: photoBackgroundStyle
|
|
250
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
251
|
+
style: blurBackgroundStyle
|
|
252
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
253
|
+
style: gradientBackgroundStyle
|
|
254
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
255
|
+
style: interactionBoxStyle
|
|
256
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
257
|
+
direction: "row",
|
|
258
|
+
justifyContent: "flex-start",
|
|
259
|
+
alignItems: "center",
|
|
260
|
+
sx: {
|
|
261
|
+
position: "relative",
|
|
262
|
+
width: "calc(100% - 180px)",
|
|
263
|
+
left: "2px"
|
|
264
|
+
}
|
|
265
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
266
|
+
sx: {
|
|
267
|
+
position: "relative",
|
|
268
|
+
borderRadius: "4px",
|
|
269
|
+
cursor: "pointer",
|
|
270
|
+
width: sizeParams.saveBoxSize,
|
|
271
|
+
height: sizeParams.saveBoxSize
|
|
272
|
+
},
|
|
273
|
+
onClick: e => {
|
|
274
|
+
e.stopPropagation(); // Handle save logic
|
|
275
|
+
}
|
|
276
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
277
|
+
style: saveBoxTopStyle
|
|
278
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
279
|
+
sx: {
|
|
280
|
+
position: "absolute",
|
|
281
|
+
top: 0,
|
|
282
|
+
bottom: 0,
|
|
283
|
+
left: 0,
|
|
284
|
+
right: 0,
|
|
285
|
+
borderRadius: "4px",
|
|
286
|
+
background: "linear-gradient(rgba(0,0,0,0), #000000)"
|
|
287
|
+
}
|
|
288
|
+
}), collection !== null && collection !== void 0 && collection.saved ? /*#__PURE__*/React.createElement(Icon, {
|
|
289
|
+
path: paths.bookmark,
|
|
290
|
+
sx: bookmarkIconStyle,
|
|
291
|
+
size: "30px"
|
|
292
|
+
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
293
|
+
path: paths.bookmarkAdd,
|
|
294
|
+
sx: bookmarkIconStyle,
|
|
295
|
+
size: "30px"
|
|
296
|
+
})), !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement("div", {
|
|
297
|
+
style: getSaveBoxShadowSquareStyle("2")
|
|
298
|
+
}), !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement("div", {
|
|
299
|
+
style: getSaveBoxShadowSquareStyle("1")
|
|
300
|
+
})), isLinkTitle ? /*#__PURE__*/React.createElement("a", {
|
|
301
|
+
href: "/sound-collection/".concat(collection._id),
|
|
302
|
+
style: {
|
|
303
|
+
textDecoration: "none",
|
|
304
|
+
width: "calc(95% - ".concat(sizeParams.saveBoxSize, ")"),
|
|
305
|
+
position: "relative",
|
|
306
|
+
left: "12px"
|
|
307
|
+
}
|
|
308
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
309
|
+
textAlign: "left",
|
|
310
|
+
fontSize: sizeParams.fontSize,
|
|
311
|
+
noWrap: true,
|
|
312
|
+
color: collection !== null && collection !== void 0 && collection.image ? "white.override" : "notBlack",
|
|
313
|
+
sx: {
|
|
314
|
+
":hover": {
|
|
315
|
+
textDecoration: handleClickTitle ? "underline" : "none"
|
|
263
316
|
},
|
|
264
|
-
|
|
265
|
-
|
|
317
|
+
"@media (max-width: 600px)": {
|
|
318
|
+
maxWidth: "133px"
|
|
266
319
|
}
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
height: "70%"
|
|
273
|
-
}
|
|
274
|
-
}, primaryActionButton ? primaryActionButton : /*#__PURE__*/React.createElement(Stack, {
|
|
275
|
-
direction: "row",
|
|
276
|
-
justifyContent: "space-around",
|
|
277
|
-
alignItems: "center",
|
|
278
|
-
sx: {
|
|
279
|
-
height: "100%",
|
|
280
|
-
width: "102px",
|
|
281
|
-
position: "relative"
|
|
282
|
-
}
|
|
283
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
284
|
-
sx: {
|
|
285
|
-
borderRadius: "20px",
|
|
286
|
-
position: "absolute",
|
|
287
|
-
top: "0",
|
|
288
|
-
bottom: "0",
|
|
289
|
-
left: "0",
|
|
290
|
-
right: "0",
|
|
291
|
-
backgroundColor: "notBlack.main",
|
|
292
|
-
opacity: ".5"
|
|
293
|
-
}
|
|
294
|
-
}), /*#__PURE__*/React.createElement(DiamondIcon, {
|
|
295
|
-
sx: {
|
|
296
|
-
opacity: "1",
|
|
297
|
-
zIndex: "2",
|
|
298
|
-
color: "white.override",
|
|
299
|
-
height: "18px"
|
|
300
|
-
}
|
|
301
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
302
|
-
sx: {
|
|
303
|
-
zIndex: "2",
|
|
304
|
-
color: "white.override",
|
|
305
|
-
fontWeight: "lighter",
|
|
306
|
-
fontSize: "14px",
|
|
307
|
-
cursor: "default",
|
|
308
|
-
position: "relative",
|
|
309
|
-
right: !(collection !== null && collection !== void 0 && collection.owned) ? "-2px" : "6px"
|
|
310
|
-
}
|
|
311
|
-
}, "Premium"), !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement(LockRoundedIcon, {
|
|
312
|
-
sx: {
|
|
313
|
-
zIndex: "2",
|
|
314
|
-
color: "white.override",
|
|
315
|
-
height: "14px"
|
|
320
|
+
},
|
|
321
|
+
onClick: e => {
|
|
322
|
+
if (handleClickTitle) {
|
|
323
|
+
e.stopPropagation();
|
|
324
|
+
handleClickTitle();
|
|
316
325
|
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
326
|
+
}
|
|
327
|
+
}, collection.title)) : /*#__PURE__*/React.createElement(Text, {
|
|
328
|
+
textAlign: "left",
|
|
329
|
+
fontSize: sizeParams.fontSize,
|
|
330
|
+
noWrap: true,
|
|
331
|
+
color: collection !== null && collection !== void 0 && collection.image ? "white.override" : "notBlack",
|
|
332
|
+
sx: {
|
|
333
|
+
position: "relative",
|
|
334
|
+
left: "12px",
|
|
335
|
+
":hover": {
|
|
336
|
+
textDecoration: "none"
|
|
321
337
|
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
transition: "opacity .4s ease-in-out, margin-left .4s ease-in-out, margin-right .4s ease-in-out",
|
|
325
|
-
"&:hover": {
|
|
326
|
-
backgroundColor: "grey6.main"
|
|
327
|
-
}
|
|
338
|
+
"@media (max-width: 600px)": {
|
|
339
|
+
maxWidth: "133px"
|
|
328
340
|
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
}
|
|
342
|
+
}, collection.title)), /*#__PURE__*/React.createElement(Stack, {
|
|
343
|
+
direction: "row",
|
|
344
|
+
justifyContent: "flex-end",
|
|
345
|
+
alignItems: "center",
|
|
346
|
+
sx: {
|
|
347
|
+
height: "70%"
|
|
348
|
+
}
|
|
349
|
+
}, primaryActionButton ? primaryActionButton : /*#__PURE__*/React.createElement(Stack, {
|
|
350
|
+
direction: "row",
|
|
351
|
+
justifyContent: "space-around",
|
|
352
|
+
alignItems: "center",
|
|
353
|
+
sx: {
|
|
354
|
+
height: "100%",
|
|
355
|
+
width: "102px",
|
|
356
|
+
position: "relative"
|
|
357
|
+
}
|
|
358
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
359
|
+
sx: {
|
|
360
|
+
borderRadius: "20px",
|
|
361
|
+
position: "absolute",
|
|
362
|
+
top: 0,
|
|
363
|
+
bottom: 0,
|
|
364
|
+
left: 0,
|
|
365
|
+
right: 0,
|
|
366
|
+
backgroundColor: "notBlack.main",
|
|
367
|
+
opacity: ".5"
|
|
368
|
+
}
|
|
369
|
+
}), /*#__PURE__*/React.createElement(DiamondIcon, {
|
|
370
|
+
sx: {
|
|
371
|
+
opacity: "1",
|
|
372
|
+
zIndex: "2",
|
|
373
|
+
color: "white.override",
|
|
374
|
+
height: "18px"
|
|
375
|
+
}
|
|
376
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
377
|
+
sx: {
|
|
378
|
+
zIndex: "2",
|
|
379
|
+
color: "white.override",
|
|
380
|
+
fontWeight: "lighter",
|
|
381
|
+
fontSize: "14px",
|
|
382
|
+
cursor: "default",
|
|
383
|
+
position: "relative",
|
|
384
|
+
right: !(collection !== null && collection !== void 0 && collection.owned) ? "-2px" : "6px"
|
|
385
|
+
}
|
|
386
|
+
}, "Premium"), !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement(Icon, {
|
|
387
|
+
path: paths.lock,
|
|
388
|
+
size: "14px",
|
|
389
|
+
sx: {
|
|
390
|
+
zIndex: "2",
|
|
391
|
+
color: "white.override"
|
|
392
|
+
}
|
|
393
|
+
})), secondaryActionButton || /*#__PURE__*/React.createElement(IconButton, {
|
|
394
|
+
onClick: e => {
|
|
395
|
+
e.stopPropagation();
|
|
396
|
+
},
|
|
397
|
+
sx: _objectSpread(_objectSpread({}, secondButtonStyle), {}, {
|
|
398
|
+
"&:hover": {
|
|
399
|
+
backgroundColor: "grey6.main"
|
|
344
400
|
}
|
|
345
|
-
})
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
401
|
+
})
|
|
402
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
403
|
+
sx: {
|
|
404
|
+
borderRadius: "20px",
|
|
405
|
+
position: "absolute",
|
|
406
|
+
top: 0,
|
|
407
|
+
bottom: 0,
|
|
408
|
+
left: 0,
|
|
409
|
+
right: 0,
|
|
410
|
+
backgroundColor: "notBlack.main",
|
|
411
|
+
opacity: ".5"
|
|
412
|
+
}
|
|
413
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
414
|
+
path: paths.arrowRight,
|
|
415
|
+
size: "24px",
|
|
416
|
+
sx: {
|
|
417
|
+
zIndex: "2",
|
|
418
|
+
color: "white.override"
|
|
419
|
+
}
|
|
420
|
+
}))))), (collection === null || collection === void 0 ? void 0 : collection.owned) && /*#__PURE__*/React.createElement("div", {
|
|
421
|
+
style: midBoxStyle
|
|
422
|
+
}), (collection === null || collection === void 0 ? void 0 : collection.owned) && /*#__PURE__*/React.createElement("div", {
|
|
423
|
+
style: backBoxStyle
|
|
424
|
+
}), extraInfoComponent && extraInfoComponent);
|
|
351
425
|
};
|
|
352
426
|
|
|
353
|
-
export default
|
|
354
|
-
export { CollectionListViewPremium };
|
|
427
|
+
export { CollectionListViewPremium, CollectionListViewPremium as default };
|