@blerp/design 1.2.74 → 1.2.76

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.
Files changed (83) hide show
  1. package/dist/cjs/Blerp/BlerpImageRow.js +167 -0
  2. package/dist/cjs/Blerp/BlerpSavePopup.js +157 -0
  3. package/dist/cjs/Blerp/BlerpTitleRow.js +116 -0
  4. package/dist/cjs/Blerp/BlerpTopRow.js +246 -0
  5. package/dist/cjs/Blerp.js +239 -0
  6. package/dist/cjs/BlerpAudioContextProvider.js +141 -0
  7. package/dist/cjs/BlerpListView.js +357 -0
  8. package/dist/cjs/BlerpListViewPremium.js +404 -0
  9. package/dist/cjs/BlerpListViewSkeleton.js +27 -0
  10. package/dist/cjs/BlerpSkeleton.js +23 -0
  11. package/dist/cjs/CollectionCard.js +402 -0
  12. package/dist/cjs/CollectionListViewPremium.js +368 -0
  13. package/dist/cjs/CollectionSkeleton.js +28 -0
  14. package/dist/cjs/Dropdown.js +283 -0
  15. package/dist/cjs/EllipsisLoader.js +51 -0
  16. package/dist/cjs/GroupCard.js +172 -0
  17. package/dist/cjs/Icons/Icons.js +606 -0
  18. package/dist/cjs/ImageUploadModal.js +278 -0
  19. package/dist/cjs/Lotties/JiggleLock.json.js +2762 -0
  20. package/dist/cjs/Lotties/LottieAnimation.js +32 -0
  21. package/dist/cjs/NewBlerp.js +740 -0
  22. package/dist/cjs/NewBlerpTest.js +808 -0
  23. package/dist/cjs/NewCollectionModal.js +403 -0
  24. package/dist/cjs/PremiumCollectionCard.js +511 -0
  25. package/dist/cjs/PurchaseModals/CheckoutModal.js +39 -0
  26. package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +39 -0
  27. package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +39 -0
  28. package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +39 -0
  29. package/dist/cjs/ReactionButtons.js +65 -0
  30. package/dist/cjs/ScreenSizeHook.js +34 -0
  31. package/dist/cjs/SnackbarContextProvider.js +166 -0
  32. package/dist/cjs/Theme.js +255 -0
  33. package/dist/cjs/Toggle.js +59 -0
  34. package/dist/cjs/UserCard.js +141 -0
  35. package/dist/cjs/UserPage/LibraryControls.js +315 -0
  36. package/dist/cjs/UserPage/UserLibraryHeader.js +93 -0
  37. package/dist/cjs/UserPage/UserProfileHeader.js +283 -0
  38. package/dist/cjs/UsernameWithPopout.js +93 -0
  39. package/dist/cjs/colors.js +368 -0
  40. package/dist/cjs/icons.js +161 -0
  41. package/dist/cjs/index.js +449 -0
  42. package/dist/esm/Blerp/BlerpImageRow.js +157 -0
  43. package/dist/esm/Blerp/BlerpSavePopup.js +147 -0
  44. package/dist/esm/Blerp/BlerpTitleRow.js +108 -0
  45. package/dist/esm/Blerp/BlerpTopRow.js +236 -0
  46. package/dist/esm/Blerp.js +230 -0
  47. package/dist/esm/BlerpAudioContextProvider.js +132 -0
  48. package/dist/esm/BlerpListView.js +344 -0
  49. package/dist/esm/BlerpListViewPremium.js +391 -0
  50. package/dist/esm/BlerpListViewSkeleton.js +17 -0
  51. package/dist/esm/BlerpSkeleton.js +13 -0
  52. package/dist/esm/CollectionCard.js +392 -0
  53. package/dist/esm/CollectionListViewPremium.js +354 -0
  54. package/dist/esm/CollectionSkeleton.js +18 -0
  55. package/dist/esm/Dropdown.js +273 -0
  56. package/dist/esm/EllipsisLoader.js +41 -0
  57. package/dist/esm/GroupCard.js +162 -0
  58. package/dist/esm/Icons/Icons.js +571 -0
  59. package/dist/esm/ImageUploadModal.js +265 -0
  60. package/dist/esm/Lotties/JiggleLock.json.js +2747 -0
  61. package/dist/esm/Lotties/LottieAnimation.js +25 -0
  62. package/dist/esm/NewBlerp.js +719 -0
  63. package/dist/esm/NewBlerpTest.js +787 -0
  64. package/dist/esm/NewCollectionModal.js +391 -0
  65. package/dist/esm/PremiumCollectionCard.js +498 -0
  66. package/dist/esm/PurchaseModals/CheckoutModal.js +33 -0
  67. package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +33 -0
  68. package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +33 -0
  69. package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +33 -0
  70. package/dist/esm/ReactionButtons.js +57 -0
  71. package/dist/esm/ScreenSizeHook.js +30 -0
  72. package/dist/esm/SnackbarContextProvider.js +154 -0
  73. package/dist/esm/Theme.js +246 -0
  74. package/dist/esm/Toggle.js +49 -0
  75. package/dist/esm/UserCard.js +133 -0
  76. package/dist/esm/UserPage/LibraryControls.js +301 -0
  77. package/dist/esm/UserPage/UserLibraryHeader.js +87 -0
  78. package/dist/esm/UserPage/UserProfileHeader.js +268 -0
  79. package/dist/esm/UsernameWithPopout.js +85 -0
  80. package/dist/esm/colors.js +360 -0
  81. package/dist/esm/icons.js +159 -0
  82. package/dist/esm/index.js +336 -0
  83. package/package.json +2 -1
