@blerp/design 1.3.17 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +92 -58
  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 +32 -2
  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,17 +1,85 @@
1
- import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
2
- import { BookmarkRounded, BookmarkAddOutlined, AccountCircleRounded, LockRounded, VisibilityOffRounded } from '@mui/icons-material';
3
1
  import React, { useState } from 'react';
4
- import { usePalette } from 'react-palette';
5
- import { Box, Stack, IconButton, Tooltip, Text } from './index.js';
6
- import { PremiumCollectionCard } from './PremiumCollectionCard.js';
7
- import styled from 'styled-components';
2
+ import { Box, Stack, Tooltip, Text, IconButton } from './index.js';
3
+ import { Blerp } from './PremiumCollectionCard.js';
4
+ import { useCustomPalette } from './helpers.js';
8
5
  import { TwitchBitIcon } from './Icons/Icons.js';
9
6
 
10
- var _templateObject;
11
- const LineClamp = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin: 5px 0;\n max-width: 92%;\n"]))); //on background click
12
- //primary and secondary action buttons
7
+ const AccountCircleIcon = _ref => {
8
+ let {
9
+ sx = {}
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement("svg", {
12
+ width: sx.fontSize || 24,
13
+ height: sx.fontSize || 24,
14
+ viewBox: "0 0 24 24",
15
+ fill: "currentColor",
16
+ style: {
17
+ color: sx.color
18
+ }
19
+ }, /*#__PURE__*/React.createElement("path", {
20
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"
21
+ }));
22
+ };
23
+
24
+ const BookmarkIcon = _ref2 => {
25
+ let {
26
+ sx = {},
27
+ onClick
28
+ } = _ref2;
29
+ return /*#__PURE__*/React.createElement("svg", {
30
+ width: sx.fontSize || 24,
31
+ height: sx.fontSize || 24,
32
+ viewBox: "0 0 24 24",
33
+ fill: "currentColor",
34
+ onClick: onClick,
35
+ style: {
36
+ color: sx.color,
37
+ cursor: onClick ? "pointer" : "default"
38
+ }
39
+ }, /*#__PURE__*/React.createElement("path", {
40
+ d: "M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"
41
+ }));
42
+ };
43
+
44
+ const BookmarkIconIcon = _ref3 => {
45
+ let {
46
+ sx = {},
47
+ onClick
48
+ } = _ref3;
49
+ return /*#__PURE__*/React.createElement("svg", {
50
+ width: sx.fontSize || 24,
51
+ height: sx.fontSize || 24,
52
+ viewBox: "0 0 24 24",
53
+ fill: "currentColor",
54
+ onClick: onClick,
55
+ style: {
56
+ color: sx.color,
57
+ cursor: onClick ? "pointer" : "default"
58
+ }
59
+ }, /*#__PURE__*/React.createElement("path", {
60
+ d: "M17 11v6.97l-5-2.14-5 2.14V5h6V3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V11h-2zm4-4h-2v2h-2V7h-2V5h2V3h2v2h2v2z"
61
+ }));
62
+ };
63
+
64
+ const VisibilityOffIcon = _ref4 => {
65
+ let {
66
+ sx = {}
67
+ } = _ref4;
68
+ return /*#__PURE__*/React.createElement("svg", {
69
+ width: sx.fontSize || 24,
70
+ height: sx.fontSize || 24,
71
+ viewBox: "0 0 24 24",
72
+ fill: "currentColor",
73
+ style: {
74
+ color: sx.color,
75
+ marginLeft: sx.marginLeft
76
+ }
77
+ }, /*#__PURE__*/React.createElement("path", {
78
+ d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"
79
+ }));
80
+ };
13
81
 
14
- const CollectionCard = _ref => {
82
+ const CollectionCard = _ref6 => {
15
83
  var _collection$image, _collection$image$ori, _collection$image2, _collection$image2$or, _collection$image3, _collection$image3$or;
16
84
 
17
85
  let {
@@ -40,13 +108,13 @@ const CollectionCard = _ref => {
40
108
  bottomLeftIcon,
41
109
  handleClickBottomLeftIcon,
42
110
  premiumDiamondPill
43
- } = _ref;
111
+ } = _ref6;
44
112
  const [cardColors, setCardColors] = useState(null);
45
113
  const {
46
114
  data,
47
115
  loading,
48
116
  error
49
- } = usePalette((collection === null || collection === void 0 ? void 0 : collection.visibility) !== "PRIVATE" || isOwner ? 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 : "black");
117
+ } = useCustomPalette((collection === null || collection === void 0 ? void 0 : collection.visibility) !== "PRIVATE" || isOwner ? 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 : "black");
50
118
 
51
119
  const renderProfileImage = () => {
52
120
  var _collection$ownerObje, _collection$ownerObje2, _collection$ownerObje3, _collection$ownerObje4, _collection$ownerObje5, _collection$ownerObje6;
@@ -88,7 +156,7 @@ const CollectionCard = _ref => {
88
156
  borderRadius: "50%",
89
157
  pointerEvents: "none"
90
158
  }
91
- }) : /*#__PURE__*/React.createElement(AccountCircleRounded, {
159
+ }) : /*#__PURE__*/React.createElement(AccountCircleIcon, {
92
160
  sx: {
93
161
  fontSize: "16px",
94
162
  color: "white.override"
@@ -106,7 +174,7 @@ const CollectionCard = _ref => {
106
174
  backgroundColor: "grey3.override"
107
175
  }
108
176
  }
109
- }, collection !== null && collection !== void 0 && collection.saved ? /*#__PURE__*/React.createElement(BookmarkRounded, {
177
+ }, collection !== null && collection !== void 0 && collection.saved ? /*#__PURE__*/React.createElement(BookmarkIcon, {
110
178
  onClick: e => {
111
179
  e.stopPropagation();
112
180
  handleClickSave(false);
@@ -115,7 +183,7 @@ const CollectionCard = _ref => {
115
183
  fontSize: "16px",
116
184
  color: "white.override"
117
185
  }
118
- }) : /*#__PURE__*/React.createElement(BookmarkAddOutlined, {
186
+ }) : /*#__PURE__*/React.createElement(BookmarkIcon, {
119
187
  onClick: e => {
120
188
  e.stopPropagation();
121
189
  handleClickSave(true);
@@ -144,7 +212,7 @@ const CollectionCard = _ref => {
144
212
  }
145
213
 
146
214
  if (isPremium) {
147
- return /*#__PURE__*/React.createElement(PremiumCollectionCard, {
215
+ return /*#__PURE__*/React.createElement(Blerp, {
148
216
  collection: collection,
149
217
  variantSize: variantSize,
150
218
  handleClickBackground: handleClickBackground,
@@ -177,19 +245,7 @@ const CollectionCard = _ref => {
177
245
  display: "flex",
178
246
  alignItems: "center",
179
247
  width: fluid ? "80%" : sizeParams.width,
180
- height: fluid ? "80%" : sizeParams.height // ":hover #collection-background-1": {
181
- // transform: "rotate(7deg)",
182
- // height: "91%",
183
- // right: "-11px",
184
- // top: "12px",
185
- // },
186
- // ":hover #collection-background-2": {
187
- // transform: "rotate(14deg)",
188
- // height: "84%",
189
- // right: "-20px",
190
- // top: "24px",
191
- // },
192
-
248
+ height: fluid ? "80%" : sizeParams.height
193
249
  }
194
250
  }, /*#__PURE__*/React.createElement(Box, {
195
251
  onClick: () => {
@@ -287,15 +343,27 @@ const CollectionCard = _ref => {
287
343
  }
288
344
  }, renderPrimaryActionButton()), renderProfileImage(), /*#__PURE__*/React.createElement(Tooltip, {
289
345
  title: "This collection has been removed or hidden"
290
- }, /*#__PURE__*/React.createElement(LockRounded, {
346
+ }, /*#__PURE__*/React.createElement(BookmarkIconIcon, {
291
347
  sx: {
292
348
  color: "white.override",
293
349
  fontSize: "35px"
294
350
  }
295
- })), /*#__PURE__*/React.createElement(LineClamp, null, /*#__PURE__*/React.createElement(Text, {
351
+ })), /*#__PURE__*/React.createElement(Box, {
352
+ sx: {
353
+ display: "-webkit-box",
354
+ WebkitLineClamp: "1",
355
+ WebkitBoxOrient: "vertical",
356
+ overflow: "hidden",
357
+ margin: "5px 0",
358
+ maxWidth: "92%"
359
+ }
360
+ }, /*#__PURE__*/React.createElement(Text, {
296
361
  fontSize: fontSize ? fontSize : "22px",
297
362
  color: "white.override",
298
- textAlign: "center"
363
+ textAlign: "center",
364
+ sx: {
365
+ color: "white.override"
366
+ }
299
367
  }, collection === null || collection === void 0 ? void 0 : collection.title))) : /*#__PURE__*/React.createElement(Box, {
300
368
  sx: {
301
369
  backgroundImage: "linear-gradient(".concat(data.muted || "#000000", "7a, #0000007a), 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, ")"),
@@ -338,7 +406,7 @@ const CollectionCard = _ref => {
338
406
  }
339
407
  }))), (collection === null || collection === void 0 ? void 0 : collection.visibility) === "PRIVATE" && isOwner && /*#__PURE__*/React.createElement(Tooltip, {
340
408
  title: "Private"
341
- }, /*#__PURE__*/React.createElement(LockRounded, {
409
+ }, /*#__PURE__*/React.createElement(BookmarkIconIcon, {
342
410
  sx: {
343
411
  marginLeft: "4px",
344
412
  fontSize: "16px",
@@ -346,13 +414,22 @@ const CollectionCard = _ref => {
346
414
  }
347
415
  })), (collection === null || collection === void 0 ? void 0 : collection.visibility) === "UNLISTED" && /*#__PURE__*/React.createElement(Tooltip, {
348
416
  title: "Unlisted"
349
- }, /*#__PURE__*/React.createElement(VisibilityOffRounded, {
417
+ }, /*#__PURE__*/React.createElement(VisibilityOffIcon, {
350
418
  sx: {
351
419
  marginLeft: "4px",
352
420
  fontSize: "16px",
353
421
  color: "white.override"
354
422
  }
355
- }))), secondaryActionButton ? secondaryActionButton : renderProfileImage(), /*#__PURE__*/React.createElement(LineClamp, null, isLink ? /*#__PURE__*/React.createElement("a", {
423
+ }))), secondaryActionButton ? secondaryActionButton : renderProfileImage(), /*#__PURE__*/React.createElement(Box, {
424
+ sx: {
425
+ display: "-webkit-box",
426
+ WebkitLineClamp: "1",
427
+ WebkitBoxOrient: "vertical",
428
+ overflow: "hidden",
429
+ margin: "5px 0",
430
+ maxWidth: "92%"
431
+ }
432
+ }, isLink ? /*#__PURE__*/React.createElement("a", {
356
433
  href: "/sound-collection/".concat(collection._id),
357
434
  style: {
358
435
  color: "white",
@@ -363,6 +440,7 @@ const CollectionCard = _ref => {
363
440
  color: "white.override",
364
441
  textAlign: "center",
365
442
  sx: {
443
+ color: "white.override",
366
444
  ":hover": {
367
445
  textDecoration: "underline"
368
446
  }
@@ -370,7 +448,10 @@ const CollectionCard = _ref => {
370
448
  }, collection === null || collection === void 0 ? void 0 : collection.title)) : /*#__PURE__*/React.createElement(Text, {
371
449
  fontSize: fontSize ? fontSize : "22px",
372
450
  color: "white.override",
373
- textAlign: "center"
451
+ textAlign: "center",
452
+ sx: {
453
+ color: "white.override"
454
+ }
374
455
  }, collection === null || collection === void 0 ? void 0 : collection.title)))) : /*#__PURE__*/React.createElement(Box, {
375
456
  sx: {
376
457
  backgroundImage: "linear-gradient(".concat(cardColors ? cardColors[0] : "#000000", "7a, #0000004a), url(").concat(collection === null || collection === void 0 ? void 0 : (_collection$image3 = collection.image) === null || _collection$image3 === void 0 ? void 0 : (_collection$image3$or = _collection$image3.original) === null || _collection$image3$or === void 0 ? void 0 : _collection$image3$or.url, ")"),
@@ -388,5 +469,4 @@ const CollectionCard = _ref => {
388
469
  })));
389
470
  };
390
471
 
391
- export default CollectionCard;
392
- export { CollectionCard };
472
+ export { CollectionCard, CollectionCard as default };