@blerp/design 1.3.16 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
  2. package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
  3. package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
  4. package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
  5. package/dist/cjs/Blerp.js +9 -16
  6. package/dist/cjs/BlerpAudioContextProvider.js +2 -2
  7. package/dist/cjs/BlerpListView.js +318 -168
  8. package/dist/cjs/BlerpListViewPremium.js +155 -130
  9. package/dist/cjs/BlerpListViewSkeleton.js +60 -13
  10. package/dist/cjs/BlerpSkeleton.js +32 -9
  11. package/dist/cjs/CollectionCard.js +139 -60
  12. package/dist/cjs/CollectionListViewPremium.js +368 -297
  13. package/dist/cjs/CollectionSkeleton.js +74 -13
  14. package/dist/cjs/Dropdown.js +272 -172
  15. package/dist/cjs/EllipsisLoader.js +66 -21
  16. package/dist/cjs/GroupCard.js +64 -57
  17. package/dist/cjs/Icons/Icons.js +288 -426
  18. package/dist/cjs/ImageEditor.js +247 -0
  19. package/dist/cjs/ImageUpload.js +226 -0
  20. package/dist/cjs/NewBlerp.js +354 -160
  21. package/dist/cjs/NewBlerpTest.js +10 -792
  22. package/dist/cjs/NewCollectionModal.js +294 -310
  23. package/dist/cjs/PremiumCollectionCard.js +191 -454
  24. package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
  25. package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
  26. package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
  27. package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
  28. package/dist/cjs/ReactionButtons.js +26 -13
  29. package/dist/cjs/SnackbarContextProvider.js +200 -116
  30. package/dist/cjs/Theme.js +217 -90
  31. package/dist/cjs/Toggle.js +86 -32
  32. package/dist/cjs/UserCard.js +13 -32
  33. package/dist/cjs/UserPage/LibraryControls.js +180 -93
  34. package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
  35. package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
  36. package/dist/cjs/UsernameWithPopout.js +12 -8
  37. package/dist/cjs/colors.js +15 -8
  38. package/dist/cjs/helpers.js +131 -0
  39. package/dist/cjs/index.js +98 -52
  40. package/dist/cjs/neo-components/Autocomplete.js +280 -0
  41. package/dist/cjs/neo-components/BottomNavigation.js +120 -0
  42. package/dist/cjs/neo-components/Box.js +48 -0
  43. package/dist/cjs/neo-components/Button.js +206 -0
  44. package/dist/cjs/neo-components/CircularProgress.js +92 -0
  45. package/dist/cjs/neo-components/Container.js +75 -0
  46. package/dist/cjs/neo-components/Dialog.js +441 -0
  47. package/dist/cjs/neo-components/Fab.js +237 -0
  48. package/dist/cjs/neo-components/FormControls.js +1057 -0
  49. package/dist/cjs/neo-components/Grid.js +256 -0
  50. package/dist/cjs/neo-components/IconButton.js +111 -0
  51. package/dist/cjs/neo-components/Input.js +493 -0
  52. package/dist/cjs/neo-components/Layout.js +1213 -0
  53. package/dist/cjs/neo-components/Misc.js +858 -0
  54. package/dist/cjs/neo-components/Navigation.js +1578 -0
  55. package/dist/cjs/neo-components/Paper.js +256 -0
  56. package/dist/cjs/neo-components/Stack.js +194 -0
  57. package/dist/cjs/neo-components/Stepper.js +291 -0
  58. package/dist/cjs/neo-components/Text.js +290 -0
  59. package/dist/cjs/neo-components/ThemeProvider.js +731 -0
  60. package/dist/cjs/neo-components/ToggleButton.js +223 -0
  61. package/dist/cjs/neo-components/createTheme.js +306 -0
  62. package/dist/cjs/neo-components/withSx.js +164 -0
  63. package/dist/cjs/neo-utils/sxToStyle.js +508 -0
  64. package/dist/esm/Blerp/BlerpImageRow.js +166 -46
  65. package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
  66. package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
  67. package/dist/esm/Blerp/BlerpTopRow.js +85 -16
  68. package/dist/esm/Blerp.js +4 -12
  69. package/dist/esm/BlerpAudioContextProvider.js +1 -2
  70. package/dist/esm/BlerpListView.js +313 -160
  71. package/dist/esm/BlerpListViewPremium.js +135 -109
  72. package/dist/esm/BlerpListViewSkeleton.js +60 -11
  73. package/dist/esm/BlerpSkeleton.js +32 -7
  74. package/dist/esm/CollectionCard.js +118 -38
  75. package/dist/esm/CollectionListViewPremium.js +367 -294
  76. package/dist/esm/CollectionSkeleton.js +73 -11
  77. package/dist/esm/Dropdown.js +260 -161
  78. package/dist/esm/EllipsisLoader.js +63 -18
  79. package/dist/esm/GroupCard.js +54 -46
  80. package/dist/esm/Icons/Icons.js +226 -367
  81. package/dist/esm/ImageEditor.js +240 -0
  82. package/dist/esm/ImageUpload.js +217 -0
  83. package/dist/esm/NewBlerp.js +282 -79
  84. package/dist/esm/NewBlerpTest.js +11 -781
  85. package/dist/esm/NewCollectionModal.js +289 -304
  86. package/dist/esm/PremiumCollectionCard.js +192 -451
  87. package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
  88. package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
  89. package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
  90. package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
  91. package/dist/esm/ReactionButtons.js +23 -8
  92. package/dist/esm/SnackbarContextProvider.js +196 -110
  93. package/dist/esm/Theme.js +187 -66
  94. package/dist/esm/Toggle.js +84 -29
  95. package/dist/esm/UserCard.js +1 -20
  96. package/dist/esm/UserPage/LibraryControls.js +159 -65
  97. package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
  98. package/dist/esm/UserPage/UserProfileHeader.js +100 -79
  99. package/dist/esm/UsernameWithPopout.js +7 -4
  100. package/dist/esm/colors.js +11 -9
  101. package/dist/esm/helpers.js +122 -0
  102. package/dist/esm/icons.js +1 -1
  103. package/dist/esm/index.js +39 -3
  104. package/dist/esm/neo-components/Autocomplete.js +269 -0
  105. package/dist/esm/neo-components/BottomNavigation.js +109 -0
  106. package/dist/esm/neo-components/Box.js +36 -0
  107. package/dist/esm/neo-components/Button.js +194 -0
  108. package/dist/esm/neo-components/CircularProgress.js +81 -0
  109. package/dist/esm/neo-components/Container.js +63 -0
  110. package/dist/esm/neo-components/Dialog.js +423 -0
  111. package/dist/esm/neo-components/Fab.js +225 -0
  112. package/dist/esm/neo-components/FormControls.js +1041 -0
  113. package/dist/esm/neo-components/Grid.js +244 -0
  114. package/dist/esm/neo-components/IconButton.js +99 -0
  115. package/dist/esm/neo-components/Input.js +478 -0
  116. package/dist/esm/neo-components/Layout.js +1179 -0
  117. package/dist/esm/neo-components/Misc.js +840 -0
  118. package/dist/esm/neo-components/Navigation.js +1556 -0
  119. package/dist/esm/neo-components/Paper.js +243 -0
  120. package/dist/esm/neo-components/Stack.js +182 -0
  121. package/dist/esm/neo-components/Stepper.js +278 -0
  122. package/dist/esm/neo-components/Text.js +277 -0
  123. package/dist/esm/neo-components/ThemeProvider.js +718 -0
  124. package/dist/esm/neo-components/ToggleButton.js +214 -0
  125. package/dist/esm/neo-components/createTheme.js +297 -0
  126. package/dist/esm/neo-components/withSx.js +153 -0
  127. package/dist/esm/neo-utils/sxToStyle.js +502 -0
  128. package/package.json +19 -15
