@blerp/design 1.4.4 → 1.4.5
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/Theme.js +6 -96
- package/dist/esm/Theme.js +7 -97
- package/package.json +1 -4
package/dist/cjs/Theme.js
CHANGED
|
@@ -99,19 +99,6 @@ const mainTheme = {
|
|
|
99
99
|
};
|
|
100
100
|
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
|
|
101
101
|
|
|
102
|
-
let createTheme = null;
|
|
103
|
-
let MuiThemeProvider = null;
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
const mui = require("@mui/material/styles");
|
|
107
|
-
|
|
108
|
-
createTheme = mui.createTheme;
|
|
109
|
-
MuiThemeProvider = mui.ThemeProvider;
|
|
110
|
-
} catch (e) {// MUI not installed, that's fine
|
|
111
|
-
// console.log("MUI not detected - using lightweight theme mode");
|
|
112
|
-
} // Try to load styled-components, but don't fail if it's not installed
|
|
113
|
-
|
|
114
|
-
|
|
115
102
|
let StyledThemeProvider = null;
|
|
116
103
|
|
|
117
104
|
try {
|
|
@@ -141,7 +128,7 @@ const darkThemeConfig = _objectSpread({
|
|
|
141
128
|
palette: colors.darkPalette
|
|
142
129
|
}, mainTheme); // MUI themes (only created if MUI is available)
|
|
143
130
|
|
|
144
|
-
|
|
131
|
+
({
|
|
145
132
|
typography: {
|
|
146
133
|
fontFamily: "Odudo, Arial"
|
|
147
134
|
},
|
|
@@ -244,84 +231,9 @@ const muiThemeConfig = {
|
|
|
244
231
|
styleOverrides: fonts
|
|
245
232
|
}
|
|
246
233
|
}
|
|
247
|
-
};
|
|
248
|
-
const theme =
|
|
249
|
-
|
|
250
|
-
colors: colors.lightColors,
|
|
251
|
-
icons: icons,
|
|
252
|
-
palette: colors.lightPalette
|
|
253
|
-
})) : lightThemeConfig;
|
|
254
|
-
const darkTheme = createTheme ? createTheme(_objectSpread(_objectSpread({}, muiThemeConfig), {}, {
|
|
255
|
-
components: _objectSpread(_objectSpread({}, muiThemeConfig.components), {}, {
|
|
256
|
-
MuiTypography: {
|
|
257
|
-
styleOverrides: {
|
|
258
|
-
root: {
|
|
259
|
-
color: colors["default"].white
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
MuiFilledInput: {
|
|
264
|
-
styleOverrides: {
|
|
265
|
-
root: {
|
|
266
|
-
color: colors["default"].white,
|
|
267
|
-
backgroundColor: colors["default"].grey7,
|
|
268
|
-
"& textarea": {
|
|
269
|
-
color: colors["default"].white
|
|
270
|
-
},
|
|
271
|
-
":hover": {
|
|
272
|
-
backgroundColor: colors["default"].grey7
|
|
273
|
-
},
|
|
274
|
-
":before": {
|
|
275
|
-
borderColor: colors["default"].waxwing
|
|
276
|
-
},
|
|
277
|
-
":hover:before": {
|
|
278
|
-
borderColor: "".concat(colors["default"].white, " !important")
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
MuiInput: {
|
|
284
|
-
styleOverrides: {
|
|
285
|
-
root: {
|
|
286
|
-
color: colors["default"].white,
|
|
287
|
-
borderColor: colors["default"].white,
|
|
288
|
-
":before": {
|
|
289
|
-
borderColor: colors["default"].waxwing
|
|
290
|
-
},
|
|
291
|
-
":hover:before": {
|
|
292
|
-
borderColor: "".concat(colors["default"].white, " !important")
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
MuiInputLabel: {
|
|
298
|
-
styleOverrides: {
|
|
299
|
-
root: {
|
|
300
|
-
color: colors["default"].white
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
MuiSvgIcon: {
|
|
305
|
-
styleOverrides: {
|
|
306
|
-
root: {
|
|
307
|
-
color: colors["default"].white
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
MuiBackdrop: {
|
|
312
|
-
styleOverrides: {
|
|
313
|
-
root: {
|
|
314
|
-
backgroundColor: "".concat(colors["default"].grey5, "70"),
|
|
315
|
-
backdropFilter: "blur(4px)"
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}),
|
|
320
|
-
mode: "dark",
|
|
321
|
-
colors: colors.darkColors,
|
|
322
|
-
icons: icons,
|
|
323
|
-
palette: colors.darkPalette
|
|
324
|
-
})) : darkThemeConfig; // Create a context for theme access (legacy - for styled-components)
|
|
234
|
+
});
|
|
235
|
+
const theme = lightThemeConfig;
|
|
236
|
+
const darkTheme = darkThemeConfig; // Create a context for theme access (legacy - for styled-components)
|
|
325
237
|
|
|
326
238
|
const BlerpThemeContext = /*#__PURE__*/React.createContext(null);
|
|
327
239
|
const useBlerpTheme = () => {
|
|
@@ -335,7 +247,7 @@ const useBlerpTheme = () => {
|
|
|
335
247
|
};
|
|
336
248
|
/**
|
|
337
249
|
* BlerpTheme - Main theme provider
|
|
338
|
-
*
|
|
250
|
+
*
|
|
339
251
|
* FIXED: Now accepts and passes through customColors to NewThemeProvider
|
|
340
252
|
* This allows ExtensionTheme and other consumers to override extension colors
|
|
341
253
|
*/
|
|
@@ -362,9 +274,7 @@ const BlerpTheme = _ref => {
|
|
|
362
274
|
theme: themeValue
|
|
363
275
|
}, innerContent) : innerContent; // Wrap with MUI ThemeProvider if available
|
|
364
276
|
|
|
365
|
-
const withMuiTheme =
|
|
366
|
-
theme: currentTheme
|
|
367
|
-
}, withStyledTheme) : withStyledTheme; // CRITICAL FIX: Pass customColors through to NewThemeProvider
|
|
277
|
+
const withMuiTheme = withStyledTheme; // CRITICAL FIX: Pass customColors through to NewThemeProvider
|
|
368
278
|
// This ensures neo-components get the extension color overrides
|
|
369
279
|
|
|
370
280
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider.ThemeProvider, {
|
package/dist/esm/Theme.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import React, { useContext, useMemo, createContext } from 'react';
|
|
3
3
|
import icons from './icons.js';
|
|
4
|
-
import colors, {
|
|
4
|
+
import colors, { lightColors, lightPalette, darkColors, darkPalette } from './colors.js';
|
|
5
5
|
import { SnackbarProvider } from './SnackbarContextProvider.js';
|
|
6
6
|
import { ThemeProvider } from './neo-components/ThemeProvider.js';
|
|
7
7
|
import '@babel/runtime/helpers/extends';
|
|
@@ -90,19 +90,6 @@ const mainTheme = {
|
|
|
90
90
|
};
|
|
91
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
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
93
|
let StyledThemeProvider = null;
|
|
107
94
|
|
|
108
95
|
try {
|
|
@@ -132,7 +119,7 @@ const darkThemeConfig = _objectSpread({
|
|
|
132
119
|
palette: darkPalette
|
|
133
120
|
}, mainTheme); // MUI themes (only created if MUI is available)
|
|
134
121
|
|
|
135
|
-
|
|
122
|
+
({
|
|
136
123
|
typography: {
|
|
137
124
|
fontFamily: "Odudo, Arial"
|
|
138
125
|
},
|
|
@@ -235,84 +222,9 @@ const muiThemeConfig = {
|
|
|
235
222
|
styleOverrides: fonts
|
|
236
223
|
}
|
|
237
224
|
}
|
|
238
|
-
};
|
|
239
|
-
const theme =
|
|
240
|
-
|
|
241
|
-
colors: lightColors,
|
|
242
|
-
icons: icons,
|
|
243
|
-
palette: lightPalette
|
|
244
|
-
})) : lightThemeConfig;
|
|
245
|
-
const darkTheme = createTheme ? createTheme(_objectSpread(_objectSpread({}, muiThemeConfig), {}, {
|
|
246
|
-
components: _objectSpread(_objectSpread({}, muiThemeConfig.components), {}, {
|
|
247
|
-
MuiTypography: {
|
|
248
|
-
styleOverrides: {
|
|
249
|
-
root: {
|
|
250
|
-
color: colors.white
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
MuiFilledInput: {
|
|
255
|
-
styleOverrides: {
|
|
256
|
-
root: {
|
|
257
|
-
color: colors.white,
|
|
258
|
-
backgroundColor: colors.grey7,
|
|
259
|
-
"& textarea": {
|
|
260
|
-
color: colors.white
|
|
261
|
-
},
|
|
262
|
-
":hover": {
|
|
263
|
-
backgroundColor: colors.grey7
|
|
264
|
-
},
|
|
265
|
-
":before": {
|
|
266
|
-
borderColor: colors.waxwing
|
|
267
|
-
},
|
|
268
|
-
":hover:before": {
|
|
269
|
-
borderColor: "".concat(colors.white, " !important")
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
MuiInput: {
|
|
275
|
-
styleOverrides: {
|
|
276
|
-
root: {
|
|
277
|
-
color: colors.white,
|
|
278
|
-
borderColor: colors.white,
|
|
279
|
-
":before": {
|
|
280
|
-
borderColor: colors.waxwing
|
|
281
|
-
},
|
|
282
|
-
":hover:before": {
|
|
283
|
-
borderColor: "".concat(colors.white, " !important")
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
MuiInputLabel: {
|
|
289
|
-
styleOverrides: {
|
|
290
|
-
root: {
|
|
291
|
-
color: colors.white
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
MuiSvgIcon: {
|
|
296
|
-
styleOverrides: {
|
|
297
|
-
root: {
|
|
298
|
-
color: colors.white
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
MuiBackdrop: {
|
|
303
|
-
styleOverrides: {
|
|
304
|
-
root: {
|
|
305
|
-
backgroundColor: "".concat(colors.grey5, "70"),
|
|
306
|
-
backdropFilter: "blur(4px)"
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}),
|
|
311
|
-
mode: "dark",
|
|
312
|
-
colors: darkColors,
|
|
313
|
-
icons: icons,
|
|
314
|
-
palette: darkPalette
|
|
315
|
-
})) : darkThemeConfig; // Create a context for theme access (legacy - for styled-components)
|
|
225
|
+
});
|
|
226
|
+
const theme = lightThemeConfig;
|
|
227
|
+
const darkTheme = darkThemeConfig; // Create a context for theme access (legacy - for styled-components)
|
|
316
228
|
|
|
317
229
|
const BlerpThemeContext = /*#__PURE__*/createContext(null);
|
|
318
230
|
const useBlerpTheme = () => {
|
|
@@ -326,7 +238,7 @@ const useBlerpTheme = () => {
|
|
|
326
238
|
};
|
|
327
239
|
/**
|
|
328
240
|
* BlerpTheme - Main theme provider
|
|
329
|
-
*
|
|
241
|
+
*
|
|
330
242
|
* FIXED: Now accepts and passes through customColors to NewThemeProvider
|
|
331
243
|
* This allows ExtensionTheme and other consumers to override extension colors
|
|
332
244
|
*/
|
|
@@ -353,9 +265,7 @@ const BlerpTheme = _ref => {
|
|
|
353
265
|
theme: themeValue
|
|
354
266
|
}, innerContent) : innerContent; // Wrap with MUI ThemeProvider if available
|
|
355
267
|
|
|
356
|
-
const withMuiTheme =
|
|
357
|
-
theme: currentTheme
|
|
358
|
-
}, withStyledTheme) : withStyledTheme; // CRITICAL FIX: Pass customColors through to NewThemeProvider
|
|
268
|
+
const withMuiTheme = withStyledTheme; // CRITICAL FIX: Pass customColors through to NewThemeProvider
|
|
359
269
|
// This ensures neo-components get the extension color overrides
|
|
360
270
|
|
|
361
271
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blerp/design",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Blerp UI",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"watch": "rollup -c -w"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@mui/material": "5.10.16",
|
|
12
11
|
"react": "18.2.0",
|
|
13
12
|
"react-dom": "18.2.0",
|
|
14
13
|
"styled-components": "^5.0.0 || ^6.0.0"
|
|
@@ -38,8 +37,6 @@
|
|
|
38
37
|
"@babel/plugin-transform-runtime": "^7.23.9",
|
|
39
38
|
"@babel/preset-env": "^7.12.11",
|
|
40
39
|
"@babel/preset-react": "^7.12.10",
|
|
41
|
-
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
|
|
42
|
-
"@mui/styled-engine-sc": "5.10.16",
|
|
43
40
|
"@rollup/plugin-babel": "^5.2.2",
|
|
44
41
|
"@rollup/plugin-json": "^4.1.0",
|
|
45
42
|
"@rollup/plugin-node-resolve": "^16.0.3",
|