@@ -0,0 +1,354 @@
1
+ import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
2
+ import BookmarkAddOutlinedIcon from '@mui/icons-material/BookmarkAddOutlined';
3
+ import BookmarkOutlinedIcon from '@mui/icons-material/BookmarkOutlined';
4
+ import KeyboardArrowRightRoundedIcon from '@mui/icons-material/KeyboardArrowRightRounded';
5
+ import LockRoundedIcon from '@mui/icons-material/LockRounded';
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';
11
+ import { useWindowSize } from './ScreenSizeHook.js';
12
+ import { DiamondIcon } from './Icons/Icons.js';
13
+
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
15
+ const MasterContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n /* The extra 4 pixels accounts for the width of the border in the transparent BlerpListView border */\n height: ", ";\n width: ", ";\n min-width: ", ";\n border-radius: 8px;\n background-origin: border-box;\n background-clip: content-box, border-box;\n box-shadow: 2px 2px 4px 0px #999999a1;\n position: relative;\n\n #second-button {\n opacity: 0;\n margin-left: 0px;\n margin-right: 15px;\n }\n\n :hover #yellow-border {\n opacity: 1;\n }\n :hover #second-button {\n opacity: 1;\n margin-left: 5px;\n margin-right: 10px;\n }\n :hover #mid-box {\n width: 96%;\n }\n :hover #back-box {\n width: ", ";\n }\n"])), _ref => {
16
+ let {
17
+ sizeParams
18
+ } = _ref;
19
+ return (sizeParams.height += 2) + "px";
20
+ }, _ref2 => {
21
+ let {
22
+ sizeParams
23
+ } = _ref2;
24
+ return sizeParams.width;
25
+ }, _ref3 => {
26
+ let {
27
+ fluid
28
+ } = _ref3;
29
+ return fluid ? "300px" : "0";
30
+ }, props => props.owned ? "102%" : "100%");
31
+ const YellowHoverBorder = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n height: 113%;\n width: 102%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border: 3px solid rgb(255, 225, 76);\n border-radius: 14px;\n transition: opacity 0.2s ease-in-out;\n opacity: 0;\n"])));
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
39
+
40
+ const SaveBox = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: relative;\n border-radius: 4px;\n transition: 0.2s;\n box-shadow: 0px 0px 0px 0px #999999a1;\n cursor: pointer;\n\n &:hover {\n transform: scale(1.05);\n }\n"])));
41
+ const SaveBoxTop = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n z-index: 5;\n width: 100%;\n position: relative;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n transition: 0.4s;\n\n &:hover {\n background-color: ", "98;\n }\n"])), props => props.theme.colors.notBlackOverride);
42
+ const SaveBoxTopDarken = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n opacity: 1;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n border-radius: 4px;\n"])));
43
+ const SaveBoxShadowSquare = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n border-radius: 4px;\n ", ";\n"])), props => props.depth === "1" ? "\n transform: skewX(-5deg); \n left: 2px; \n height: 94%; \n bottom: 0" : props.depth === "2" ? "\n transform: skewX(-12deg); \n left: 5px; \n height: 83%; \n width:97%;\n bottom: 0" : "");
44
+ const CollectionListViewPremium = _ref4 => {
45
+ var _collection$image, _collection$image$ori, _collection$image2, _collection$image2$or;
46
+
47
+ let {
48
+ collection,
49
+ variantSize,
50
+ extraInfoComponent,
51
+ primaryActionButton,
52
+ secondaryActionButton,
53
+ handleClickBackground,
54
+ handleClickTitle,
55
+ isLinkTitle,
56
+ fluid
57
+ } = _ref4;
58
+ useState(false); // Will use this exclusively for picking colors from image...no ColorExtractor
59
+
60
+ const {
61
+ loading,
62
+ data,
63
+ error
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);
66
+ const size = useWindowSize();
67
+ console.log("Collleeeeection", collection);
68
+ let sizeParams;
69
+ const smallSize = {
70
+ width: "300px",
71
+ height: 40,
72
+ fontSize: "16px",
73
+ saveBoxSize: "36px",
74
+ reactionSpacing: 1,
75
+ reactionPadding: "3px",
76
+ reactionSize: "20px",
77
+ buttonSize: "small"
78
+ };
79
+ const mediumSize = {
80
+ width: "375px",
81
+ height: 48,
82
+ fontSize: "18px",
83
+ saveBoxSize: "44px",
84
+ reactionSpacing: 1,
85
+ reactionPadding: "3px",
86
+ reactionSize: "23px",
87
+ buttonSize: "medium"
88
+ };
89
+ const largeSize = {
90
+ width: "440px",
91
+ height: 56,
92
+ fontSize: "20px",
93
+ saveBoxSize: "52px",
94
+ reactionSpacing: 1,
95
+ reactionPadding: "5px",
96
+ reactionSize: "30px",
97
+ buttonFontSize: "large"
98
+ };
99
+
100
+ if (!variantSize) {
101
+ if (fluid) {
102
+ sizeParams = {
103
+ width: "100%",
104
+ height: 48,
105
+ fontSize: "18px",
106
+ saveBoxSize: "44px",
107
+ reactionSpacing: 1,
108
+ reactionPadding: "3px",
109
+ reactionSize: "23px",
110
+ buttonSize: "medium"
111
+ };
112
+ } else if (size.width <= 400) {
113
+ sizeParams = smallSize;
114
+ } else if (size.width <= 900) {
115
+ sizeParams = mediumSize;
116
+ } else if (size.width > 900) {
117
+ sizeParams = largeSize;
118
+ }
119
+ } else {
120
+ if (variantSize === "small") {
121
+ sizeParams = smallSize;
122
+ } else if (variantSize === "medium") {
123
+ console.log(variantSize);
124
+ sizeParams = mediumSize;
125
+ } else if (variantSize === "large") {
126
+ sizeParams = largeSize;
127
+ }
128
+ }
129
+
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
+
134
+ /* BIG PICTURE OF COMPONENT:
135
+ Master Container
136
+ - TopBox (solid white background)
137
+ - PhotoBackground (if collection has photo)
138
+ - BlurBackground (always applied)
139
+ - Gradient Background (default is photo color --> black, fall back is white --> black)
140
+ - Interaction Box (holds clickable elements)
141
+ - MidBox (first "shadow")
142
+ - BackBox (second "shadow")
143
+ */
144
+ React.createElement(MasterContainer, {
145
+ owned: collection === null || collection === void 0 ? void 0 : collection.owned,
146
+ sizeParams: sizeParams,
147
+ fluid: fluid
148
+ }, !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement(YellowHoverBorder, {
149
+ id: "yellow-border"
150
+ }), /*#__PURE__*/React.createElement(TopBox, {
151
+ onClick: e => {
152
+ e.stopPropagation();
153
+ handleClickBackground();
154
+ },
155
+ style: {
156
+ borderBottomColor: extraInfoComponent && theme.colors.grey3,
157
+ width: !(collection !== null && collection !== void 0 && collection.owned) ? "100%" : "90%"
158
+ }
159
+ }, /*#__PURE__*/React.createElement(PhotoBackground, {
160
+ url: 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
161
+ }), /*#__PURE__*/React.createElement(BlurBackground, null), /*#__PURE__*/React.createElement(GradientBackground, {
162
+ style: {
163
+ background: "linear-gradient(135deg,".concat(data.vibrant || "rgb(204,204,204)", ", #444444)")
164
+ }
165
+ }), /*#__PURE__*/React.createElement(InteractionBox, {
166
+ style: {
167
+ borderBottomColor: extraInfoComponent && theme.colors.grey3
168
+ }
169
+ }, /*#__PURE__*/React.createElement(Stack, {
170
+ direction: "row",
171
+ justifyContent: "flex-start",
172
+ alignItems: "center",
173
+ sx: {
174
+ position: "relative",
175
+ width: "calc(100% - 180px)",
176
+ left: "2px"
177
+ }
178
+ }, /*#__PURE__*/React.createElement(SaveBox, {
179
+ style: {
180
+ width: sizeParams.saveBoxSize,
181
+ height: sizeParams.saveBoxSize
182
+ },
183
+ onClick: e => {
184
+ console.log("handle save/unsave here");
185
+ }
186
+ }, /*#__PURE__*/React.createElement(SaveBoxTop, {
187
+ style: {
188
+ width: sizeParams.saveBoxSize,
189
+ height: sizeParams.saveBoxSize,
190
+ background: data.darkVibrant || "#999999"
191
+ }
192
+ }, /*#__PURE__*/React.createElement(SaveBoxTopDarken, {
193
+ style: {
194
+ background: "linear-gradient(".concat("rgba(0,0,0,0)", ", #000000)")
195
+ }
196
+ }), collection !== null && collection !== void 0 && collection.saved ? /*#__PURE__*/React.createElement(BookmarkOutlinedIcon, {
197
+ sx: {
198
+ width: "30px",
199
+ height: "30px",
200
+ color: "white.override",
201
+ position: "relative",
202
+ bottom: "1px"
203
+ }
204
+ }) : /*#__PURE__*/React.createElement(BookmarkAddOutlinedIcon, {
205
+ sx: {
206
+ width: "30px",
207
+ height: "30px",
208
+ color: "white.override",
209
+ position: "relative",
210
+ bottom: "1px"
211
+ }
212
+ })), !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement(SaveBoxShadowSquare, {
213
+ depth: "2",
214
+ style: {
215
+ background: "linear-gradient(".concat(data.darkVibrant || "rgba(180,180,180,1)", ", rgba(0,0,0,1))")
216
+ }
217
+ }), !(collection !== null && collection !== void 0 && collection.owned) && /*#__PURE__*/React.createElement(SaveBoxShadowSquare, {
218
+ depth: "1",
219
+ style: {
220
+ background: "linear-gradient(".concat(data.darkVibrant || "rgba(230,230,230,1)", ", rgba(0,0,0,0))")
221
+ }
222
+ })), isLinkTitle ? /*#__PURE__*/React.createElement("a", {
223
+ href: "/sound-collection/".concat(collection._id),
224
+ style: {
225
+ textDecoration: "none",
226
+ width: "calc(95% - ".concat(sizeParams.saveBoxSize, ")"),
227
+ position: "relative",
228
+ left: "12px"
229
+ }
230
+ }, /*#__PURE__*/React.createElement(Text, {
231
+ textAlign: "left",
232
+ fontSize: sizeParams.fontSize,
233
+ noWrap: true,
234
+ color: collection !== null && collection !== void 0 && collection.image ? "white.override" : "notBlack",
235
+ sx: {
236
+ ":hover": {
237
+ textDecoration: handleClickTitle ? "underline" : "none"
238
+ },
239
+ "@media (max-width: 600px)": {
240
+ maxWidth: "133px"
241
+ }
242
+ },
243
+ onClick: e => {
244
+ if (handleClickTitle) {
245
+ e.stopPropagation();
246
+ handleClickTitle();
247
+ }
248
+ }
249
+ }, collection.title)) : /*#__PURE__*/React.createElement(Text, {
250
+ textAlign: "left",
251
+ fontSize: sizeParams.fontSize,
252
+ noWrap: true,
253
+ color: collection !== null && collection !== void 0 && collection.image ? "white.override" : "notBlack",
254
+ sx: {
255
+ position: "relative",
256
+ left: "12px",
257
+ ":hover": {
258
+ textDecoration: handleClickTitle ? "underline" : "none"
259
+ },
260
+ "@media (max-width: 600px)": {
261
+ maxWidth: "133px"
262
+ }
263
+ },
264
+ onClick: e => {
265
+ console.log("handle non-linkTitle click here");
266
+ }
267
+ }, collection.title)), /*#__PURE__*/React.createElement(Stack, {
268
+ direction: "row",
269
+ justifyContent: "flex-end",
270
+ alignItems: "center",
271
+ sx: {
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"
316
+ }
317
+ })), secondaryActionButton || /*#__PURE__*/React.createElement(IconButton, {
318
+ id: "second-button",
319
+ onClick: e => {
320
+ console.log("handle secondary button click here");
321
+ },
322
+ sx: {
323
+ padding: "5px",
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
+ }
328
+ }
329
+ }, /*#__PURE__*/React.createElement(Stack, {
330
+ sx: {
331
+ borderRadius: "20px",
332
+ position: "absolute",
333
+ top: "0",
334
+ bottom: "0",
335
+ left: "0",
336
+ right: "0",
337
+ backgroundColor: "notBlack.main",
338
+ opacity: ".5"
339
+ }
340
+ }), /*#__PURE__*/React.createElement(KeyboardArrowRightRoundedIcon, {
341
+ sx: {
342
+ zIndex: "2",
343
+ color: "white.override"
344
+ }
345
+ }))))), (collection === null || collection === void 0 ? void 0 : collection.owned) && /*#__PURE__*/React.createElement(MidBox, {
346
+ id: "mid-box"
347
+ }), (collection === null || collection === void 0 ? void 0 : collection.owned) && /*#__PURE__*/React.createElement(BackBox, {
348
+ id: "back-box"
349
+ }), extraInfoComponent && extraInfoComponent)
350
+ );
351
+ };
352
+
353
+ export default CollectionListViewPremium;
354
+ export { CollectionListViewPremium };
@@ -0,0 +1,18 @@
1
+ import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
2
+ import React from 'react';
3
+ import styled from 'styled-components';
4
+
5
+ var _templateObject, _templateObject2;
6
+ const FeaturedCollectionSkeleton = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n height: 200px;\n width: 200px;\n animation: pulse 3s ease-in-out infinite;\n @keyframes pulse {\n 0% {\n opacity: 0.7;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.7;\n }\n }\n"])));
7
+ const FeaturedCollectionSquare = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n border-radius: 8px;\n\n ", ";\n"])), props => props.depth === "1" ? "z-index: 5; background: ".concat(props.theme.colors.grey4, "; ") : props.depth === "2" ? "z-index: 4; \n background: ".concat(props.theme.colors.grey6, "; \n transform: skewX(-5deg); \n left: 8px; \n height: 94%; \n bottom: 0") : props.depth === "3" ? "background: ".concat(props.theme.colors.grey7, ";\n transform: skewX(-10deg); \n left: 15px; \n height: 87%; \n bottom: 0") : "background: ".concat(props.theme.colors.ibisRed));
8
+ const CollectionSkeleton = () => {
9
+ return /*#__PURE__*/React.createElement(FeaturedCollectionSkeleton, null, /*#__PURE__*/React.createElement(FeaturedCollectionSquare, {
10
+ depth: "1"
11
+ }), /*#__PURE__*/React.createElement(FeaturedCollectionSquare, {
12
+ depth: "2"
13
+ }), /*#__PURE__*/React.createElement(FeaturedCollectionSquare, {
14
+ depth: "3"
15
+ }));
16
+ };
17
+
18
+ export { CollectionSkeleton };
@@ -0,0 +1,273 @@
1
+ import React, { useState } from 'react';
2
+ import { Button, Text, Stack, Menu, MenuItem } from './index.js';
3
+ import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
4
+
5
+ // box-shadow: 0px 0px 20px #0000001a;
6
+ // div:focus {
7
+ // border: none !important;
8
+ // box-shadow: 0px 0px 20px #0000001a;
9
+ // }
10
+ // & .MuiPaper-root {
11
+ // background-color: ${(props) => props.theme.colors.grey3};
12
+ // }
13
+ // `;
14
+
15
+ const NewDropdown = _ref => {
16
+ let {
17
+ buttonTitle,
18
+ buttonLabel,
19
+ buttonStyle,
20
+ paperStyle,
21
+ buttonVariant,
22
+ handleOptionClicked,
23
+ startIcon,
24
+ endIcon,
25
+ options
26
+ } = _ref;
27
+ const [anchorEl, setAnchorEl] = useState(null);
28
+ const open = Boolean(anchorEl);
29
+
30
+ const handleClick = event => {
31
+ // console.log(options);
32
+ setAnchorEl(event.currentTarget);
33
+ };
34
+
35
+ const handleClose = () => {
36
+ setAnchorEl(null);
37
+ };
38
+
39
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
40
+ onClick: e => handleClick(e),
41
+ variant: "contained",
42
+ color: "waxwing",
43
+ icon: true,
44
+ disableElevation: true,
45
+ sx: {
46
+ borderRadius: "4px",
47
+ color: "notBlack.main",
48
+ padding: "14px",
49
+ position: "relative",
50
+ ...buttonStyle
51
+ }
52
+ }, buttonLabel && /*#__PURE__*/React.createElement(Text, {
53
+ noWrap: true,
54
+ fontSize: "0.75em",
55
+ color: "grey4.main",
56
+ fontWeight: "400",
57
+ sx: {
58
+ position: "absolute",
59
+ top: "-9px",
60
+ left: "10px",
61
+ padding: "0 5px",
62
+ backgroundColor: "inherit"
63
+ }
64
+ }, buttonLabel), /*#__PURE__*/React.createElement(Stack, {
65
+ direction: "row",
66
+ justifyContent: "space-between",
67
+ alignItems: "center",
68
+ width: "100%"
69
+ }, /*#__PURE__*/React.createElement(Stack, {
70
+ direction: "row",
71
+ alignItems: "center",
72
+ overflow: "hidden",
73
+ width: "".concat(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.getBoundingClientRect().width, "px")
74
+ }, startIcon, /*#__PURE__*/React.createElement(Stack, {
75
+ alignItems: "flex-start"
76
+ }, /*#__PURE__*/React.createElement(Text, {
77
+ noWrap: true,
78
+ fontSize: "1rem",
79
+ color: "grey5.main",
80
+ marginRight: "16px"
81
+ }, buttonTitle))), endIcon ? endIcon : /*#__PURE__*/React.createElement(KeyboardArrowDownRoundedIcon, {
82
+ sx: {
83
+ color: "grey5.main"
84
+ },
85
+ fontSize: "medium"
86
+ }))), /*#__PURE__*/React.createElement(Menu, {
87
+ id: "demo-customized-menu",
88
+ MenuListProps: {
89
+ "aria-labelledby": "demo-customized-button"
90
+ },
91
+ anchorEl: anchorEl,
92
+ open: open,
93
+ onClose: handleClose,
94
+ elevation: 0,
95
+ sx: {
96
+ top: "10px"
97
+ },
98
+ anchorOrigin: {
99
+ vertical: "bottom",
100
+ horizontal: "left"
101
+ },
102
+ transformOrigin: {
103
+ vertical: "top",
104
+ horizontal: "left"
105
+ },
106
+ PaperProps: {
107
+ sx: {
108
+ "& ul": {
109
+ padding: "0"
110
+ },
111
+ width: anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.getBoundingClientRect().width,
112
+ backgroundColor: "waxwing.main",
113
+ boxShadow: "0px 0px 20px #0000001a;",
114
+ ...paperStyle
115
+ }
116
+ }
117
+ }, options === null || options === void 0 ? void 0 : options.map(option => /*#__PURE__*/React.createElement(MenuItem, {
118
+ key: "dropdown-".concat(option.name),
119
+ selected: buttonTitle === option.name,
120
+ sx: {
121
+ borderRadius: "4px",
122
+ "&.Mui-selected": {
123
+ backgroundColor: "ibisRed.main"
124
+ },
125
+ ":hover": {
126
+ backgroundColor: "ibisRed.main"
127
+ },
128
+ ":hover p": {
129
+ color: "white.override"
130
+ },
131
+ "&.Mui-selected:hover": {
132
+ backgroundColor: "ibisRed.main"
133
+ },
134
+ "&.Mui-selected p": {
135
+ color: "white.override"
136
+ }
137
+ },
138
+ onClick: () => {
139
+ handleOptionClicked(option);
140
+ handleClose();
141
+ }
142
+ }, option.startImageIcon ? option.startImageIcon : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Text, {
143
+ noWrap: true
144
+ }, option.name), option.endImageIcon ? option.endImageIcon : /*#__PURE__*/React.createElement(React.Fragment, null)))));
145
+ };
146
+ const Dropdown = _ref2 => {
147
+ let {
148
+ buttonTitle,
149
+ buttonLabel,
150
+ buttonStyle,
151
+ paperStyle,
152
+ buttonVariant,
153
+ handleOptionClicked,
154
+ startIcon,
155
+ endIcon,
156
+ options
157
+ } = _ref2;
158
+ const [anchorEl, setAnchorEl] = useState(null);
159
+ const open = Boolean(anchorEl);
160
+
161
+ const handleClick = event => {
162
+ // console.log(options);
163
+ setAnchorEl(event.currentTarget);
164
+ };
165
+
166
+ const handleClose = () => {
167
+ setAnchorEl(null);
168
+ };
169
+
170
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
171
+ onClick: e => handleClick(e),
172
+ variant: "contained",
173
+ color: "waxwing",
174
+ icon: true,
175
+ disableElevation: true,
176
+ sx: {
177
+ borderRadius: "4px",
178
+ color: "notBlack.main",
179
+ paddingRight: "4px",
180
+ paddingLeft: "4px",
181
+ ...buttonStyle
182
+ }
183
+ }, /*#__PURE__*/React.createElement(Stack, {
184
+ direction: "row",
185
+ justifyContent: "space-between",
186
+ alignItems: "center",
187
+ width: "100%"
188
+ }, /*#__PURE__*/React.createElement(Stack, {
189
+ direction: "row",
190
+ alignItems: "center",
191
+ overflow: "hidden",
192
+ width: "".concat(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.getBoundingClientRect().width, "px")
193
+ }, startIcon, /*#__PURE__*/React.createElement(Stack, {
194
+ alignItems: "flex-start",
195
+ marginLeft: "12px"
196
+ }, buttonLabel && /*#__PURE__*/React.createElement(Text, {
197
+ noWrap: true,
198
+ fontSize: "8px",
199
+ color: "grey4.main",
200
+ fontWeight: "light"
201
+ }, buttonLabel), /*#__PURE__*/React.createElement(Text, {
202
+ noWrap: true,
203
+ fontSize: "14px",
204
+ color: "grey5.main",
205
+ marginRight: "16px"
206
+ }, buttonTitle))), endIcon ? endIcon : /*#__PURE__*/React.createElement(KeyboardArrowDownRoundedIcon, {
207
+ sx: {
208
+ color: "grey5.main"
209
+ },
210
+ fontSize: "medium"
211
+ }))), /*#__PURE__*/React.createElement(Menu, {
212
+ id: "demo-customized-menu",
213
+ MenuListProps: {
214
+ "aria-labelledby": "demo-customized-button"
215
+ },
216
+ anchorEl: anchorEl,
217
+ open: open,
218
+ onClose: handleClose,
219
+ elevation: 0,
220
+ sx: {
221
+ top: "10px"
222
+ },
223
+ anchorOrigin: {
224
+ vertical: "bottom",
225
+ horizontal: "left"
226
+ },
227
+ transformOrigin: {
228
+ vertical: "top",
229
+ horizontal: "left"
230
+ },
231
+ PaperProps: {
232
+ sx: {
233
+ "& ul": {
234
+ padding: "0"
235
+ },
236
+ width: anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.getBoundingClientRect().width,
237
+ backgroundColor: "waxwing.main",
238
+ boxShadow: "0px 0px 20px #0000001a;",
239
+ ...paperStyle
240
+ }
241
+ }
242
+ }, options === null || options === void 0 ? void 0 : options.map(option => /*#__PURE__*/React.createElement(MenuItem, {
243
+ key: "dropdown-".concat(option.name),
244
+ selected: buttonTitle === option.name,
245
+ sx: {
246
+ borderRadius: "4px",
247
+ "&.Mui-selected": {
248
+ backgroundColor: "ibisRed.main"
249
+ },
250
+ ":hover": {
251
+ backgroundColor: "ibisRed.main"
252
+ },
253
+ ":hover p": {
254
+ color: "white.override"
255
+ },
256
+ "&.Mui-selected:hover": {
257
+ backgroundColor: "ibisRed.main"
258
+ },
259
+ "&.Mui-selected p": {
260
+ color: "white.override"
261
+ }
262
+ },
263
+ onClick: () => {
264
+ handleOptionClicked(option);
265
+ handleClose();
266
+ }
267
+ }, option.startImageIcon ? option.startImageIcon : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Text, {
268
+ noWrap: true
269
+ }, option.name), option.endImageIcon ? option.endImageIcon : /*#__PURE__*/React.createElement(React.Fragment, null)))));
270
+ };
271
+
272
+ export default Dropdown;
273
+ export { Dropdown, NewDropdown };