@@ -1,48 +1,50 @@
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';
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
- 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 => {
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
- 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
19
+ path,
20
+ sx,
21
+ size = "24px"
22
+ } = _ref,
23
+ props = _objectWithoutProperties(_ref, _excluded);
39
24
 
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;
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
- } = _ref4;
58
- useState(false); // Will use this exclusively for picking colors from image...no ColorExtractor
59
-
59
+ } = _ref2;
60
+ const [isHovered, setIsHovered] = useState(false);
60
61
  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);
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
- height: 48,
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 if (size.width > 900) {
98
+ } else {
117
99
  sizeParams = largeSize;
118
100
  }
119
101
  } 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
- }
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
- /* 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
- }
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
- onClick: e => {
265
- console.log("handle non-linkTitle click here");
317
+ "@media (max-width: 600px)": {
318
+ maxWidth: "133px"
266
319
  }
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"
320
+ },
321
+ onClick: e => {
322
+ if (handleClickTitle) {
323
+ e.stopPropagation();
324
+ handleClickTitle();
316
325
  }
317
- })), secondaryActionButton || /*#__PURE__*/React.createElement(IconButton, {
318
- id: "second-button",
319
- onClick: e => {
320
- console.log("handle secondary button click here");
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
- 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
- }
338
+ "@media (max-width: 600px)": {
339
+ maxWidth: "133px"
328
340
  }
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"
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
- }))))), (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
- );
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 CollectionListViewPremium;
354
- export { CollectionListViewPremium };
427
+ export { CollectionListViewPremium, CollectionListViewPremium as default };