@blerp/design 1.2.19 → 1.2.21
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/index.cjs.js +60 -17
- package/dist/index.esm.js +59 -17
- package/dist/index.umd.js +60 -17
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ var BookmarkOutlinedIcon = require('@mui/icons-material/BookmarkOutlined');
|
|
|
14
14
|
var LockRoundedIcon = require('@mui/icons-material/LockRounded');
|
|
15
15
|
var AddRoundedIcon = require('@mui/icons-material/AddRounded');
|
|
16
16
|
var ArrowDropDownRoundedIcon = require('@mui/icons-material/ArrowDropDownRounded');
|
|
17
|
-
require('@mui/icons-material/DoNotDisturbRounded');
|
|
17
|
+
var DoNotDisturbRoundedIcon = require('@mui/icons-material/DoNotDisturbRounded');
|
|
18
18
|
var FavoriteIcon = require('@mui/icons-material/Favorite');
|
|
19
19
|
var FavoriteBorderIcon = require('@mui/icons-material/FavoriteBorder');
|
|
20
20
|
var PauseRoundedIcon = require('@mui/icons-material/PauseRounded');
|
|
@@ -91,6 +91,7 @@ var BookmarkOutlinedIcon__default = /*#__PURE__*/_interopDefaultLegacy(BookmarkO
|
|
|
91
91
|
var LockRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(LockRoundedIcon);
|
|
92
92
|
var AddRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(AddRoundedIcon);
|
|
93
93
|
var ArrowDropDownRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDropDownRoundedIcon);
|
|
94
|
+
var DoNotDisturbRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(DoNotDisturbRoundedIcon);
|
|
94
95
|
var FavoriteIcon__default = /*#__PURE__*/_interopDefaultLegacy(FavoriteIcon);
|
|
95
96
|
var FavoriteBorderIcon__default = /*#__PURE__*/_interopDefaultLegacy(FavoriteBorderIcon);
|
|
96
97
|
var PauseRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(PauseRoundedIcon);
|
|
@@ -1612,7 +1613,9 @@ var UserCard$1 = function UserCard(_ref) {
|
|
|
1612
1613
|
position: "absolute",
|
|
1613
1614
|
bottom: collapsed ? "0" : "5px",
|
|
1614
1615
|
right: collapsed ? "0" : "5px",
|
|
1615
|
-
fontSize: "17px"
|
|
1616
|
+
fontSize: "17px",
|
|
1617
|
+
backgroundColor: "grey4.main",
|
|
1618
|
+
borderRadius: "50%"
|
|
1616
1619
|
}
|
|
1617
1620
|
})), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1618
1621
|
sx: {
|
|
@@ -1934,9 +1937,10 @@ var AddContentButton = function AddContentButton(_ref2) {
|
|
|
1934
1937
|
var added = false;
|
|
1935
1938
|
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1936
1939
|
direction: "row",
|
|
1937
|
-
width: "100%",
|
|
1940
|
+
width: hoveringAddTo ? "100%" : "60%",
|
|
1938
1941
|
sx: {
|
|
1939
|
-
|
|
1942
|
+
justifyContent: "end",
|
|
1943
|
+
transition: "0.5s",
|
|
1940
1944
|
boxSizing: "border-box",
|
|
1941
1945
|
opacity: hovering ? "1" : "0"
|
|
1942
1946
|
},
|
|
@@ -2213,6 +2217,7 @@ var RatingInfo = function RatingInfo(_ref5) {
|
|
|
2213
2217
|
|
|
2214
2218
|
var ReportedWarning = function ReportedWarning(_ref6) {
|
|
2215
2219
|
var showWarning = _ref6.showWarning,
|
|
2220
|
+
blacklisted = _ref6.blacklisted,
|
|
2216
2221
|
saved = _ref6.saved,
|
|
2217
2222
|
count = _ref6.count,
|
|
2218
2223
|
onClick = _ref6.onClick;
|
|
@@ -2228,6 +2233,28 @@ var ReportedWarning = function ReportedWarning(_ref6) {
|
|
|
2228
2233
|
setHovering = _useState6[1];
|
|
2229
2234
|
|
|
2230
2235
|
var renderInfo = function renderInfo() {
|
|
2236
|
+
if (blacklisted) {
|
|
2237
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(DoNotDisturbRoundedIcon__default['default'], {
|
|
2238
|
+
sx: {
|
|
2239
|
+
marginBottom: "20px"
|
|
2240
|
+
}
|
|
2241
|
+
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2242
|
+
sx: {
|
|
2243
|
+
fontSize: "18px",
|
|
2244
|
+
fontWeight: "600",
|
|
2245
|
+
color: "white.override"
|
|
2246
|
+
}
|
|
2247
|
+
}, "Blocked"), hovering && /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
2248
|
+
color: "whiteOverride",
|
|
2249
|
+
variant: "outlined",
|
|
2250
|
+
sx: {
|
|
2251
|
+
marginTop: "20px"
|
|
2252
|
+
},
|
|
2253
|
+
onClick: function onClick() {
|
|
2254
|
+
setShow(false);
|
|
2255
|
+
}
|
|
2256
|
+
}, "View"));
|
|
2257
|
+
}
|
|
2231
2258
|
|
|
2232
2259
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(WarningRoundedIcon__default['default'], {
|
|
2233
2260
|
sx: {
|
|
@@ -2340,13 +2367,30 @@ var BlerpTopRow = function BlerpTopRow(_ref7) {
|
|
|
2340
2367
|
};
|
|
2341
2368
|
|
|
2342
2369
|
var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
2343
|
-
var _bite$image, _bite$image$original;
|
|
2370
|
+
var _bite$blacklistContex, _bite$reportedContent, _bite$blacklistContex2, _bite$image, _bite$image$original;
|
|
2344
2371
|
|
|
2345
2372
|
var Waveform = _ref8.Waveform,
|
|
2346
2373
|
bite = _ref8.bite,
|
|
2347
2374
|
playState = _ref8.playState,
|
|
2348
2375
|
play = _ref8.play,
|
|
2349
|
-
onTitleClick = _ref8.onTitleClick
|
|
2376
|
+
_ref8$onTitleClick = _ref8.onTitleClick,
|
|
2377
|
+
onTitleClick = _ref8$onTitleClick === void 0 ? function () {
|
|
2378
|
+
console.log("onTitleClick");
|
|
2379
|
+
} : _ref8$onTitleClick,
|
|
2380
|
+
_ref8$onUsernameClick = _ref8.onUsernameClick,
|
|
2381
|
+
onUsernameClick = _ref8$onUsernameClick === void 0 ? function () {
|
|
2382
|
+
console.log("onUsernameClick");
|
|
2383
|
+
} : _ref8$onUsernameClick,
|
|
2384
|
+
_ref8$onFavoriteClick = _ref8.onFavoriteClick,
|
|
2385
|
+
onFavoriteClick = _ref8$onFavoriteClick === void 0 ? function () {
|
|
2386
|
+
console.log("onFavoriteClick");
|
|
2387
|
+
} : _ref8$onFavoriteClick,
|
|
2388
|
+
_ref8$onAddToPlace = _ref8.onAddToPlace,
|
|
2389
|
+
onAddToPlace = _ref8$onAddToPlace === void 0 ? function () {
|
|
2390
|
+
console.log("onAddToPlace");
|
|
2391
|
+
} : _ref8$onAddToPlace,
|
|
2392
|
+
_ref8$trending = _ref8.trending,
|
|
2393
|
+
trending = _ref8$trending === void 0 ? false : _ref8$trending;
|
|
2350
2394
|
|
|
2351
2395
|
var _useState9 = React.useState(false),
|
|
2352
2396
|
_useState10 = _slicedToArray__default['default'](_useState9, 2),
|
|
@@ -2358,11 +2402,6 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2358
2402
|
addedToPlace = _useState12[0],
|
|
2359
2403
|
setAddedToPlace = _useState12[1];
|
|
2360
2404
|
|
|
2361
|
-
var formatter = Intl.NumberFormat("en", {
|
|
2362
|
-
notation: "compact"
|
|
2363
|
-
});
|
|
2364
|
-
var saveCount = formatter.format(bite === null || bite === void 0 ? void 0 : bite.totalSaveCount);
|
|
2365
|
-
|
|
2366
2405
|
var renderPlayStateIcon = function renderPlayStateIcon() {
|
|
2367
2406
|
if (playState === "played") {
|
|
2368
2407
|
return /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
@@ -2429,9 +2468,10 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2429
2468
|
});
|
|
2430
2469
|
};
|
|
2431
2470
|
|
|
2432
|
-
var handleAddToPlace = function handleAddToPlace(
|
|
2471
|
+
var handleAddToPlace = function handleAddToPlace(e) {
|
|
2433
2472
|
setAddedToPlace(true);
|
|
2434
|
-
console.log(place);
|
|
2473
|
+
onAddToPlace(); // console.log(e, place);
|
|
2474
|
+
|
|
2435
2475
|
setTimeout(function () {
|
|
2436
2476
|
setAddedToPlace(false);
|
|
2437
2477
|
}, 2000);
|
|
@@ -2446,9 +2486,10 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2446
2486
|
background: addedToPlace ? "white" : (bite === null || bite === void 0 ? void 0 : bite.isPremium) && "linear-gradient(315deg, #a839ff 0%, #53c3db 100%)"
|
|
2447
2487
|
}
|
|
2448
2488
|
}, /*#__PURE__*/React__default['default'].createElement(ReportedWarning, {
|
|
2449
|
-
showWarning:
|
|
2489
|
+
showWarning: (bite === null || bite === void 0 ? void 0 : (_bite$blacklistContex = bite.blacklistContext) === null || _bite$blacklistContex === void 0 ? void 0 : _bite$blacklistContex._id) || (bite === null || bite === void 0 ? void 0 : (_bite$reportedContent = bite.reportedContentIds) === null || _bite$reportedContent === void 0 ? void 0 : _bite$reportedContent.length) > 3,
|
|
2490
|
+
blacklisted: bite === null || bite === void 0 ? void 0 : (_bite$blacklistContex2 = bite.blacklistContext) === null || _bite$blacklistContex2 === void 0 ? void 0 : _bite$blacklistContex2._id,
|
|
2450
2491
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2451
|
-
count:
|
|
2492
|
+
count: bite === null || bite === void 0 ? void 0 : bite.totalSaveCount,
|
|
2452
2493
|
onClick: function onClick() {
|
|
2453
2494
|
return console.log("clicked save");
|
|
2454
2495
|
}
|
|
@@ -2539,7 +2580,7 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2539
2580
|
width: "100%",
|
|
2540
2581
|
justifyContent: "start"
|
|
2541
2582
|
}
|
|
2542
|
-
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
2583
|
+
}, trending && /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
2543
2584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2544
2585
|
width: "16",
|
|
2545
2586
|
height: "16",
|
|
@@ -2594,8 +2635,10 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2594
2635
|
result: "shape"
|
|
2595
2636
|
})))), /*#__PURE__*/React__default['default'].createElement(FavoriteIconWithCounter, {
|
|
2596
2637
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2597
|
-
count:
|
|
2638
|
+
count: bite === null || bite === void 0 ? void 0 : bite.totalSaveCount,
|
|
2639
|
+
onClick: onFavoriteClick
|
|
2598
2640
|
}), /*#__PURE__*/React__default['default'].createElement(UsernameWithPopout$1, {
|
|
2641
|
+
onUsernameClick: onUsernameClick,
|
|
2599
2642
|
user: bite === null || bite === void 0 ? void 0 : bite.ownerObject
|
|
2600
2643
|
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2601
2644
|
sx: {
|
package/dist/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import BookmarkOutlinedIcon from '@mui/icons-material/BookmarkOutlined';
|
|
|
11
11
|
import LockRoundedIcon from '@mui/icons-material/LockRounded';
|
|
12
12
|
import AddRoundedIcon from '@mui/icons-material/AddRounded';
|
|
13
13
|
import ArrowDropDownRoundedIcon from '@mui/icons-material/ArrowDropDownRounded';
|
|
14
|
-
import '@mui/icons-material/DoNotDisturbRounded';
|
|
14
|
+
import DoNotDisturbRoundedIcon from '@mui/icons-material/DoNotDisturbRounded';
|
|
15
15
|
import FavoriteIcon from '@mui/icons-material/Favorite';
|
|
16
16
|
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
|
|
17
17
|
import PauseRoundedIcon from '@mui/icons-material/PauseRounded';
|
|
@@ -1537,7 +1537,9 @@ var UserCard$1 = function UserCard(_ref) {
|
|
|
1537
1537
|
position: "absolute",
|
|
1538
1538
|
bottom: collapsed ? "0" : "5px",
|
|
1539
1539
|
right: collapsed ? "0" : "5px",
|
|
1540
|
-
fontSize: "17px"
|
|
1540
|
+
fontSize: "17px",
|
|
1541
|
+
backgroundColor: "grey4.main",
|
|
1542
|
+
borderRadius: "50%"
|
|
1541
1543
|
}
|
|
1542
1544
|
})), /*#__PURE__*/React__default.createElement(Stack, {
|
|
1543
1545
|
sx: {
|
|
@@ -1859,9 +1861,10 @@ var AddContentButton = function AddContentButton(_ref2) {
|
|
|
1859
1861
|
var added = false;
|
|
1860
1862
|
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
1861
1863
|
direction: "row",
|
|
1862
|
-
width: "100%",
|
|
1864
|
+
width: hoveringAddTo ? "100%" : "60%",
|
|
1863
1865
|
sx: {
|
|
1864
|
-
|
|
1866
|
+
justifyContent: "end",
|
|
1867
|
+
transition: "0.5s",
|
|
1865
1868
|
boxSizing: "border-box",
|
|
1866
1869
|
opacity: hovering ? "1" : "0"
|
|
1867
1870
|
},
|
|
@@ -2138,6 +2141,7 @@ var RatingInfo = function RatingInfo(_ref5) {
|
|
|
2138
2141
|
|
|
2139
2142
|
var ReportedWarning = function ReportedWarning(_ref6) {
|
|
2140
2143
|
var showWarning = _ref6.showWarning,
|
|
2144
|
+
blacklisted = _ref6.blacklisted,
|
|
2141
2145
|
saved = _ref6.saved,
|
|
2142
2146
|
count = _ref6.count,
|
|
2143
2147
|
onClick = _ref6.onClick;
|
|
@@ -2153,6 +2157,28 @@ var ReportedWarning = function ReportedWarning(_ref6) {
|
|
|
2153
2157
|
setHovering = _useState6[1];
|
|
2154
2158
|
|
|
2155
2159
|
var renderInfo = function renderInfo() {
|
|
2160
|
+
if (blacklisted) {
|
|
2161
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DoNotDisturbRoundedIcon, {
|
|
2162
|
+
sx: {
|
|
2163
|
+
marginBottom: "20px"
|
|
2164
|
+
}
|
|
2165
|
+
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2166
|
+
sx: {
|
|
2167
|
+
fontSize: "18px",
|
|
2168
|
+
fontWeight: "600",
|
|
2169
|
+
color: "white.override"
|
|
2170
|
+
}
|
|
2171
|
+
}, "Blocked"), hovering && /*#__PURE__*/React__default.createElement(Button, {
|
|
2172
|
+
color: "whiteOverride",
|
|
2173
|
+
variant: "outlined",
|
|
2174
|
+
sx: {
|
|
2175
|
+
marginTop: "20px"
|
|
2176
|
+
},
|
|
2177
|
+
onClick: function onClick() {
|
|
2178
|
+
setShow(false);
|
|
2179
|
+
}
|
|
2180
|
+
}, "View"));
|
|
2181
|
+
}
|
|
2156
2182
|
|
|
2157
2183
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(WarningRoundedIcon, {
|
|
2158
2184
|
sx: {
|
|
@@ -2265,13 +2291,30 @@ var BlerpTopRow = function BlerpTopRow(_ref7) {
|
|
|
2265
2291
|
};
|
|
2266
2292
|
|
|
2267
2293
|
var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
2268
|
-
var _bite$image, _bite$image$original;
|
|
2294
|
+
var _bite$blacklistContex, _bite$reportedContent, _bite$blacklistContex2, _bite$image, _bite$image$original;
|
|
2269
2295
|
|
|
2270
2296
|
var Waveform = _ref8.Waveform,
|
|
2271
2297
|
bite = _ref8.bite,
|
|
2272
2298
|
playState = _ref8.playState,
|
|
2273
2299
|
play = _ref8.play,
|
|
2274
|
-
onTitleClick = _ref8.onTitleClick
|
|
2300
|
+
_ref8$onTitleClick = _ref8.onTitleClick,
|
|
2301
|
+
onTitleClick = _ref8$onTitleClick === void 0 ? function () {
|
|
2302
|
+
console.log("onTitleClick");
|
|
2303
|
+
} : _ref8$onTitleClick,
|
|
2304
|
+
_ref8$onUsernameClick = _ref8.onUsernameClick,
|
|
2305
|
+
onUsernameClick = _ref8$onUsernameClick === void 0 ? function () {
|
|
2306
|
+
console.log("onUsernameClick");
|
|
2307
|
+
} : _ref8$onUsernameClick,
|
|
2308
|
+
_ref8$onFavoriteClick = _ref8.onFavoriteClick,
|
|
2309
|
+
onFavoriteClick = _ref8$onFavoriteClick === void 0 ? function () {
|
|
2310
|
+
console.log("onFavoriteClick");
|
|
2311
|
+
} : _ref8$onFavoriteClick,
|
|
2312
|
+
_ref8$onAddToPlace = _ref8.onAddToPlace,
|
|
2313
|
+
onAddToPlace = _ref8$onAddToPlace === void 0 ? function () {
|
|
2314
|
+
console.log("onAddToPlace");
|
|
2315
|
+
} : _ref8$onAddToPlace,
|
|
2316
|
+
_ref8$trending = _ref8.trending,
|
|
2317
|
+
trending = _ref8$trending === void 0 ? false : _ref8$trending;
|
|
2275
2318
|
|
|
2276
2319
|
var _useState9 = useState(false),
|
|
2277
2320
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
@@ -2283,11 +2326,6 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2283
2326
|
addedToPlace = _useState12[0],
|
|
2284
2327
|
setAddedToPlace = _useState12[1];
|
|
2285
2328
|
|
|
2286
|
-
var formatter = Intl.NumberFormat("en", {
|
|
2287
|
-
notation: "compact"
|
|
2288
|
-
});
|
|
2289
|
-
var saveCount = formatter.format(bite === null || bite === void 0 ? void 0 : bite.totalSaveCount);
|
|
2290
|
-
|
|
2291
2329
|
var renderPlayStateIcon = function renderPlayStateIcon() {
|
|
2292
2330
|
if (playState === "played") {
|
|
2293
2331
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -2354,9 +2392,10 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2354
2392
|
});
|
|
2355
2393
|
};
|
|
2356
2394
|
|
|
2357
|
-
var handleAddToPlace = function handleAddToPlace(
|
|
2395
|
+
var handleAddToPlace = function handleAddToPlace(e) {
|
|
2358
2396
|
setAddedToPlace(true);
|
|
2359
|
-
console.log(place);
|
|
2397
|
+
onAddToPlace(); // console.log(e, place);
|
|
2398
|
+
|
|
2360
2399
|
setTimeout(function () {
|
|
2361
2400
|
setAddedToPlace(false);
|
|
2362
2401
|
}, 2000);
|
|
@@ -2371,9 +2410,10 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2371
2410
|
background: addedToPlace ? "white" : (bite === null || bite === void 0 ? void 0 : bite.isPremium) && "linear-gradient(315deg, #a839ff 0%, #53c3db 100%)"
|
|
2372
2411
|
}
|
|
2373
2412
|
}, /*#__PURE__*/React__default.createElement(ReportedWarning, {
|
|
2374
|
-
showWarning:
|
|
2413
|
+
showWarning: (bite === null || bite === void 0 ? void 0 : (_bite$blacklistContex = bite.blacklistContext) === null || _bite$blacklistContex === void 0 ? void 0 : _bite$blacklistContex._id) || (bite === null || bite === void 0 ? void 0 : (_bite$reportedContent = bite.reportedContentIds) === null || _bite$reportedContent === void 0 ? void 0 : _bite$reportedContent.length) > 3,
|
|
2414
|
+
blacklisted: bite === null || bite === void 0 ? void 0 : (_bite$blacklistContex2 = bite.blacklistContext) === null || _bite$blacklistContex2 === void 0 ? void 0 : _bite$blacklistContex2._id,
|
|
2375
2415
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2376
|
-
count:
|
|
2416
|
+
count: bite === null || bite === void 0 ? void 0 : bite.totalSaveCount,
|
|
2377
2417
|
onClick: function onClick() {
|
|
2378
2418
|
return console.log("clicked save");
|
|
2379
2419
|
}
|
|
@@ -2464,7 +2504,7 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2464
2504
|
width: "100%",
|
|
2465
2505
|
justifyContent: "start"
|
|
2466
2506
|
}
|
|
2467
|
-
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
2507
|
+
}, trending && /*#__PURE__*/React__default.createElement("svg", {
|
|
2468
2508
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2469
2509
|
width: "16",
|
|
2470
2510
|
height: "16",
|
|
@@ -2519,8 +2559,10 @@ var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
|
2519
2559
|
result: "shape"
|
|
2520
2560
|
})))), /*#__PURE__*/React__default.createElement(FavoriteIconWithCounter, {
|
|
2521
2561
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2522
|
-
count:
|
|
2562
|
+
count: bite === null || bite === void 0 ? void 0 : bite.totalSaveCount,
|
|
2563
|
+
onClick: onFavoriteClick
|
|
2523
2564
|
}), /*#__PURE__*/React__default.createElement(UsernameWithPopout$1, {
|
|
2565
|
+
onUsernameClick: onUsernameClick,
|
|
2524
2566
|
user: bite === null || bite === void 0 ? void 0 : bite.ownerObject
|
|
2525
2567
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
2526
2568
|
sx: {
|
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@mui/material'), require('@babel/runtime/helpers/slicedToArray'), require('prop-types'), require('react'), require('react-color-extractor'), require('styled-components'), require('@babel/runtime/helpers/taggedTemplateLiteral'), require('@mui/icons-material'), require('@mui/icons-material/BookmarkOutlined'), require('@mui/icons-material/LockRounded'), require('@mui/icons-material/AddRounded'), require('@mui/icons-material/ArrowDropDownRounded'), require('@mui/icons-material/DoNotDisturbRounded'), require('@mui/icons-material/Favorite'), require('@mui/icons-material/FavoriteBorder'), require('@mui/icons-material/PauseRounded'), require('@mui/icons-material/PlayArrowRounded'), require('@mui/icons-material/WarningRounded'), require('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/regenerator'), require('@mui/icons-material/BookmarkAddOutlined'), require('@mui/icons-material/MoreHorizRounded'), require('react-palette'), require('@babel/runtime/helpers/typeof'), require('@mui/icons-material/KeyboardArrowRightRounded'), require('@babel/runtime/helpers/defineProperty'), require('@mui/icons-material/KeyboardArrowDownRounded'), require('@mui/icons-material/CloseRounded'), require('@mui/icons-material/FileUploadRounded'), require('@babel/runtime/helpers/extends'), require('react-avatar-editor'), require('react-dropzone'), require('@mui/icons-material/InsertPhotoRounded'), require('@mui/material/styles'), require('@mui/material/Slide'), require('@mui/material/Fade'), require('react-lottie'), require('@mui/icons-material/Facebook'), require('@mui/icons-material/Instagram'), require('@mui/icons-material/ModeEditRounded'), require('@mui/icons-material/PersonAddRounded'), require('@mui/icons-material/Pinterest'), require('@mui/icons-material/Twitter'), require('@mui/icons-material/YouTube'), require('@mui/icons-material/PersonRemoveRounded'), require('@babel/runtime/helpers/toConsumableArray'), require('@mui/icons-material/FilterAltRounded'), require('@mui/icons-material/MenuRounded'), require('@mui/icons-material/ViewModuleRounded'), require('@mui/icons-material/SettingsRounded'), require('@mui/icons-material/SortRounded'), require('@mui/icons-material/ChevronRightRounded'), require('@mui/icons-material/PersonRounded'), require('@mui/icons-material/SearchRounded'), require('@mui/icons-material/BookmarkRemoveOutlined'), require('@mui/icons-material/VisibilityOffRounded')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@mui/material', '@babel/runtime/helpers/slicedToArray', 'prop-types', 'react', 'react-color-extractor', 'styled-components', '@babel/runtime/helpers/taggedTemplateLiteral', '@mui/icons-material', '@mui/icons-material/BookmarkOutlined', '@mui/icons-material/LockRounded', '@mui/icons-material/AddRounded', '@mui/icons-material/ArrowDropDownRounded', '@mui/icons-material/DoNotDisturbRounded', '@mui/icons-material/Favorite', '@mui/icons-material/FavoriteBorder', '@mui/icons-material/PauseRounded', '@mui/icons-material/PlayArrowRounded', '@mui/icons-material/WarningRounded', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/regenerator', '@mui/icons-material/BookmarkAddOutlined', '@mui/icons-material/MoreHorizRounded', 'react-palette', '@babel/runtime/helpers/typeof', '@mui/icons-material/KeyboardArrowRightRounded', '@babel/runtime/helpers/defineProperty', '@mui/icons-material/KeyboardArrowDownRounded', '@mui/icons-material/CloseRounded', '@mui/icons-material/FileUploadRounded', '@babel/runtime/helpers/extends', 'react-avatar-editor', 'react-dropzone', '@mui/icons-material/InsertPhotoRounded', '@mui/material/styles', '@mui/material/Slide', '@mui/material/Fade', 'react-lottie', '@mui/icons-material/Facebook', '@mui/icons-material/Instagram', '@mui/icons-material/ModeEditRounded', '@mui/icons-material/PersonAddRounded', '@mui/icons-material/Pinterest', '@mui/icons-material/Twitter', '@mui/icons-material/YouTube', '@mui/icons-material/PersonRemoveRounded', '@babel/runtime/helpers/toConsumableArray', '@mui/icons-material/FilterAltRounded', '@mui/icons-material/MenuRounded', '@mui/icons-material/ViewModuleRounded', '@mui/icons-material/SettingsRounded', '@mui/icons-material/SortRounded', '@mui/icons-material/ChevronRightRounded', '@mui/icons-material/PersonRounded', '@mui/icons-material/SearchRounded', '@mui/icons-material/BookmarkRemoveOutlined', '@mui/icons-material/VisibilityOffRounded'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['react-awesome-buttons'] = {}, global.material, global._slicedToArray, global.PropTypes, global.React, global.reactColorExtractor, global.styled, global._taggedTemplateLiteral, global.iconsMaterial, global.BookmarkOutlinedIcon, global.LockRoundedIcon, global.AddRoundedIcon, global.ArrowDropDownRoundedIcon,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['react-awesome-buttons'] = {}, global.material, global._slicedToArray, global.PropTypes, global.React, global.reactColorExtractor, global.styled, global._taggedTemplateLiteral, global.iconsMaterial, global.BookmarkOutlinedIcon, global.LockRoundedIcon, global.AddRoundedIcon, global.ArrowDropDownRoundedIcon, global.DoNotDisturbRoundedIcon, global.FavoriteIcon, global.FavoriteBorderIcon, global.PauseRoundedIcon, global.PlayArrowRoundedIcon, global.WarningRoundedIcon, global._asyncToGenerator, global._regeneratorRuntime, global.BookmarkAddOutlinedIcon, global.MoreHorizRoundedIcon, global.reactPalette, global._typeof, global.KeyboardArrowRightRoundedIcon, global._defineProperty, global.KeyboardArrowDownRoundedIcon, global.CloseRoundedIcon, global.FileUploadRoundedIcon, global._extends, global.AvatarEditor, global.Dropzone, global.InsertPhotoRoundedIcon, global.styles, global.Slide, global.Fade, global.Lottie, global.FacebookIcon, global.InstagramIcon, global.ModeEditRoundedIcon, global.PersonAddRoundedIcon, global.PinterestIcon, global.TwitterIcon, global.YouTubeIcon, global.PersonRemoveRoundedIcon, global._toConsumableArray, null, global.MenuRoundedIcon, global.ViewModuleRoundedIcon, null, global.SortRoundedIcon, global.ChevronRightRoundedIcon, global.PersonRoundedIcon, global.SearchRoundedIcon, global.BookmarkRemoveOutlinedIcon, global.VisibilityOffRoundedIcon));
|
|
5
5
|
}(this, (function (exports, material, _slicedToArray, PropTypes, React, reactColorExtractor, styled, _taggedTemplateLiteral, iconsMaterial, BookmarkOutlinedIcon, LockRoundedIcon, AddRoundedIcon, ArrowDropDownRoundedIcon, DoNotDisturbRoundedIcon, FavoriteIcon, FavoriteBorderIcon, PauseRoundedIcon, PlayArrowRoundedIcon, WarningRoundedIcon, _asyncToGenerator, _regeneratorRuntime, BookmarkAddOutlinedIcon, MoreHorizRoundedIcon, reactPalette, _typeof, KeyboardArrowRightRoundedIcon, _defineProperty, KeyboardArrowDownRoundedIcon, CloseRoundedIcon, FileUploadRoundedIcon, _extends, AvatarEditor, Dropzone, InsertPhotoRoundedIcon, styles, Slide, Fade, Lottie, FacebookIcon, InstagramIcon, ModeEditRoundedIcon, PersonAddRoundedIcon, PinterestIcon, TwitterIcon, YouTubeIcon, PersonRemoveRoundedIcon, _toConsumableArray, FilterAltRounded, MenuRoundedIcon, ViewModuleRoundedIcon, SettingsRounded, SortRoundedIcon, ChevronRightRoundedIcon, PersonRoundedIcon, SearchRoundedIcon, BookmarkRemoveOutlinedIcon, VisibilityOffRoundedIcon) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
var LockRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(LockRoundedIcon);
|
|
37
37
|
var AddRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(AddRoundedIcon);
|
|
38
38
|
var ArrowDropDownRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDropDownRoundedIcon);
|
|
39
|
+
var DoNotDisturbRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(DoNotDisturbRoundedIcon);
|
|
39
40
|
var FavoriteIcon__default = /*#__PURE__*/_interopDefaultLegacy(FavoriteIcon);
|
|
40
41
|
var FavoriteBorderIcon__default = /*#__PURE__*/_interopDefaultLegacy(FavoriteBorderIcon);
|
|
41
42
|
var PauseRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(PauseRoundedIcon);
|
|
@@ -1557,7 +1558,9 @@
|
|
|
1557
1558
|
position: "absolute",
|
|
1558
1559
|
bottom: collapsed ? "0" : "5px",
|
|
1559
1560
|
right: collapsed ? "0" : "5px",
|
|
1560
|
-
fontSize: "17px"
|
|
1561
|
+
fontSize: "17px",
|
|
1562
|
+
backgroundColor: "grey4.main",
|
|
1563
|
+
borderRadius: "50%"
|
|
1561
1564
|
}
|
|
1562
1565
|
})), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1563
1566
|
sx: {
|
|
@@ -1879,9 +1882,10 @@
|
|
|
1879
1882
|
var added = false;
|
|
1880
1883
|
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1881
1884
|
direction: "row",
|
|
1882
|
-
width: "100%",
|
|
1885
|
+
width: hoveringAddTo ? "100%" : "60%",
|
|
1883
1886
|
sx: {
|
|
1884
|
-
|
|
1887
|
+
justifyContent: "end",
|
|
1888
|
+
transition: "0.5s",
|
|
1885
1889
|
boxSizing: "border-box",
|
|
1886
1890
|
opacity: hovering ? "1" : "0"
|
|
1887
1891
|
},
|
|
@@ -2158,6 +2162,7 @@
|
|
|
2158
2162
|
|
|
2159
2163
|
var ReportedWarning = function ReportedWarning(_ref6) {
|
|
2160
2164
|
var showWarning = _ref6.showWarning,
|
|
2165
|
+
blacklisted = _ref6.blacklisted,
|
|
2161
2166
|
saved = _ref6.saved,
|
|
2162
2167
|
count = _ref6.count,
|
|
2163
2168
|
onClick = _ref6.onClick;
|
|
@@ -2173,6 +2178,28 @@
|
|
|
2173
2178
|
setHovering = _useState6[1];
|
|
2174
2179
|
|
|
2175
2180
|
var renderInfo = function renderInfo() {
|
|
2181
|
+
if (blacklisted) {
|
|
2182
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(DoNotDisturbRoundedIcon__default['default'], {
|
|
2183
|
+
sx: {
|
|
2184
|
+
marginBottom: "20px"
|
|
2185
|
+
}
|
|
2186
|
+
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2187
|
+
sx: {
|
|
2188
|
+
fontSize: "18px",
|
|
2189
|
+
fontWeight: "600",
|
|
2190
|
+
color: "white.override"
|
|
2191
|
+
}
|
|
2192
|
+
}, "Blocked"), hovering && /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
2193
|
+
color: "whiteOverride",
|
|
2194
|
+
variant: "outlined",
|
|
2195
|
+
sx: {
|
|
2196
|
+
marginTop: "20px"
|
|
2197
|
+
},
|
|
2198
|
+
onClick: function onClick() {
|
|
2199
|
+
setShow(false);
|
|
2200
|
+
}
|
|
2201
|
+
}, "View"));
|
|
2202
|
+
}
|
|
2176
2203
|
|
|
2177
2204
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(WarningRoundedIcon__default['default'], {
|
|
2178
2205
|
sx: {
|
|
@@ -2285,13 +2312,30 @@
|
|
|
2285
2312
|
};
|
|
2286
2313
|
|
|
2287
2314
|
var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
2288
|
-
var _bite$image, _bite$image$original;
|
|
2315
|
+
var _bite$blacklistContex, _bite$reportedContent, _bite$blacklistContex2, _bite$image, _bite$image$original;
|
|
2289
2316
|
|
|
2290
2317
|
var Waveform = _ref8.Waveform,
|
|
2291
2318
|
bite = _ref8.bite,
|
|
2292
2319
|
playState = _ref8.playState,
|
|
2293
2320
|
play = _ref8.play,
|
|
2294
|
-
onTitleClick = _ref8.onTitleClick
|
|
2321
|
+
_ref8$onTitleClick = _ref8.onTitleClick,
|
|
2322
|
+
onTitleClick = _ref8$onTitleClick === void 0 ? function () {
|
|
2323
|
+
console.log("onTitleClick");
|
|
2324
|
+
} : _ref8$onTitleClick,
|
|
2325
|
+
_ref8$onUsernameClick = _ref8.onUsernameClick,
|
|
2326
|
+
onUsernameClick = _ref8$onUsernameClick === void 0 ? function () {
|
|
2327
|
+
console.log("onUsernameClick");
|
|
2328
|
+
} : _ref8$onUsernameClick,
|
|
2329
|
+
_ref8$onFavoriteClick = _ref8.onFavoriteClick,
|
|
2330
|
+
onFavoriteClick = _ref8$onFavoriteClick === void 0 ? function () {
|
|
2331
|
+
console.log("onFavoriteClick");
|
|
2332
|
+
} : _ref8$onFavoriteClick,
|
|
2333
|
+
_ref8$onAddToPlace = _ref8.onAddToPlace,
|
|
2334
|
+
onAddToPlace = _ref8$onAddToPlace === void 0 ? function () {
|
|
2335
|
+
console.log("onAddToPlace");
|
|
2336
|
+
} : _ref8$onAddToPlace,
|
|
2337
|
+
_ref8$trending = _ref8.trending,
|
|
2338
|
+
trending = _ref8$trending === void 0 ? false : _ref8$trending;
|
|
2295
2339
|
|
|
2296
2340
|
var _useState9 = React.useState(false),
|
|
2297
2341
|
_useState10 = _slicedToArray__default['default'](_useState9, 2),
|
|
@@ -2303,11 +2347,6 @@
|
|
|
2303
2347
|
addedToPlace = _useState12[0],
|
|
2304
2348
|
setAddedToPlace = _useState12[1];
|
|
2305
2349
|
|
|
2306
|
-
var formatter = Intl.NumberFormat("en", {
|
|
2307
|
-
notation: "compact"
|
|
2308
|
-
});
|
|
2309
|
-
var saveCount = formatter.format(bite === null || bite === void 0 ? void 0 : bite.totalSaveCount);
|
|
2310
|
-
|
|
2311
2350
|
var renderPlayStateIcon = function renderPlayStateIcon() {
|
|
2312
2351
|
if (playState === "played") {
|
|
2313
2352
|
return /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
@@ -2374,9 +2413,10 @@
|
|
|
2374
2413
|
});
|
|
2375
2414
|
};
|
|
2376
2415
|
|
|
2377
|
-
var handleAddToPlace = function handleAddToPlace(
|
|
2416
|
+
var handleAddToPlace = function handleAddToPlace(e) {
|
|
2378
2417
|
setAddedToPlace(true);
|
|
2379
|
-
console.log(place);
|
|
2418
|
+
onAddToPlace(); // console.log(e, place);
|
|
2419
|
+
|
|
2380
2420
|
setTimeout(function () {
|
|
2381
2421
|
setAddedToPlace(false);
|
|
2382
2422
|
}, 2000);
|
|
@@ -2391,9 +2431,10 @@
|
|
|
2391
2431
|
background: addedToPlace ? "white" : (bite === null || bite === void 0 ? void 0 : bite.isPremium) && "linear-gradient(315deg, #a839ff 0%, #53c3db 100%)"
|
|
2392
2432
|
}
|
|
2393
2433
|
}, /*#__PURE__*/React__default['default'].createElement(ReportedWarning, {
|
|
2394
|
-
showWarning:
|
|
2434
|
+
showWarning: (bite === null || bite === void 0 ? void 0 : (_bite$blacklistContex = bite.blacklistContext) === null || _bite$blacklistContex === void 0 ? void 0 : _bite$blacklistContex._id) || (bite === null || bite === void 0 ? void 0 : (_bite$reportedContent = bite.reportedContentIds) === null || _bite$reportedContent === void 0 ? void 0 : _bite$reportedContent.length) > 3,
|
|
2435
|
+
blacklisted: bite === null || bite === void 0 ? void 0 : (_bite$blacklistContex2 = bite.blacklistContext) === null || _bite$blacklistContex2 === void 0 ? void 0 : _bite$blacklistContex2._id,
|
|
2395
2436
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2396
|
-
count:
|
|
2437
|
+
count: bite === null || bite === void 0 ? void 0 : bite.totalSaveCount,
|
|
2397
2438
|
onClick: function onClick() {
|
|
2398
2439
|
return console.log("clicked save");
|
|
2399
2440
|
}
|
|
@@ -2484,7 +2525,7 @@
|
|
|
2484
2525
|
width: "100%",
|
|
2485
2526
|
justifyContent: "start"
|
|
2486
2527
|
}
|
|
2487
|
-
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
2528
|
+
}, trending && /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
2488
2529
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2489
2530
|
width: "16",
|
|
2490
2531
|
height: "16",
|
|
@@ -2539,8 +2580,10 @@
|
|
|
2539
2580
|
result: "shape"
|
|
2540
2581
|
})))), /*#__PURE__*/React__default['default'].createElement(FavoriteIconWithCounter, {
|
|
2541
2582
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2542
|
-
count:
|
|
2583
|
+
count: bite === null || bite === void 0 ? void 0 : bite.totalSaveCount,
|
|
2584
|
+
onClick: onFavoriteClick
|
|
2543
2585
|
}), /*#__PURE__*/React__default['default'].createElement(UsernameWithPopout$1, {
|
|
2586
|
+
onUsernameClick: onUsernameClick,
|
|
2544
2587
|
user: bite === null || bite === void 0 ? void 0 : bite.ownerObject
|
|
2545
2588
|
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2546
2589
|
sx: {
|