@blerp/design 1.2.74 → 1.2.75
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 +167 -0
- package/dist/cjs/Blerp/BlerpSavePopup.js +157 -0
- package/dist/cjs/Blerp/BlerpTitleRow.js +116 -0
- package/dist/cjs/Blerp/BlerpTopRow.js +246 -0
- package/dist/cjs/Blerp.js +239 -0
- package/dist/cjs/BlerpAudioContextProvider.js +141 -0
- package/dist/cjs/BlerpListView.js +357 -0
- package/dist/cjs/BlerpListViewPremium.js +404 -0
- package/dist/cjs/BlerpListViewSkeleton.js +27 -0
- package/dist/cjs/BlerpSkeleton.js +23 -0
- package/dist/cjs/CollectionCard.js +402 -0
- package/dist/cjs/CollectionListViewPremium.js +368 -0
- package/dist/cjs/CollectionSkeleton.js +28 -0
- package/dist/cjs/Dropdown.js +283 -0
- package/dist/cjs/EllipsisLoader.js +51 -0
- package/dist/cjs/GroupCard.js +172 -0
- package/dist/cjs/Icons/Icons.js +606 -0
- package/dist/cjs/ImageUploadModal.js +278 -0
- package/dist/cjs/Lotties/JiggleLock.json.js +2762 -0
- package/dist/cjs/Lotties/LottieAnimation.js +32 -0
- package/dist/cjs/NewBlerp.js +740 -0
- package/dist/cjs/NewBlerpTest.js +808 -0
- package/dist/cjs/NewCollectionModal.js +403 -0
- package/dist/cjs/PremiumCollectionCard.js +511 -0
- package/dist/cjs/PurchaseModals/CheckoutModal.js +39 -0
- package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +39 -0
- package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +39 -0
- package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +39 -0
- package/dist/cjs/ReactionButtons.js +65 -0
- package/dist/cjs/ScreenSizeHook.js +34 -0
- package/dist/cjs/SnackbarContextProvider.js +166 -0
- package/dist/cjs/Theme.js +255 -0
- package/dist/cjs/Toggle.js +59 -0
- package/dist/cjs/UserCard.js +141 -0
- package/dist/cjs/UserPage/LibraryControls.js +315 -0
- package/dist/cjs/UserPage/UserLibraryHeader.js +93 -0
- package/dist/cjs/UserPage/UserProfileHeader.js +283 -0
- package/dist/cjs/UsernameWithPopout.js +93 -0
- package/dist/cjs/colors.js +368 -0
- package/dist/cjs/icons.js +161 -0
- package/dist/cjs/index.js +449 -0
- package/dist/esm/Blerp/BlerpImageRow.js +157 -0
- package/dist/esm/Blerp/BlerpSavePopup.js +147 -0
- package/dist/esm/Blerp/BlerpTitleRow.js +108 -0
- package/dist/esm/Blerp/BlerpTopRow.js +236 -0
- package/dist/esm/Blerp.js +230 -0
- package/dist/esm/BlerpAudioContextProvider.js +132 -0
- package/dist/esm/BlerpListView.js +344 -0
- package/dist/esm/BlerpListViewPremium.js +391 -0
- package/dist/esm/BlerpListViewSkeleton.js +17 -0
- package/dist/esm/BlerpSkeleton.js +13 -0
- package/dist/esm/CollectionCard.js +392 -0
- package/dist/esm/CollectionListViewPremium.js +354 -0
- package/dist/esm/CollectionSkeleton.js +18 -0
- package/dist/esm/Dropdown.js +273 -0
- package/dist/esm/EllipsisLoader.js +41 -0
- package/dist/esm/GroupCard.js +162 -0
- package/dist/esm/Icons/Icons.js +571 -0
- package/dist/esm/ImageUploadModal.js +265 -0
- package/dist/esm/Lotties/JiggleLock.json.js +2747 -0
- package/dist/esm/Lotties/LottieAnimation.js +25 -0
- package/dist/esm/NewBlerp.js +719 -0
- package/dist/esm/NewBlerpTest.js +787 -0
- package/dist/esm/NewCollectionModal.js +391 -0
- package/dist/esm/PremiumCollectionCard.js +498 -0
- package/dist/esm/PurchaseModals/CheckoutModal.js +33 -0
- package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +33 -0
- package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +33 -0
- package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +33 -0
- package/dist/esm/ReactionButtons.js +57 -0
- package/dist/esm/ScreenSizeHook.js +30 -0
- package/dist/esm/SnackbarContextProvider.js +154 -0
- package/dist/esm/Theme.js +246 -0
- package/dist/esm/Toggle.js +49 -0
- package/dist/esm/UserCard.js +133 -0
- package/dist/esm/UserPage/LibraryControls.js +301 -0
- package/dist/esm/UserPage/UserLibraryHeader.js +87 -0
- package/dist/esm/UserPage/UserProfileHeader.js +268 -0
- package/dist/esm/UsernameWithPopout.js +85 -0
- package/dist/esm/colors.js +360 -0
- package/dist/esm/icons.js +159 -0
- package/dist/esm/index.js +336 -0
- package/package.json +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
2
|
+
import BookmarkRemoveOutlinedIcon from '@mui/icons-material/BookmarkRemoveOutlined';
|
|
3
|
+
import CloseRoundedIcon from '@mui/icons-material/CloseRounded';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { reactionIconUrls } from '../Blerp.js';
|
|
7
|
+
import { Popover, Grid, Tooltip, Stack, Button } from '../index.js';
|
|
8
|
+
|
|
9
|
+
var _templateObject;
|
|
10
|
+
const ReactionButton = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 50%;\n width: 30px;\n height: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n transition: 0.2s;\n margin-right: 0;\n cursor: pointer;\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n"])), props => props.active ? props.theme.colors.ibisRed : props.theme.colors.grey5Override, props => props.theme.colors.ibisRed);
|
|
11
|
+
|
|
12
|
+
const BlerpSavePopup = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
openSave,
|
|
15
|
+
setOpenSave,
|
|
16
|
+
sizeParams,
|
|
17
|
+
unsaveButton,
|
|
18
|
+
handleClickReaction,
|
|
19
|
+
bite,
|
|
20
|
+
handleClickUnsave,
|
|
21
|
+
handleClickOrganize,
|
|
22
|
+
organizeButton,
|
|
23
|
+
anchorRef
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
26
|
+
open: openSave,
|
|
27
|
+
onClose: () => setOpenSave(false),
|
|
28
|
+
anchorEl: anchorRef.current,
|
|
29
|
+
PaperProps: {
|
|
30
|
+
sx: {
|
|
31
|
+
height: sizeParams.height,
|
|
32
|
+
width: sizeParams.width,
|
|
33
|
+
padding: "10px",
|
|
34
|
+
display: "flex",
|
|
35
|
+
flexDirection: "column",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
justifyContent: "space-around",
|
|
38
|
+
boxSizing: "border-box",
|
|
39
|
+
backgroundColor: "notBlack.override"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
anchorOrigin: {
|
|
43
|
+
vertical: "center",
|
|
44
|
+
horizontal: "center"
|
|
45
|
+
},
|
|
46
|
+
transformOrigin: {
|
|
47
|
+
vertical: "center",
|
|
48
|
+
horizontal: "center"
|
|
49
|
+
}
|
|
50
|
+
}, /*#__PURE__*/React.createElement(CloseRoundedIcon, {
|
|
51
|
+
onClick: () => {
|
|
52
|
+
setOpenSave(false);
|
|
53
|
+
},
|
|
54
|
+
sx: {
|
|
55
|
+
color: "white.override",
|
|
56
|
+
position: "absolute",
|
|
57
|
+
top: "0",
|
|
58
|
+
right: "0"
|
|
59
|
+
}
|
|
60
|
+
}), /*#__PURE__*/React.createElement(Grid, {
|
|
61
|
+
display: "grid",
|
|
62
|
+
gridTemplateColumns: "repeat(5, 1fr)",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
marginTop: "16px",
|
|
65
|
+
gap: 1
|
|
66
|
+
}, Object.keys(reactionIconUrls).map(reaction => {
|
|
67
|
+
var _bite$userReactions;
|
|
68
|
+
|
|
69
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
70
|
+
key: "".concat(reaction, "-button"),
|
|
71
|
+
gridColumn: "span 1",
|
|
72
|
+
display: "flex",
|
|
73
|
+
justifyContent: "center"
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
75
|
+
title: reaction
|
|
76
|
+
}, /*#__PURE__*/React.createElement(ReactionButton, {
|
|
77
|
+
active: bite === null || bite === void 0 ? void 0 : (_bite$userReactions = bite.userReactions) === null || _bite$userReactions === void 0 ? void 0 : _bite$userReactions.reactions.includes(reaction),
|
|
78
|
+
style: {
|
|
79
|
+
padding: sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.reactionPadding,
|
|
80
|
+
width: sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.reactionSize,
|
|
81
|
+
height: sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.reactionSize
|
|
82
|
+
},
|
|
83
|
+
onClick: () => {
|
|
84
|
+
var _bite$userReactions2;
|
|
85
|
+
|
|
86
|
+
let isRemove = bite === null || bite === void 0 ? void 0 : (_bite$userReactions2 = bite.userReactions) === null || _bite$userReactions2 === void 0 ? void 0 : _bite$userReactions2.reactions.includes(reaction);
|
|
87
|
+
handleClickReaction(reaction, isRemove);
|
|
88
|
+
setOpenSave(false);
|
|
89
|
+
}
|
|
90
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
91
|
+
alt: "reaction-".concat(reaction),
|
|
92
|
+
width: "100%",
|
|
93
|
+
height: "100%",
|
|
94
|
+
src: reactionIconUrls[reaction]
|
|
95
|
+
}))));
|
|
96
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
97
|
+
justifyContent: "space-around",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
direction: "row",
|
|
100
|
+
width: "100%",
|
|
101
|
+
flexWrap: "wrap"
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
103
|
+
variant: "contained",
|
|
104
|
+
color: "seafoam",
|
|
105
|
+
size: "small",
|
|
106
|
+
sx: {
|
|
107
|
+
marginTop: "4px",
|
|
108
|
+
padding: (sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.buttonSize) === "small" ? "0px" : undefined,
|
|
109
|
+
fontSize: (sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.buttonSize) === "small" ? "10px" : "16px"
|
|
110
|
+
},
|
|
111
|
+
onClick: () => setOpenSave(false)
|
|
112
|
+
}, "DONE"), unsaveButton ? unsaveButton : /*#__PURE__*/React.createElement(React.Fragment, null, (!bite.isPremium || !bite.owned) && /*#__PURE__*/React.createElement(Button, {
|
|
113
|
+
onClick: () => {
|
|
114
|
+
handleClickUnsave();
|
|
115
|
+
setOpenSave(false);
|
|
116
|
+
},
|
|
117
|
+
variant: "outlined",
|
|
118
|
+
color: "whiteOverride",
|
|
119
|
+
sx: {
|
|
120
|
+
".MuiButton-startIcon": {
|
|
121
|
+
margin: "0"
|
|
122
|
+
},
|
|
123
|
+
padding: (sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.buttonSize) === "small" ? "0px" : undefined,
|
|
124
|
+
fontSize: (sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.buttonSize) === "small" ? "10px" : "16px"
|
|
125
|
+
},
|
|
126
|
+
size: "small",
|
|
127
|
+
startIcon: /*#__PURE__*/React.createElement(BookmarkRemoveOutlinedIcon, {
|
|
128
|
+
sx: {
|
|
129
|
+
color: "white.override",
|
|
130
|
+
margin: "0"
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
}, "UNSAVE")), organizeButton ? organizeButton : /*#__PURE__*/React.createElement(Button, {
|
|
134
|
+
variant: "text",
|
|
135
|
+
color: "grey4",
|
|
136
|
+
sx: {
|
|
137
|
+
marginTop: "4px",
|
|
138
|
+
padding: (sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.buttonSize) === "small" ? "0px" : undefined,
|
|
139
|
+
fontSize: (sizeParams === null || sizeParams === void 0 ? void 0 : sizeParams.buttonSize) === "small" ? "10px" : "16px"
|
|
140
|
+
},
|
|
141
|
+
onClick: () => {
|
|
142
|
+
handleClickOrganize();
|
|
143
|
+
}
|
|
144
|
+
}, "Organize")));
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export default BlerpSavePopup;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Stack, Text } from '../index.js';
|
|
5
|
+
|
|
6
|
+
var _templateObject;
|
|
7
|
+
const LineClamp = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n margin: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
|
|
8
|
+
|
|
9
|
+
const BlerpTitleRow = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
bite,
|
|
12
|
+
title,
|
|
13
|
+
isLinkTitle,
|
|
14
|
+
handleClickTitle,
|
|
15
|
+
isPremium,
|
|
16
|
+
isLocked,
|
|
17
|
+
isOwner,
|
|
18
|
+
sizeParams
|
|
19
|
+
} = _ref;
|
|
20
|
+
|
|
21
|
+
if (bite.visibility === "PRIVATE" && !isOwner) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
23
|
+
direction: "row",
|
|
24
|
+
sx: {
|
|
25
|
+
width: "90%",
|
|
26
|
+
textAlign: "center",
|
|
27
|
+
zIndex: "1",
|
|
28
|
+
overflow: "hidden",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
margin: "auto"
|
|
31
|
+
}
|
|
32
|
+
}, /*#__PURE__*/React.createElement(LineClamp, {
|
|
33
|
+
onClick: e => {
|
|
34
|
+
if (handleClickTitle) {
|
|
35
|
+
e.stopPropagation();
|
|
36
|
+
handleClickTitle();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
40
|
+
textAlign: "center",
|
|
41
|
+
fontSize: sizeParams.fontSize,
|
|
42
|
+
color: isPremium && !isLocked ? "white.main" : "notBlack.main",
|
|
43
|
+
sx: {
|
|
44
|
+
":hover": {
|
|
45
|
+
textDecoration: handleClickTitle ? "underline" : "none"
|
|
46
|
+
},
|
|
47
|
+
textOverflow: "ellipsis"
|
|
48
|
+
},
|
|
49
|
+
lineHeight: sizeParams.buttonSize === "small" ? "16px" : "24px"
|
|
50
|
+
}, title || bite.title)));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
54
|
+
direction: "row",
|
|
55
|
+
sx: {
|
|
56
|
+
width: "90%",
|
|
57
|
+
textAlign: "center",
|
|
58
|
+
zIndex: "1",
|
|
59
|
+
overflow: "hidden",
|
|
60
|
+
padding: "4px 0",
|
|
61
|
+
justifyContent: "center",
|
|
62
|
+
margin: "auto"
|
|
63
|
+
}
|
|
64
|
+
}, isLinkTitle ? /*#__PURE__*/React.createElement(LineClamp, {
|
|
65
|
+
onClick: e => {
|
|
66
|
+
if (handleClickTitle) {
|
|
67
|
+
e.stopPropagation();
|
|
68
|
+
handleClickTitle();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
72
|
+
href: "/soundbites/".concat(bite._id),
|
|
73
|
+
style: {
|
|
74
|
+
textDecoration: "none"
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
77
|
+
textAlign: "center",
|
|
78
|
+
fontSize: sizeParams.fontSize,
|
|
79
|
+
color: isPremium ? "white.override" : "notBlack.main",
|
|
80
|
+
sx: {
|
|
81
|
+
":hover": {
|
|
82
|
+
textDecoration: handleClickTitle ? "underline" : "none"
|
|
83
|
+
},
|
|
84
|
+
textOverflow: "ellipsis"
|
|
85
|
+
},
|
|
86
|
+
lineHeight: sizeParams.buttonSize === "small" ? "16px" : "24px"
|
|
87
|
+
}, title || bite.title))) : /*#__PURE__*/React.createElement(LineClamp, {
|
|
88
|
+
onClick: e => {
|
|
89
|
+
if (handleClickTitle) {
|
|
90
|
+
e.stopPropagation();
|
|
91
|
+
handleClickTitle();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
95
|
+
textAlign: "center",
|
|
96
|
+
fontSize: sizeParams.fontSize,
|
|
97
|
+
color: isPremium ? "white.override" : "notBlack.main",
|
|
98
|
+
sx: {
|
|
99
|
+
":hover": {
|
|
100
|
+
textDecoration: handleClickTitle ? "underline" : "none"
|
|
101
|
+
},
|
|
102
|
+
textOverflow: "ellipsis"
|
|
103
|
+
},
|
|
104
|
+
lineHeight: sizeParams.buttonSize === "small" ? "16px" : "24px"
|
|
105
|
+
}, title || bite.title)));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default BlerpTitleRow;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import LockRoundedIcon from '@mui/icons-material/LockRounded';
|
|
2
|
+
import BookmarkOutlinedIcon from '@mui/icons-material/BookmarkOutlined';
|
|
3
|
+
import MoreHorizRoundedIcon from '@mui/icons-material/MoreHorizRounded';
|
|
4
|
+
import VisibilityOffRoundedIcon from '@mui/icons-material/VisibilityOffRounded';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { reactionIconUrls } from '../Blerp.js';
|
|
7
|
+
import { UnsafeIcon, BookmarkAddRounded, DiamondIcon, TwitchBitIcon, ChannelPointsIcon } from '../Icons/Icons.js';
|
|
8
|
+
import { Stack, Text, Tooltip, IconButton } from '../index.js';
|
|
9
|
+
|
|
10
|
+
const BlerpTopRow = _ref => {
|
|
11
|
+
var _bite$topReactions, _bite$topReactions2, _bite$topReactions3;
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
secondaryActionButton,
|
|
15
|
+
sizeParams,
|
|
16
|
+
bite,
|
|
17
|
+
isOwner,
|
|
18
|
+
getUserReactions,
|
|
19
|
+
setOpenSave,
|
|
20
|
+
handleClickSave,
|
|
21
|
+
isPremium,
|
|
22
|
+
isLocked,
|
|
23
|
+
isBlerpHovered,
|
|
24
|
+
handleClickThreeDot
|
|
25
|
+
} = _ref;
|
|
26
|
+
|
|
27
|
+
function formatNumber(n) {
|
|
28
|
+
var ranges = [{
|
|
29
|
+
divider: 1e9,
|
|
30
|
+
suffix: "B"
|
|
31
|
+
}, {
|
|
32
|
+
divider: 1e6,
|
|
33
|
+
suffix: "M"
|
|
34
|
+
}, {
|
|
35
|
+
divider: 1e3,
|
|
36
|
+
suffix: "k"
|
|
37
|
+
}];
|
|
38
|
+
|
|
39
|
+
for (var i = 0; i < ranges.length; i++) {
|
|
40
|
+
if (n >= ranges[i].divider) {
|
|
41
|
+
return (n / ranges[i].divider).toFixed(2).toString() + ranges[i].suffix;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return n.toString();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
49
|
+
direction: "row",
|
|
50
|
+
width: "100%",
|
|
51
|
+
justifyContent: "space-between",
|
|
52
|
+
alignItems: "center",
|
|
53
|
+
height: bite.visibility !== "PRIVATE" || isOwner ? "30px" : "30px" // makes the top row absolute for small size only. Effictively, this spaces the blerp image beneath it correctly.
|
|
54
|
+
,
|
|
55
|
+
position: sizeParams.buttonSize === "small" && "absolute"
|
|
56
|
+
}, (bite.visibility !== "PRIVATE" || isOwner) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
57
|
+
fontSize: "12px",
|
|
58
|
+
color: isPremium && !isLocked ? "white.main" : "notBlack.main",
|
|
59
|
+
sx: {
|
|
60
|
+
position: "absolute",
|
|
61
|
+
top: "30px",
|
|
62
|
+
left: "10px"
|
|
63
|
+
}
|
|
64
|
+
}, bite === null || bite === void 0 ? void 0 : bite.audienceRating), (bite === null || bite === void 0 ? void 0 : bite.audioDuration) && /*#__PURE__*/React.createElement(Text, {
|
|
65
|
+
fontSize: "8px",
|
|
66
|
+
color: isPremium ? "waxwing.main" : "grey5.main",
|
|
67
|
+
sx: {
|
|
68
|
+
maxWidth: sizeParams.buttonSize === "small" ? "26px" : "40px",
|
|
69
|
+
textOverflow: "ellipsis",
|
|
70
|
+
overflow: "hidden",
|
|
71
|
+
position: "absolute",
|
|
72
|
+
top: "26px",
|
|
73
|
+
right: "8px",
|
|
74
|
+
opacity: isBlerpHovered ? 1 : 0.78
|
|
75
|
+
}
|
|
76
|
+
}, (Number(bite === null || bite === void 0 ? void 0 : bite.audioDuration) / 1000).toFixed(1), sizeParams.buttonSize === "small" ? "s" : "sec"), (bite === null || bite === void 0 ? void 0 : bite.listingType) === "UNSAFE" && /*#__PURE__*/React.createElement(Tooltip, {
|
|
77
|
+
title: "May contain potentially sensitive content",
|
|
78
|
+
sx: {
|
|
79
|
+
wordWrap: "break-word"
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
82
|
+
className: "unsafe-icon-blrp",
|
|
83
|
+
sx: {
|
|
84
|
+
position: "absolute",
|
|
85
|
+
top: !(bite !== null && bite !== void 0 && bite.audioDuration) ? "30px" : "42px",
|
|
86
|
+
right: "5px",
|
|
87
|
+
padding: "0"
|
|
88
|
+
}
|
|
89
|
+
}, /*#__PURE__*/React.createElement(UnsafeIcon, {
|
|
90
|
+
sx: {
|
|
91
|
+
fontSize: "18px",
|
|
92
|
+
color: "ibisRed.main"
|
|
93
|
+
}
|
|
94
|
+
}))), /*#__PURE__*/React.createElement(Stack, {
|
|
95
|
+
direction: "row",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
justifyContent: "space-between",
|
|
98
|
+
sx: {
|
|
99
|
+
overflow: "hidden",
|
|
100
|
+
borderRadius: "12px",
|
|
101
|
+
height: "24px",
|
|
102
|
+
position: "relative",
|
|
103
|
+
left: "2px"
|
|
104
|
+
}
|
|
105
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
106
|
+
sx: {
|
|
107
|
+
backgroundColor: "white.main",
|
|
108
|
+
opacity: ".4",
|
|
109
|
+
position: "absolute",
|
|
110
|
+
top: "0",
|
|
111
|
+
bottom: "0",
|
|
112
|
+
left: "0",
|
|
113
|
+
right: "0"
|
|
114
|
+
}
|
|
115
|
+
}), bite !== null && bite !== void 0 && bite.saved ? /*#__PURE__*/React.createElement(IconButton, {
|
|
116
|
+
onClick: e => {
|
|
117
|
+
e.stopPropagation();
|
|
118
|
+
getUserReactions();
|
|
119
|
+
setOpenSave(true);
|
|
120
|
+
},
|
|
121
|
+
sx: {
|
|
122
|
+
color: "notBlack.main",
|
|
123
|
+
padding: "2px"
|
|
124
|
+
}
|
|
125
|
+
}, /*#__PURE__*/React.createElement(BookmarkOutlinedIcon, {
|
|
126
|
+
fontSize: "small"
|
|
127
|
+
})) : /*#__PURE__*/React.createElement(IconButton, {
|
|
128
|
+
onClick: e => {
|
|
129
|
+
e.stopPropagation();
|
|
130
|
+
getUserReactions();
|
|
131
|
+
handleClickSave();
|
|
132
|
+
setOpenSave(true);
|
|
133
|
+
},
|
|
134
|
+
sx: {
|
|
135
|
+
color: "notBlack.main",
|
|
136
|
+
padding: "2px"
|
|
137
|
+
}
|
|
138
|
+
}, /*#__PURE__*/React.createElement(BookmarkAddRounded, {
|
|
139
|
+
fontSize: "small"
|
|
140
|
+
})), !!(sizeParams.buttonSize === "small" && !(bite !== null && bite !== void 0 && (_bite$topReactions = bite.topReactions) !== null && _bite$topReactions !== void 0 && _bite$topReactions.length) || sizeParams.buttonSize !== "small") && /*#__PURE__*/React.createElement(Text, {
|
|
141
|
+
color: "notBlack.main",
|
|
142
|
+
fontWeight: "light",
|
|
143
|
+
fontSize: "12px",
|
|
144
|
+
marginRight: "8px",
|
|
145
|
+
sx: {
|
|
146
|
+
zIndex: "1"
|
|
147
|
+
}
|
|
148
|
+
}, formatNumber((bite === null || bite === void 0 ? void 0 : bite.totalSaveCount) > 0 ? bite === null || bite === void 0 ? void 0 : bite.totalSaveCount : "")), !!(bite !== null && bite !== void 0 && (_bite$topReactions2 = bite.topReactions) !== null && _bite$topReactions2 !== void 0 && _bite$topReactions2.length) && /*#__PURE__*/React.createElement(Stack, {
|
|
149
|
+
direction: "row",
|
|
150
|
+
alignItems: "center",
|
|
151
|
+
position: "relative",
|
|
152
|
+
width: "40px",
|
|
153
|
+
height: "20px"
|
|
154
|
+
}, bite === null || bite === void 0 ? void 0 : (_bite$topReactions3 = bite.topReactions) === null || _bite$topReactions3 === void 0 ? void 0 : _bite$topReactions3.map((reaction, index) => /*#__PURE__*/React.createElement(Tooltip, {
|
|
155
|
+
title: reaction
|
|
156
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
157
|
+
alt: reaction,
|
|
158
|
+
className: "reaction-icon-blrp",
|
|
159
|
+
style: {
|
|
160
|
+
width: "16px",
|
|
161
|
+
height: "16px",
|
|
162
|
+
position: "relative",
|
|
163
|
+
margin: "-3px",
|
|
164
|
+
zIndex: index
|
|
165
|
+
},
|
|
166
|
+
src: reactionIconUrls[reaction]
|
|
167
|
+
})))), isPremium ? /*#__PURE__*/React.createElement(DiamondIcon, {
|
|
168
|
+
sx: {
|
|
169
|
+
width: "16px",
|
|
170
|
+
marginRight: "4px",
|
|
171
|
+
zIndex: "1"
|
|
172
|
+
}
|
|
173
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(Stack, {
|
|
174
|
+
direction: "row",
|
|
175
|
+
alignItems: "center",
|
|
176
|
+
justifyContent: "space-between"
|
|
177
|
+
}, bite.edgeType === "NewTwitchBiteEdge" && /*#__PURE__*/React.createElement(Tooltip, {
|
|
178
|
+
title: "Featured on Twitch Bits"
|
|
179
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
180
|
+
sx: {
|
|
181
|
+
alignItems: "center",
|
|
182
|
+
margin: "5px"
|
|
183
|
+
}
|
|
184
|
+
}, /*#__PURE__*/React.createElement(TwitchBitIcon, {
|
|
185
|
+
sx: {
|
|
186
|
+
zIndex: "1",
|
|
187
|
+
fontSize: "18px"
|
|
188
|
+
}
|
|
189
|
+
}))), bite.edgeType === "ChannelPointsBiteEdge" && /*#__PURE__*/React.createElement(Tooltip, {
|
|
190
|
+
title: "Featured on Twitch Channel Points"
|
|
191
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
192
|
+
sx: {
|
|
193
|
+
alignItems: "center",
|
|
194
|
+
margin: "5px"
|
|
195
|
+
}
|
|
196
|
+
}, /*#__PURE__*/React.createElement(ChannelPointsIcon, {
|
|
197
|
+
sx: {
|
|
198
|
+
zIndex: "1",
|
|
199
|
+
fontSize: "18px"
|
|
200
|
+
}
|
|
201
|
+
}))), (bite.visibility !== "PUBLIC" || !isOwner) && /*#__PURE__*/React.createElement("div", null), bite.visibility !== "PUBLIC" && /*#__PURE__*/React.createElement(Stack, {
|
|
202
|
+
direction: "row",
|
|
203
|
+
sx: {
|
|
204
|
+
alignItems: "center",
|
|
205
|
+
margin: "5px"
|
|
206
|
+
}
|
|
207
|
+
}, bite.visibility === "UNLISTED" && /*#__PURE__*/React.createElement(Tooltip, {
|
|
208
|
+
title: "Unlisted"
|
|
209
|
+
}, /*#__PURE__*/React.createElement(VisibilityOffRoundedIcon, {
|
|
210
|
+
sx: {
|
|
211
|
+
fontSize: "15px"
|
|
212
|
+
}
|
|
213
|
+
})), bite.visibility === "PRIVATE" && isOwner && /*#__PURE__*/React.createElement(Tooltip, {
|
|
214
|
+
title: "Private"
|
|
215
|
+
}, /*#__PURE__*/React.createElement(LockRoundedIcon, {
|
|
216
|
+
sx: {
|
|
217
|
+
fontSize: "15px"
|
|
218
|
+
}
|
|
219
|
+
}))), secondaryActionButton ? secondaryActionButton : /*#__PURE__*/React.createElement(React.Fragment, null, isBlerpHovered ? /*#__PURE__*/React.createElement(IconButton, {
|
|
220
|
+
onClick: e => {
|
|
221
|
+
handleClickThreeDot(e);
|
|
222
|
+
},
|
|
223
|
+
sx: {
|
|
224
|
+
color: "notBlack.main",
|
|
225
|
+
padding: "0px",
|
|
226
|
+
zIndex: "2",
|
|
227
|
+
position: "relative",
|
|
228
|
+
right: "4px",
|
|
229
|
+
"&:hover": {
|
|
230
|
+
backgroundColor: "grey3.main"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}, /*#__PURE__*/React.createElement(MoreHorizRoundedIcon, null)) : /*#__PURE__*/React.createElement(React.Fragment, null))));
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export default BlerpTopRow;
|