@superdispatch/ui 0.40.1 → 0.41.0
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-node/index.js +57 -18
- package/dist-node/index.js.map +1 -1
- package/dist-src/theme/ThemeProvider.js +54 -9
- package/dist-src/tooltip/TooltipOverrides.js +4 -10
- package/dist-types/index.d.ts +8 -3
- package/dist-web/index.js +60 -21
- package/dist-web/index.js.map +1 -1
- package/package.json +3 -3
package/dist-node/index.js
CHANGED
|
@@ -20,6 +20,8 @@ var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
|
|
|
20
20
|
var ui = require('@superdispatch/ui');
|
|
21
21
|
var reactNumberFormat = require('react-number-format');
|
|
22
22
|
var createBreakpoints = _interopDefault(require('@material-ui/core/styles/createBreakpoints'));
|
|
23
|
+
var styles$1 = require('@mui/material/styles');
|
|
24
|
+
var styles$2 = require('@mui/styles');
|
|
23
25
|
|
|
24
26
|
var _excluded = ["size", "children", "disabled", "isActive", "isLoading", "color"];
|
|
25
27
|
var Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -3933,17 +3935,11 @@ function overrideToolbar(theme) {
|
|
|
3933
3935
|
}
|
|
3934
3936
|
|
|
3935
3937
|
function overrideTooltip(theme) {
|
|
3936
|
-
var mode = theme.palette.type;
|
|
3937
|
-
var color = mode === 'dark' ? exports.ColorDark.Silver400 : exports.Color.Dark500;
|
|
3938
|
-
theme.props.MuiTooltip = {
|
|
3939
|
-
arrow: true
|
|
3940
|
-
};
|
|
3941
3938
|
theme.overrides.MuiTooltip = {
|
|
3942
3939
|
tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
|
|
3943
3940
|
padding: theme.spacing(1, 1.5),
|
|
3944
|
-
backgroundColor:
|
|
3945
|
-
|
|
3946
|
-
'--sd-dark-300': exports.Color.Silver500 //tooltip secondary color(Dark300) is invisible in light mode
|
|
3941
|
+
backgroundColor: exports.ColorDynamic.Dark500,
|
|
3942
|
+
'--sd-dark-300': exports.ColorDynamic.Silver500 //tooltip secondary color(Dark300) is invisible in dark mode
|
|
3947
3943
|
}),
|
|
3948
3944
|
popperArrow: {
|
|
3949
3945
|
'&[x-placement*="top"] $arrow': {
|
|
@@ -3968,7 +3964,7 @@ function overrideTooltip(theme) {
|
|
|
3968
3964
|
}
|
|
3969
3965
|
},
|
|
3970
3966
|
arrow: {
|
|
3971
|
-
color,
|
|
3967
|
+
color: exports.ColorDynamic.Silver500,
|
|
3972
3968
|
fontSize: theme.spacing(1)
|
|
3973
3969
|
}
|
|
3974
3970
|
};
|
|
@@ -4164,6 +4160,41 @@ function createSuperDispatchTheme(type) {
|
|
|
4164
4160
|
overridePreloader(theme);
|
|
4165
4161
|
return theme;
|
|
4166
4162
|
}
|
|
4163
|
+
function createThemeV5(type) {
|
|
4164
|
+
var breakpoints = createBreakpoints({});
|
|
4165
|
+
var color = type === 'dark' ? exports.ColorDark : exports.Color;
|
|
4166
|
+
return styles$1.createTheme({
|
|
4167
|
+
breakpoints,
|
|
4168
|
+
palette: {
|
|
4169
|
+
mode: type,
|
|
4170
|
+
primary: {
|
|
4171
|
+
main: color.Blue300
|
|
4172
|
+
},
|
|
4173
|
+
error: {
|
|
4174
|
+
main: color.Red300
|
|
4175
|
+
},
|
|
4176
|
+
action: {
|
|
4177
|
+
hover: color.Silver200,
|
|
4178
|
+
selected: color.Blue50,
|
|
4179
|
+
disabled: color.Silver400
|
|
4180
|
+
},
|
|
4181
|
+
text: {
|
|
4182
|
+
primary: color.Dark500,
|
|
4183
|
+
secondary: color.Dark300,
|
|
4184
|
+
disabled: color.Dark100
|
|
4185
|
+
},
|
|
4186
|
+
common: {
|
|
4187
|
+
white: color.White,
|
|
4188
|
+
black: color.Black
|
|
4189
|
+
},
|
|
4190
|
+
divider: color.Silver400,
|
|
4191
|
+
background: {
|
|
4192
|
+
paper: color.White
|
|
4193
|
+
}
|
|
4194
|
+
},
|
|
4195
|
+
components: {}
|
|
4196
|
+
});
|
|
4197
|
+
}
|
|
4167
4198
|
var generateMaterialClassName = /*#__PURE__*/core.createGenerateClassName();
|
|
4168
4199
|
function generateClassName(rule, sheet) {
|
|
4169
4200
|
var {
|
|
@@ -4201,19 +4232,27 @@ function ThemeProvider(_ref) {
|
|
|
4201
4232
|
return !modifier ? nextTheme : modifier(nextTheme);
|
|
4202
4233
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- modifier may update on every render
|
|
4203
4234
|
}, [mode]);
|
|
4235
|
+
var themeV5 = createThemeV5(mode);
|
|
4204
4236
|
return /*#__PURE__*/jsxRuntime.jsx(styles.StylesProvider, {
|
|
4205
4237
|
injectFirst: injectFirst,
|
|
4206
4238
|
generateClassName: generateClassName,
|
|
4207
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
4208
|
-
|
|
4209
|
-
|
|
4239
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles$2.StylesProvider, {
|
|
4240
|
+
injectFirst: injectFirst,
|
|
4241
|
+
generateClassName: generateClassName,
|
|
4242
|
+
children: /*#__PURE__*/jsxRuntime.jsx(styles.ThemeProvider, {
|
|
4210
4243
|
theme: theme,
|
|
4211
|
-
children:
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4244
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(styles$1.ThemeProvider, {
|
|
4245
|
+
theme: themeV5,
|
|
4246
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(core.CssBaseline, {}), /*#__PURE__*/jsxRuntime.jsxs(styled.ThemeProvider, {
|
|
4247
|
+
theme: theme,
|
|
4248
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(GlobalStyles, {}), /*#__PURE__*/jsxRuntime.jsx(ResponsiveContextProvider, {
|
|
4249
|
+
children: /*#__PURE__*/jsxRuntime.jsx(SnackbarStackProvider, {
|
|
4250
|
+
children: children
|
|
4251
|
+
})
|
|
4252
|
+
})]
|
|
4253
|
+
})]
|
|
4254
|
+
})
|
|
4255
|
+
})
|
|
4217
4256
|
})
|
|
4218
4257
|
});
|
|
4219
4258
|
}
|