@superdispatch/ui 0.24.6 → 0.24.8
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 +37 -9
- package/dist-node/index.js.map +1 -1
- package/dist-src/checkbox/CheckboxField.js +1 -1
- package/dist-src/menu/MenuOverrides.js +6 -0
- package/dist-src/preloader/PreLoaderOverrides.js +7 -0
- package/dist-src/radio/RadioField.js +1 -1
- package/dist-src/snackbar/SnackbarOverrides.js +13 -7
- package/dist-src/text-field/TextFieldOverrides.js +4 -0
- package/dist-src/theme/ThemeProvider.js +6 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-web/index.js +37 -9
- package/dist-web/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ var FormControl = /*#__PURE__*/styled(FormControlMui).withConfig({
|
|
|
14
14
|
var FormHelperText = /*#__PURE__*/styled(FormHelperTextMui).withConfig({
|
|
15
15
|
displayName: "CheckboxField__FormHelperText",
|
|
16
16
|
componentId: "SD__sc-1wxu0g6-1"
|
|
17
|
-
})(["color:", ";
|
|
17
|
+
})(["color:", ";margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
|
|
18
18
|
export var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
19
|
var {
|
|
20
20
|
label,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import { Color } from "../theme/Color.js";
|
|
2
3
|
export function overrideMenu(theme) {
|
|
3
4
|
theme.props.MuiMenu = {
|
|
4
5
|
getContentAnchorEl: null,
|
|
@@ -11,6 +12,11 @@ export function overrideMenu(theme) {
|
|
|
11
12
|
horizontal: 'left'
|
|
12
13
|
}
|
|
13
14
|
};
|
|
15
|
+
theme.overrides.MuiMenu = {
|
|
16
|
+
paper: {
|
|
17
|
+
border: "1px solid ".concat(Color.Silver400)
|
|
18
|
+
}
|
|
19
|
+
};
|
|
14
20
|
theme.overrides.MuiMenuItem = {
|
|
15
21
|
root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
|
|
16
22
|
paddingTop: theme.spacing(1),
|
|
@@ -14,7 +14,7 @@ var FormControl = /*#__PURE__*/styled(FormControlMui).withConfig({
|
|
|
14
14
|
var FormHelperText = /*#__PURE__*/styled(FormHelperTextMui).withConfig({
|
|
15
15
|
displayName: "RadioField__FormHelperText",
|
|
16
16
|
componentId: "SD__sc-6ey4qt-1"
|
|
17
|
-
})(["color:", ";
|
|
17
|
+
})(["color:", ";margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
|
|
18
18
|
export var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
19
|
var {
|
|
20
20
|
label,
|
|
@@ -3,18 +3,24 @@ export function overrideSnackbar(theme) {
|
|
|
3
3
|
anchorOriginBottomCenter: {
|
|
4
4
|
left: 0,
|
|
5
5
|
right: 0,
|
|
6
|
-
bottom: 0
|
|
6
|
+
bottom: 0,
|
|
7
|
+
padding: theme.spacing(0),
|
|
8
|
+
background: 'transparent'
|
|
7
9
|
}
|
|
8
10
|
};
|
|
9
11
|
theme.overrides.MuiSnackbarContent = {
|
|
10
12
|
root: {
|
|
11
|
-
width: '100%',
|
|
12
|
-
borderRadius: 0,
|
|
13
13
|
minHeight: theme.spacing(7.5),
|
|
14
|
-
|
|
15
|
-
width:
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
'&.SD-SnackbarContent-root': {
|
|
15
|
+
width: '100%',
|
|
16
|
+
position: 'relative',
|
|
17
|
+
left: 0,
|
|
18
|
+
right: 0,
|
|
19
|
+
bottom: 0,
|
|
20
|
+
borderRadius: theme.spacing(0),
|
|
21
|
+
[theme.breakpoints.up('sm')]: {
|
|
22
|
+
borderRadius: theme.spacing(0.5)
|
|
23
|
+
}
|
|
18
24
|
}
|
|
19
25
|
},
|
|
20
26
|
message: {
|
|
@@ -18,6 +18,7 @@ import { overrideList } from "../list/ListOverrides.js";
|
|
|
18
18
|
import { overrideMenu } from "../menu/MenuOverrides.js";
|
|
19
19
|
import { overridePagination } from "../pagination/PaginationOverrides.js";
|
|
20
20
|
import { overridePaper } from "../paper/PaperOverrides.js";
|
|
21
|
+
import { overridePreloader } from "../preloader/PreLoaderOverrides.js";
|
|
21
22
|
import { overrideRadio } from "../radio/RadioOverrides.js";
|
|
22
23
|
import { ResponsiveContextProvider } from "../responsive/ResponsiveContext.js";
|
|
23
24
|
import { overrideSnackbar } from "../snackbar/SnackbarOverrides.js";
|
|
@@ -85,6 +86,7 @@ function createSuperDispatchTheme() {
|
|
|
85
86
|
overrideTooltip(theme);
|
|
86
87
|
overrideTypography(theme);
|
|
87
88
|
overridePagination(theme);
|
|
89
|
+
overridePreloader(theme);
|
|
88
90
|
return theme;
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -97,6 +99,10 @@ function generateClassName(rule, sheet) {
|
|
|
97
99
|
} = (sheet === null || sheet === void 0 ? void 0 : sheet.options) || {};
|
|
98
100
|
|
|
99
101
|
if (meta && rule.type === 'style') {
|
|
102
|
+
if (meta.startsWith('MuiSnackbar') && sheet) {
|
|
103
|
+
return "SDSnackbar-".concat(rule.key);
|
|
104
|
+
}
|
|
105
|
+
|
|
100
106
|
if (meta.startsWith('SD-')) {
|
|
101
107
|
return "".concat(meta, "-").concat(rule.key);
|
|
102
108
|
}
|
package/dist-types/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Property } from 'csstype';
|
|
|
6
6
|
import { CommonProps } from '@material-ui/core/OverridableComponent';
|
|
7
7
|
import { NumberFormatProps } from 'react-number-format';
|
|
8
8
|
import { Breakpoint } from '@material-ui/core/styles/createBreakpoints';
|
|
9
|
+
import { SkeletonClassKey } from '@material-ui/lab';
|
|
9
10
|
|
|
10
11
|
interface ButtonProps extends RefAttributes<HTMLButtonElement>, Omit<ButtonProps$1, 'color'> {
|
|
11
12
|
rel?: string;
|
|
@@ -471,6 +472,11 @@ declare enum Color {
|
|
|
471
472
|
declare type ColorProp = keyof typeof Color;
|
|
472
473
|
declare function isColorProp(name: unknown): name is ColorProp;
|
|
473
474
|
|
|
475
|
+
declare module '@material-ui/core/styles/overrides' {
|
|
476
|
+
interface ComponentNameToClassKey {
|
|
477
|
+
MuiSkeleton: SkeletonClassKey;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
474
480
|
declare type SuperDispatchTheme = Readonly<Required<Theme>>;
|
|
475
481
|
|
|
476
482
|
interface ThemeProviderProps {
|
package/dist-web/index.js
CHANGED
|
@@ -806,7 +806,7 @@ var FormControl = /*#__PURE__*/styled(FormControl$2).withConfig({
|
|
|
806
806
|
var FormHelperText = /*#__PURE__*/styled(FormHelperText$4).withConfig({
|
|
807
807
|
displayName: "CheckboxField__FormHelperText",
|
|
808
808
|
componentId: "SD__sc-1wxu0g6-1"
|
|
809
|
-
})(["color:", ";
|
|
809
|
+
})(["color:", ";margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
|
|
810
810
|
var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
811
811
|
var {
|
|
812
812
|
label,
|
|
@@ -1840,7 +1840,7 @@ var FormControl$1 = /*#__PURE__*/styled(FormControl$2).withConfig({
|
|
|
1840
1840
|
var FormHelperText$2 = /*#__PURE__*/styled(FormHelperText$4).withConfig({
|
|
1841
1841
|
displayName: "RadioField__FormHelperText",
|
|
1842
1842
|
componentId: "SD__sc-6ey4qt-1"
|
|
1843
|
-
})(["color:", ";
|
|
1843
|
+
})(["color:", ";margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
|
|
1844
1844
|
var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1845
1845
|
var {
|
|
1846
1846
|
label,
|
|
@@ -3143,6 +3143,11 @@ function overrideMenu(theme) {
|
|
|
3143
3143
|
horizontal: 'left'
|
|
3144
3144
|
}
|
|
3145
3145
|
};
|
|
3146
|
+
theme.overrides.MuiMenu = {
|
|
3147
|
+
paper: {
|
|
3148
|
+
border: "1px solid ".concat(Color.Silver400)
|
|
3149
|
+
}
|
|
3150
|
+
};
|
|
3146
3151
|
theme.overrides.MuiMenuItem = {
|
|
3147
3152
|
root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
|
|
3148
3153
|
paddingTop: theme.spacing(1),
|
|
@@ -3202,6 +3207,14 @@ function overridePaper(theme) {
|
|
|
3202
3207
|
};
|
|
3203
3208
|
}
|
|
3204
3209
|
|
|
3210
|
+
function overridePreloader(theme) {
|
|
3211
|
+
theme.overrides.MuiSkeleton = {
|
|
3212
|
+
text: {
|
|
3213
|
+
borderRadius: '3px'
|
|
3214
|
+
}
|
|
3215
|
+
};
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3205
3218
|
function overrideRadio(theme) {
|
|
3206
3219
|
theme.props.MuiRadio = {
|
|
3207
3220
|
color: 'primary',
|
|
@@ -3256,18 +3269,24 @@ function overrideSnackbar(theme) {
|
|
|
3256
3269
|
anchorOriginBottomCenter: {
|
|
3257
3270
|
left: 0,
|
|
3258
3271
|
right: 0,
|
|
3259
|
-
bottom: 0
|
|
3272
|
+
bottom: 0,
|
|
3273
|
+
padding: theme.spacing(0),
|
|
3274
|
+
background: 'transparent'
|
|
3260
3275
|
}
|
|
3261
3276
|
};
|
|
3262
3277
|
theme.overrides.MuiSnackbarContent = {
|
|
3263
3278
|
root: {
|
|
3264
|
-
width: '100%',
|
|
3265
|
-
borderRadius: 0,
|
|
3266
3279
|
minHeight: theme.spacing(7.5),
|
|
3267
|
-
|
|
3268
|
-
width:
|
|
3269
|
-
|
|
3270
|
-
|
|
3280
|
+
'&.SD-SnackbarContent-root': {
|
|
3281
|
+
width: '100%',
|
|
3282
|
+
position: 'relative',
|
|
3283
|
+
left: 0,
|
|
3284
|
+
right: 0,
|
|
3285
|
+
bottom: 0,
|
|
3286
|
+
borderRadius: theme.spacing(0),
|
|
3287
|
+
[theme.breakpoints.up('sm')]: {
|
|
3288
|
+
borderRadius: theme.spacing(0.5)
|
|
3289
|
+
}
|
|
3271
3290
|
}
|
|
3272
3291
|
},
|
|
3273
3292
|
message: {
|
|
@@ -3496,6 +3515,10 @@ function overrideTextField(theme) {
|
|
|
3496
3515
|
}),
|
|
3497
3516
|
input: {
|
|
3498
3517
|
textOverflow: 'ellipsis',
|
|
3518
|
+
'&::placeholder': {
|
|
3519
|
+
color: Color.Dark100,
|
|
3520
|
+
opacity: 1
|
|
3521
|
+
},
|
|
3499
3522
|
'&.MuiInputBase-input': {
|
|
3500
3523
|
fontSize: theme.spacing(2),
|
|
3501
3524
|
[sm]: {
|
|
@@ -3868,6 +3891,7 @@ function createSuperDispatchTheme() {
|
|
|
3868
3891
|
overrideTooltip(theme);
|
|
3869
3892
|
overrideTypography(theme);
|
|
3870
3893
|
overridePagination(theme);
|
|
3894
|
+
overridePreloader(theme);
|
|
3871
3895
|
return theme;
|
|
3872
3896
|
}
|
|
3873
3897
|
|
|
@@ -3880,6 +3904,10 @@ function generateClassName(rule, sheet) {
|
|
|
3880
3904
|
} = (sheet === null || sheet === void 0 ? void 0 : sheet.options) || {};
|
|
3881
3905
|
|
|
3882
3906
|
if (meta && rule.type === 'style') {
|
|
3907
|
+
if (meta.startsWith('MuiSnackbar') && sheet) {
|
|
3908
|
+
return "SDSnackbar-".concat(rule.key);
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3883
3911
|
if (meta.startsWith('SD-')) {
|
|
3884
3912
|
return "".concat(meta, "-").concat(rule.key);
|
|
3885
3913
|
}
|