@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.
- package/dist/cjs/Blerp/BlerpImageRow.js +176 -57
- package/dist/cjs/Blerp/BlerpSavePopup.js +44 -40
- package/dist/cjs/Blerp/BlerpTitleRow.js +36 -19
- package/dist/cjs/Blerp/BlerpTopRow.js +110 -44
- package/dist/cjs/Blerp.js +9 -16
- package/dist/cjs/BlerpAudioContextProvider.js +2 -2
- package/dist/cjs/BlerpListView.js +318 -168
- package/dist/cjs/BlerpListViewPremium.js +155 -130
- package/dist/cjs/BlerpListViewSkeleton.js +60 -13
- package/dist/cjs/BlerpSkeleton.js +32 -9
- package/dist/cjs/CollectionCard.js +139 -60
- package/dist/cjs/CollectionListViewPremium.js +368 -297
- package/dist/cjs/CollectionSkeleton.js +74 -13
- package/dist/cjs/Dropdown.js +272 -172
- package/dist/cjs/EllipsisLoader.js +66 -21
- package/dist/cjs/GroupCard.js +64 -57
- package/dist/cjs/Icons/Icons.js +288 -426
- package/dist/cjs/ImageEditor.js +247 -0
- package/dist/cjs/ImageUpload.js +226 -0
- package/dist/cjs/NewBlerp.js +354 -160
- package/dist/cjs/NewBlerpTest.js +10 -792
- package/dist/cjs/NewCollectionModal.js +294 -310
- package/dist/cjs/PremiumCollectionCard.js +191 -454
- package/dist/cjs/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/cjs/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/cjs/ReactionButtons.js +26 -13
- package/dist/cjs/SnackbarContextProvider.js +200 -116
- package/dist/cjs/Theme.js +217 -90
- package/dist/cjs/Toggle.js +86 -32
- package/dist/cjs/UserCard.js +13 -32
- package/dist/cjs/UserPage/LibraryControls.js +180 -93
- package/dist/cjs/UserPage/UserLibraryHeader.js +23 -14
- package/dist/cjs/UserPage/UserProfileHeader.js +120 -105
- package/dist/cjs/UsernameWithPopout.js +12 -8
- package/dist/cjs/colors.js +15 -8
- package/dist/cjs/helpers.js +131 -0
- package/dist/cjs/index.js +98 -52
- package/dist/cjs/neo-components/Autocomplete.js +280 -0
- package/dist/cjs/neo-components/BottomNavigation.js +120 -0
- package/dist/cjs/neo-components/Box.js +48 -0
- package/dist/cjs/neo-components/Button.js +206 -0
- package/dist/cjs/neo-components/CircularProgress.js +92 -0
- package/dist/cjs/neo-components/Container.js +75 -0
- package/dist/cjs/neo-components/Dialog.js +441 -0
- package/dist/cjs/neo-components/Fab.js +237 -0
- package/dist/cjs/neo-components/FormControls.js +1057 -0
- package/dist/cjs/neo-components/Grid.js +256 -0
- package/dist/cjs/neo-components/IconButton.js +111 -0
- package/dist/cjs/neo-components/Input.js +493 -0
- package/dist/cjs/neo-components/Layout.js +1213 -0
- package/dist/cjs/neo-components/Misc.js +858 -0
- package/dist/cjs/neo-components/Navigation.js +1578 -0
- package/dist/cjs/neo-components/Paper.js +256 -0
- package/dist/cjs/neo-components/Stack.js +194 -0
- package/dist/cjs/neo-components/Stepper.js +291 -0
- package/dist/cjs/neo-components/Text.js +290 -0
- package/dist/cjs/neo-components/ThemeProvider.js +731 -0
- package/dist/cjs/neo-components/ToggleButton.js +223 -0
- package/dist/cjs/neo-components/createTheme.js +306 -0
- package/dist/cjs/neo-components/withSx.js +164 -0
- package/dist/cjs/neo-utils/sxToStyle.js +508 -0
- package/dist/esm/Blerp/BlerpImageRow.js +166 -46
- package/dist/esm/Blerp/BlerpSavePopup.js +35 -27
- package/dist/esm/Blerp/BlerpTitleRow.js +32 -13
- package/dist/esm/Blerp/BlerpTopRow.js +85 -16
- package/dist/esm/Blerp.js +4 -12
- package/dist/esm/BlerpAudioContextProvider.js +1 -2
- package/dist/esm/BlerpListView.js +313 -160
- package/dist/esm/BlerpListViewPremium.js +135 -109
- package/dist/esm/BlerpListViewSkeleton.js +60 -11
- package/dist/esm/BlerpSkeleton.js +32 -7
- package/dist/esm/CollectionCard.js +118 -38
- package/dist/esm/CollectionListViewPremium.js +367 -294
- package/dist/esm/CollectionSkeleton.js +73 -11
- package/dist/esm/Dropdown.js +260 -161
- package/dist/esm/EllipsisLoader.js +63 -18
- package/dist/esm/GroupCard.js +54 -46
- package/dist/esm/Icons/Icons.js +226 -367
- package/dist/esm/ImageEditor.js +240 -0
- package/dist/esm/ImageUpload.js +217 -0
- package/dist/esm/NewBlerp.js +282 -79
- package/dist/esm/NewBlerpTest.js +11 -781
- package/dist/esm/NewCollectionModal.js +289 -304
- package/dist/esm/PremiumCollectionCard.js +192 -451
- package/dist/esm/PurchaseModals/CheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumBlerpCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumCollectionCheckoutModal.js +1 -1
- package/dist/esm/PurchaseModals/PremiumSubscriptionCheckoutModal.js +1 -1
- package/dist/esm/ReactionButtons.js +23 -8
- package/dist/esm/SnackbarContextProvider.js +196 -110
- package/dist/esm/Theme.js +187 -66
- package/dist/esm/Toggle.js +84 -29
- package/dist/esm/UserCard.js +1 -20
- package/dist/esm/UserPage/LibraryControls.js +159 -65
- package/dist/esm/UserPage/UserLibraryHeader.js +18 -10
- package/dist/esm/UserPage/UserProfileHeader.js +100 -79
- package/dist/esm/UsernameWithPopout.js +7 -4
- package/dist/esm/colors.js +11 -9
- package/dist/esm/helpers.js +122 -0
- package/dist/esm/icons.js +1 -1
- package/dist/esm/index.js +39 -3
- package/dist/esm/neo-components/Autocomplete.js +269 -0
- package/dist/esm/neo-components/BottomNavigation.js +109 -0
- package/dist/esm/neo-components/Box.js +36 -0
- package/dist/esm/neo-components/Button.js +194 -0
- package/dist/esm/neo-components/CircularProgress.js +81 -0
- package/dist/esm/neo-components/Container.js +63 -0
- package/dist/esm/neo-components/Dialog.js +423 -0
- package/dist/esm/neo-components/Fab.js +225 -0
- package/dist/esm/neo-components/FormControls.js +1041 -0
- package/dist/esm/neo-components/Grid.js +244 -0
- package/dist/esm/neo-components/IconButton.js +99 -0
- package/dist/esm/neo-components/Input.js +478 -0
- package/dist/esm/neo-components/Layout.js +1179 -0
- package/dist/esm/neo-components/Misc.js +840 -0
- package/dist/esm/neo-components/Navigation.js +1556 -0
- package/dist/esm/neo-components/Paper.js +243 -0
- package/dist/esm/neo-components/Stack.js +182 -0
- package/dist/esm/neo-components/Stepper.js +278 -0
- package/dist/esm/neo-components/Text.js +277 -0
- package/dist/esm/neo-components/ThemeProvider.js +718 -0
- package/dist/esm/neo-components/ToggleButton.js +214 -0
- package/dist/esm/neo-components/createTheme.js +297 -0
- package/dist/esm/neo-components/withSx.js +153 -0
- package/dist/esm/neo-utils/sxToStyle.js +502 -0
- package/package.json +19 -15
package/dist/esm/Theme.js
CHANGED
|
@@ -1,13 +1,138 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { ThemeProvider as ThemeProvider$1 } from 'styled-components';
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import React, { useContext, useMemo, createContext } from 'react';
|
|
4
3
|
import icons from './icons.js';
|
|
5
|
-
import colors, {
|
|
6
|
-
import { mainTheme } from './index.js';
|
|
4
|
+
import colors, { darkColors, darkPalette, lightColors, lightPalette } from './colors.js';
|
|
7
5
|
import { SnackbarProvider } from './SnackbarContextProvider.js';
|
|
6
|
+
import { ThemeProvider } from './neo-components/ThemeProvider.js';
|
|
7
|
+
import '@babel/runtime/helpers/extends';
|
|
8
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
|
+
import './neo-components/Box.js';
|
|
10
|
+
import './neo-components/Stack.js';
|
|
11
|
+
import './neo-components/Grid.js';
|
|
12
|
+
import './neo-components/Container.js';
|
|
13
|
+
import './neo-components/Text.js';
|
|
14
|
+
import './neo-components/Button.js';
|
|
15
|
+
import './neo-components/IconButton.js';
|
|
16
|
+
import './neo-components/Fab.js';
|
|
17
|
+
import './neo-components/ToggleButton.js';
|
|
18
|
+
import './neo-components/Input.js';
|
|
19
|
+
import './neo-components/FormControls.js';
|
|
20
|
+
import './neo-components/Autocomplete.js';
|
|
21
|
+
import './neo-components/Paper.js';
|
|
22
|
+
import './neo-components/Dialog.js';
|
|
23
|
+
import './neo-components/Navigation.js';
|
|
24
|
+
import './neo-components/BottomNavigation.js';
|
|
25
|
+
import './neo-components/Stepper.js';
|
|
26
|
+
import './neo-components/Misc.js';
|
|
27
|
+
import './neo-components/Layout.js';
|
|
8
28
|
|
|
9
|
-
|
|
10
|
-
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
const mainTheme = {
|
|
33
|
+
pandaPink: "#FE295C",
|
|
34
|
+
pandaTeal: "#FE295C",
|
|
35
|
+
pandaNewTeal: "#49bea0",
|
|
36
|
+
darkTeal: "#058063",
|
|
37
|
+
whiteText: "#FFFFFF",
|
|
38
|
+
invertFlyoutBackground: "#170D11",
|
|
39
|
+
flyoutBackground: "#FFFFFF",
|
|
40
|
+
lighterBackground: "#F8F8F8",
|
|
41
|
+
defaultBackground: "#F3F3F3",
|
|
42
|
+
lighterGray: "#BDBDBB",
|
|
43
|
+
iconsActive: "#21000C",
|
|
44
|
+
iconsInActive: "#47463F",
|
|
45
|
+
headerText: "#21000C",
|
|
46
|
+
disabledText: "#BEBEBC",
|
|
47
|
+
lightGray: "#BEBEBC",
|
|
48
|
+
blastZone: "#E1E1E1",
|
|
49
|
+
orangeStatus: "#ff785b",
|
|
50
|
+
darkRedStatus: "#dd1243",
|
|
51
|
+
borderColor: "#bebeb9",
|
|
52
|
+
inputBorderColor: "#bebeb9",
|
|
53
|
+
togglerBackground: "#A04949",
|
|
54
|
+
secondaryText: "#47463F",
|
|
55
|
+
secondarySubtitleText: "#707070",
|
|
56
|
+
biteGray: "#707070",
|
|
57
|
+
secondaryGray: "#706F6B",
|
|
58
|
+
placeholderText: "#BFBFBA",
|
|
59
|
+
activeText: "#21000C",
|
|
60
|
+
primaryText: "#FFFFFF",
|
|
61
|
+
bodyText: "#21000C",
|
|
62
|
+
darkBackground: "#666",
|
|
63
|
+
statusColor: "#DD1243",
|
|
64
|
+
actionBackground: "#E6E6E6",
|
|
65
|
+
focusState: "#27AAFF",
|
|
66
|
+
focusOutline: "#3580B1",
|
|
67
|
+
darkBlue: "#3580B1",
|
|
68
|
+
headerColor: "#170D11",
|
|
69
|
+
headerBackground: "#47463F",
|
|
70
|
+
slidePurple: "#262261",
|
|
71
|
+
lightCloseButton: "https://cdn.blerp.com/blerp-public-images/twitch/white_close_button.svg",
|
|
72
|
+
closeIcon: "https://cdn.blerp.com/blerp-public-images/twitch/dark-close-icon.svg",
|
|
73
|
+
bitCostIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/active%20costLightMode.svg",
|
|
74
|
+
whiteCheckMarkIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/checkmark.svg",
|
|
75
|
+
dgRightArrow: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Arrows/Chevron_DarkGrey_Right.svg",
|
|
76
|
+
dgDownArrow: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Arrows/Chevron_DarkGrey_Down.svg",
|
|
77
|
+
dgUpArrow: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Arrows/Chevron_DarkGrey_Up.svg",
|
|
78
|
+
dgLeftArrow: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Arrows/Chevron_DarkGrey_Left.svg",
|
|
79
|
+
subStarIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/active%20subLightMode.svg",
|
|
80
|
+
subOneIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/greySubPlusBitsIconWhite.svg",
|
|
81
|
+
subTwoIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/PurpleSubPlusBitsIconWhite.svg",
|
|
82
|
+
subThreeIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/MintSubPlusBitsIconWhite.svg",
|
|
83
|
+
subFourIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/BlueSubPlusBitsIconWhite.svg",
|
|
84
|
+
subFiveIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/RedSubPlusBitsIconWhite.svg",
|
|
85
|
+
bitsOneIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/grey%20bits%20icon%20white%20stroke.svg",
|
|
86
|
+
bitsTwoIcon: "https://cdn.blerp.com/blerp-products/Twitch/Assets/Variable%20Pricing/Purple%20bits%20icon%20white%20stroke.svg",
|
|
87
|
+
bitsThreeIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/Mint%20bits%20icon%20white%20stroke-2.svg",
|
|
88
|
+
bitsFourIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/Blue%20bits%20icon%20white%20stroke.svg",
|
|
89
|
+
bitsFiveIcon: "https://cdn.blerp.com/blerp_products/Twitch/Assets/Variable%20Pricing/Red%20bits%20icon%20white%20stroke.svg"
|
|
90
|
+
};
|
|
91
|
+
const fonts = "@font-face {\n font-family: \"Odudo\";\n font-weight: normal;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Regular.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Regular.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Regular.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: lighter;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Light.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Light.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Light.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: 300;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Light.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Light.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Light.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: 400;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Regular.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Regular.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Regular.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: bolder;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/Odudo%20V1.3/WEB/odudo-semibold-webfont.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/Odudo%20V1.3/WEB/odudo-semibold-webfont.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/Odudo%20V1.3/WEB/odudo-semibold-webfont.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: 600;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/Odudo%20V1.3/WEB/odudo-semibold-webfont.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/Odudo%20V1.3/WEB/odudo-semibold-webfont.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/Odudo%20V1.3/WEB/odudo-semibold-webfont.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: bold;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Bold.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Bold.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Bold.woff\")\n format(\"woff\");\n}\n\n@font-face {\n font-family: \"Odudo\";\n font-weight: 700;\n font-display: swap;\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Bold.eot\");\n src: url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Bold.woff2\")\n format(\"woff2\"),\n url(\"https://cdn.blerp.com/blerp-web-images/fonts/web/Odudo-Bold.woff\")\n format(\"woff\");\n}"; // Try to load MUI dynamically, but don't fail if it's not installed
|
|
92
|
+
|
|
93
|
+
let createTheme = null;
|
|
94
|
+
let MuiThemeProvider = null;
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
const mui = require("@mui/material/styles");
|
|
98
|
+
|
|
99
|
+
createTheme = mui.createTheme;
|
|
100
|
+
MuiThemeProvider = mui.ThemeProvider;
|
|
101
|
+
} catch (e) {// MUI not installed, that's fine
|
|
102
|
+
// console.log("MUI not detected - using lightweight theme mode");
|
|
103
|
+
} // Try to load styled-components, but don't fail if it's not installed
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
let StyledThemeProvider = null;
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
const styledComponents = require("styled-components");
|
|
110
|
+
|
|
111
|
+
StyledThemeProvider = styledComponents.ThemeProvider;
|
|
112
|
+
} catch (e) {// styled-components not installed, that's fine
|
|
113
|
+
} // Pure theme configs (no MUI dependency)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
const lightThemeConfig = _objectSpread({
|
|
117
|
+
typography: {
|
|
118
|
+
fontFamily: "Odudo, Arial"
|
|
119
|
+
},
|
|
120
|
+
mode: "light",
|
|
121
|
+
colors: lightColors,
|
|
122
|
+
icons: icons,
|
|
123
|
+
palette: lightPalette
|
|
124
|
+
}, mainTheme);
|
|
125
|
+
const darkThemeConfig = _objectSpread({
|
|
126
|
+
typography: {
|
|
127
|
+
fontFamily: "Odudo, Arial"
|
|
128
|
+
},
|
|
129
|
+
mode: "dark",
|
|
130
|
+
colors: darkColors,
|
|
131
|
+
icons: icons,
|
|
132
|
+
palette: darkPalette
|
|
133
|
+
}, mainTheme); // MUI themes (only created if MUI is available)
|
|
134
|
+
|
|
135
|
+
const muiThemeConfig = {
|
|
11
136
|
typography: {
|
|
12
137
|
fontFamily: "Odudo, Arial"
|
|
13
138
|
},
|
|
@@ -107,19 +232,18 @@ const theme = createTheme({
|
|
|
107
232
|
}]
|
|
108
233
|
},
|
|
109
234
|
MuiCssBaseline: {
|
|
110
|
-
styleOverrides:
|
|
235
|
+
styleOverrides: fonts
|
|
111
236
|
}
|
|
112
|
-
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const theme = createTheme ? createTheme(_objectSpread(_objectSpread({}, muiThemeConfig), {}, {
|
|
113
240
|
mode: "light",
|
|
114
241
|
colors: lightColors,
|
|
115
242
|
icons: icons,
|
|
116
243
|
palette: lightPalette
|
|
117
|
-
});
|
|
118
|
-
const darkTheme = createTheme({
|
|
119
|
-
|
|
120
|
-
fontFamily: "Odudo, Arial"
|
|
121
|
-
},
|
|
122
|
-
components: {
|
|
244
|
+
})) : lightThemeConfig;
|
|
245
|
+
const darkTheme = createTheme ? createTheme(_objectSpread(_objectSpread({}, muiThemeConfig), {}, {
|
|
246
|
+
components: _objectSpread(_objectSpread({}, muiThemeConfig.components), {}, {
|
|
123
247
|
MuiTypography: {
|
|
124
248
|
styleOverrides: {
|
|
125
249
|
root: {
|
|
@@ -168,24 +292,6 @@ const darkTheme = createTheme({
|
|
|
168
292
|
}
|
|
169
293
|
}
|
|
170
294
|
},
|
|
171
|
-
MuiPopover: {
|
|
172
|
-
defaultProps: {
|
|
173
|
-
BackdropProps: {
|
|
174
|
-
sx: {
|
|
175
|
-
backgroundColor: "transparent",
|
|
176
|
-
backdropFilter: "none"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
MuiBackdrop: {
|
|
182
|
-
styleOverrides: {
|
|
183
|
-
root: {
|
|
184
|
-
backgroundColor: "".concat(colors.grey5, "70"),
|
|
185
|
-
backdropFilter: "blur(4px)"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
295
|
MuiSvgIcon: {
|
|
190
296
|
styleOverrides: {
|
|
191
297
|
root: {
|
|
@@ -193,54 +299,69 @@ const darkTheme = createTheme({
|
|
|
193
299
|
}
|
|
194
300
|
}
|
|
195
301
|
},
|
|
196
|
-
|
|
302
|
+
MuiBackdrop: {
|
|
197
303
|
styleOverrides: {
|
|
198
304
|
root: {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
letterSpacing: "0.05rem",
|
|
202
|
-
textTransform: "capitalize"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
variants: [{
|
|
206
|
-
props: {
|
|
207
|
-
variant: "outlined"
|
|
208
|
-
},
|
|
209
|
-
style: {
|
|
210
|
-
borderWidth: "2px",
|
|
211
|
-
"&:hover": {
|
|
212
|
-
borderWidth: "2px"
|
|
213
|
-
}
|
|
305
|
+
backgroundColor: "".concat(colors.grey5, "70"),
|
|
306
|
+
backdropFilter: "blur(4px)"
|
|
214
307
|
}
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
MuiCssBaseline: {
|
|
218
|
-
styleOverrides: "\n ".concat(fonts, "\n ")
|
|
308
|
+
}
|
|
219
309
|
}
|
|
220
|
-
},
|
|
310
|
+
}),
|
|
221
311
|
mode: "dark",
|
|
222
312
|
colors: darkColors,
|
|
223
313
|
icons: icons,
|
|
224
314
|
palette: darkPalette
|
|
225
|
-
});
|
|
315
|
+
})) : darkThemeConfig; // Create a context for theme access (legacy - for styled-components)
|
|
316
|
+
|
|
317
|
+
const BlerpThemeContext = /*#__PURE__*/createContext(null);
|
|
318
|
+
const useBlerpTheme = () => {
|
|
319
|
+
const context = useContext(BlerpThemeContext);
|
|
320
|
+
|
|
321
|
+
if (!context) {
|
|
322
|
+
throw new Error("useBlerpTheme must be used within BlerpTheme");
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return context;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* BlerpTheme - Main theme provider
|
|
329
|
+
*
|
|
330
|
+
* FIXED: Now accepts and passes through customColors to NewThemeProvider
|
|
331
|
+
* This allows ExtensionTheme and other consumers to override extension colors
|
|
332
|
+
*/
|
|
226
333
|
|
|
227
334
|
const BlerpTheme = _ref => {
|
|
228
335
|
let {
|
|
229
336
|
mode,
|
|
337
|
+
customColors = {},
|
|
230
338
|
children
|
|
231
339
|
} = _ref;
|
|
232
|
-
|
|
340
|
+
// Memoize theme selection
|
|
341
|
+
const currentTheme = useMemo(() => mode === "dark" ? darkTheme : theme, [mode]); // Memoize the combined theme value (for legacy styled-components)
|
|
233
342
|
|
|
234
|
-
|
|
343
|
+
const themeValue = useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, mainTheme), {}, {
|
|
344
|
+
icons,
|
|
345
|
+
mode: mode === "dark" ? "dark" : "light"
|
|
346
|
+
}, currentTheme), customColors), [mode, currentTheme, customColors]); // Build the inner content with SnackbarProvider
|
|
347
|
+
|
|
348
|
+
const innerContent = /*#__PURE__*/React.createElement(BlerpThemeContext.Provider, {
|
|
349
|
+
value: themeValue
|
|
350
|
+
}, /*#__PURE__*/React.createElement(SnackbarProvider, null, children)); // Wrap with styled-components ThemeProvider if available
|
|
351
|
+
|
|
352
|
+
const withStyledTheme = StyledThemeProvider ? /*#__PURE__*/React.createElement(StyledThemeProvider, {
|
|
353
|
+
theme: themeValue
|
|
354
|
+
}, innerContent) : innerContent; // Wrap with MUI ThemeProvider if available
|
|
355
|
+
|
|
356
|
+
const withMuiTheme = MuiThemeProvider ? /*#__PURE__*/React.createElement(MuiThemeProvider, {
|
|
235
357
|
theme: currentTheme
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
358
|
+
}, withStyledTheme) : withStyledTheme; // CRITICAL FIX: Pass customColors through to NewThemeProvider
|
|
359
|
+
// This ensures neo-components get the extension color overrides
|
|
360
|
+
|
|
361
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
362
|
+
mode: mode === "dark" ? "dark" : "light",
|
|
363
|
+
customColors: customColors
|
|
364
|
+
}, withMuiTheme);
|
|
243
365
|
};
|
|
244
366
|
|
|
245
|
-
export default
|
|
246
|
-
export { darkTheme, theme };
|
|
367
|
+
export { darkTheme, darkThemeConfig, BlerpTheme as default, fonts, lightThemeConfig, theme, useBlerpTheme };
|
package/dist/esm/Toggle.js
CHANGED
|
@@ -1,47 +1,102 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CheckRounded } from '@mui/icons-material';
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
3
|
import { EllipsisLoader } from './EllipsisLoader.js';
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
/**
|
|
9
|
+
* Inline SVG replacement for CheckRounded
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const CheckIcon = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
style
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
style: _objectSpread({
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}, style)
|
|
21
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const Toggle = _ref2 => {
|
|
27
|
+
var _theme$colors, _theme$colors2, _theme$colors3, _theme$colors4, _theme$colors5;
|
|
28
|
+
|
|
16
29
|
let {
|
|
17
30
|
loading,
|
|
18
31
|
checked,
|
|
19
32
|
onClick,
|
|
20
|
-
disabled
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
disabled,
|
|
34
|
+
theme
|
|
35
|
+
} = _ref2;
|
|
36
|
+
// Coerce to boolean to avoid undefined issues
|
|
37
|
+
const isChecked = Boolean(checked);
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, loading ? /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
style: {
|
|
40
|
+
width: "50px",
|
|
41
|
+
height: "100%",
|
|
42
|
+
display: "flex",
|
|
43
|
+
flexDirection: "column",
|
|
44
|
+
justifyContent: "center"
|
|
45
|
+
}
|
|
46
|
+
}, /*#__PURE__*/React.createElement(EllipsisLoader, null)) : /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
role: "switch",
|
|
48
|
+
"aria-checked": isChecked,
|
|
49
|
+
tabIndex: disabled ? -1 : 0,
|
|
50
|
+
style: {
|
|
51
|
+
cursor: disabled ? "default" : "pointer",
|
|
52
|
+
position: "relative",
|
|
53
|
+
display: "inline-block",
|
|
54
|
+
placeSelf: "center",
|
|
55
|
+
width: isChecked ? "38px" : "36px",
|
|
56
|
+
height: isChecked ? "22px" : "20px",
|
|
57
|
+
border: isChecked ? "0px" : "1px solid",
|
|
58
|
+
borderColor: isChecked ? "transparent" : (theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.grey5) || "#ccc",
|
|
59
|
+
borderRadius: "18px",
|
|
60
|
+
opacity: disabled ? "0.5" : "1"
|
|
61
|
+
},
|
|
25
62
|
onClick: e => {
|
|
26
63
|
if (!disabled && onClick) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
onClick(e);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
onKeyDown: e => {
|
|
70
|
+
if (!disabled && onClick && (e.key === 'Enter' || e.key === ' ')) {
|
|
71
|
+
e.preventDefault();
|
|
27
72
|
onClick(e);
|
|
28
73
|
}
|
|
29
74
|
}
|
|
30
|
-
}, /*#__PURE__*/React.createElement(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
75
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
style: {
|
|
77
|
+
position: "absolute",
|
|
78
|
+
top: 0,
|
|
79
|
+
left: 0,
|
|
80
|
+
right: 0,
|
|
81
|
+
bottom: 0,
|
|
82
|
+
backgroundColor: isChecked ? disabled ? "#7b7b7b" : (theme === null || theme === void 0 ? void 0 : (_theme$colors2 = theme.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.seafoam) || "#2ecc71" : "rgba(204, 204, 204, 0.2)",
|
|
83
|
+
transition: "background-color 0.2s ease-out",
|
|
84
|
+
borderRadius: "34px"
|
|
85
|
+
}
|
|
86
|
+
}, /*#__PURE__*/React.createElement(CheckIcon, {
|
|
87
|
+
style: {
|
|
37
88
|
position: "absolute",
|
|
38
|
-
top:
|
|
89
|
+
top: isChecked ? "3px" : "4px",
|
|
39
90
|
left: "4px",
|
|
40
|
-
color:
|
|
41
|
-
|
|
42
|
-
|
|
91
|
+
color: isChecked ? disabled ? (theme === null || theme === void 0 ? void 0 : (_theme$colors3 = theme.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.grey4) || "#999" : (theme === null || theme === void 0 ? void 0 : (_theme$colors4 = theme.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.seafoam) || "#2ecc71" : "transparent",
|
|
92
|
+
width: isChecked ? "16px" : "12px",
|
|
93
|
+
height: isChecked ? "16px" : "12px",
|
|
94
|
+
backgroundColor: isChecked ? "#fff" : (theme === null || theme === void 0 ? void 0 : (_theme$colors5 = theme.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.grey5) || "#ccc",
|
|
43
95
|
borderRadius: "50%",
|
|
44
|
-
transition: "0.2s"
|
|
96
|
+
transition: "transform 0.2s ease-out, width 0.2s ease-out, height 0.2s ease-out, background-color 0.2s ease-out",
|
|
97
|
+
transform: isChecked ? "translateX(14px)" : "translateX(0)",
|
|
98
|
+
padding: isChecked ? "0px" : "2px",
|
|
99
|
+
boxSizing: "border-box"
|
|
45
100
|
}
|
|
46
101
|
}))));
|
|
47
102
|
};
|
package/dist/esm/UserCard.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { VerifiedRounded, DiamondRounded } from '@mui/icons-material';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Stack, Text } from './index.js';
|
|
4
3
|
|
|
5
4
|
const UserCard = _ref => {
|
|
6
|
-
var _user$twitchChannelIn, _user$profileImage, _user$profileImage$or
|
|
5
|
+
var _user$twitchChannelIn, _user$profileImage, _user$profileImage$or;
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
user,
|
|
@@ -53,24 +52,6 @@ const UserCard = _ref => {
|
|
|
53
52
|
|
|
54
53
|
e.target.src = "https://cdn.blerp.com/design/web/gamerblerpylarge.png";
|
|
55
54
|
}
|
|
56
|
-
}), (user === null || user === void 0 ? void 0 : (_user$twitchChannelIn2 = user.twitchChannelInfo) === null || _user$twitchChannelIn2 === void 0 ? void 0 : _user$twitchChannelIn2.broadcasterType) === "partner" && /*#__PURE__*/React.createElement(VerifiedRounded, {
|
|
57
|
-
sx: {
|
|
58
|
-
position: "absolute",
|
|
59
|
-
bottom: collapsed ? "0" : "5px",
|
|
60
|
-
right: collapsed ? "0" : "5px",
|
|
61
|
-
fontSize: "17px",
|
|
62
|
-
backgroundColor: "grey4.main",
|
|
63
|
-
borderRadius: "50%"
|
|
64
|
-
}
|
|
65
|
-
}), (user === null || user === void 0 ? void 0 : user.premiumBlerpUserStatus) === "ACTIVE" && /*#__PURE__*/React.createElement(DiamondRounded, {
|
|
66
|
-
sx: {
|
|
67
|
-
position: "absolute",
|
|
68
|
-
bottom: collapsed ? "0" : "5px",
|
|
69
|
-
right: collapsed ? "0" : "5px",
|
|
70
|
-
fontSize: "17px",
|
|
71
|
-
backgroundColor: "grey4.main",
|
|
72
|
-
borderRadius: "50%"
|
|
73
|
-
}
|
|
74
55
|
})), /*#__PURE__*/React.createElement(Stack, {
|
|
75
56
|
sx: {
|
|
76
57
|
flex: 1,
|