@superdispatch/ui 0.24.4 → 0.24.6
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 +30 -14
- package/dist-node/index.js.map +1 -1
- package/dist-src/pagination/PaginationOverrides.js +3 -3
- package/dist-src/snackbar/SnackbarContent.js +24 -8
- package/dist-src/switch/SwitchOverrides.js +4 -4
- package/dist-src/theme/Color.js +1 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-web/index.js +31 -15
- package/dist-web/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ export function overridePagination(theme) {
|
|
|
3
3
|
var props = {};
|
|
4
4
|
var overrides = {
|
|
5
5
|
root: {
|
|
6
|
-
color: Color.
|
|
6
|
+
color: Color.Dark500
|
|
7
7
|
},
|
|
8
8
|
page: {
|
|
9
9
|
'&:hover': {
|
|
@@ -12,12 +12,12 @@ export function overridePagination(theme) {
|
|
|
12
12
|
'&$focusVisible': {
|
|
13
13
|
borderRadius: 4,
|
|
14
14
|
backgroundColor: Color.White,
|
|
15
|
-
border: "1px solid ".concat(Color.
|
|
15
|
+
border: "1px solid ".concat(Color.Blue30)
|
|
16
16
|
},
|
|
17
17
|
'&$selected': {
|
|
18
18
|
backgroundColor: Color.Silver400,
|
|
19
19
|
'&:hover, &$focusVisible': {
|
|
20
|
-
backgroundColor: Color.
|
|
20
|
+
backgroundColor: Color.Silver500
|
|
21
21
|
},
|
|
22
22
|
'&$disabled': {
|
|
23
23
|
color: Color.Dark100,
|
|
@@ -3,28 +3,36 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["action", "children", "onClose", "className", "classes", "variant"],
|
|
4
4
|
_excluded2 = ["icon", "closeButton", "variantError", "variantSuccess"];
|
|
5
5
|
import { Grid, IconButton, SnackbarContent as MuiSnackbarContent } from '@material-ui/core';
|
|
6
|
-
import { CheckCircle, Close,
|
|
6
|
+
import { CheckCircle, Close, Error } from '@material-ui/icons';
|
|
7
7
|
import { makeStyles } from '@material-ui/styles';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import { forwardRef } from 'react';
|
|
10
|
+
import styled from 'styled-components';
|
|
10
11
|
import { Color } from "../theme/Color.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
var PaddedContent = /*#__PURE__*/styled.span.withConfig({
|
|
16
|
+
displayName: "SnackbarContent__PaddedContent",
|
|
17
|
+
componentId: "SD__sc-1jca4d5-0"
|
|
18
|
+
})(["padding:2px 0 0;"]);
|
|
14
19
|
var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
15
20
|
root: {
|
|
16
21
|
color: Color.White,
|
|
17
22
|
backgroundColor: Color.Dark500,
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
alignItems: 'flex-start',
|
|
24
|
+
padding: '10px 16px',
|
|
25
|
+
[theme.breakpoints.up('md')]: {
|
|
26
|
+
width: 'auto',
|
|
27
|
+
maxWidth: '512px',
|
|
28
|
+
minWidth: '432px'
|
|
21
29
|
}
|
|
22
30
|
},
|
|
23
31
|
action: {
|
|
24
32
|
paddingLeft: theme.spacing(1)
|
|
25
33
|
},
|
|
26
34
|
message: {
|
|
27
|
-
alignItems: '
|
|
35
|
+
alignItems: 'flex-start',
|
|
28
36
|
[theme.breakpoints.down('xs')]: {
|
|
29
37
|
fontSize: theme.spacing(2)
|
|
30
38
|
}
|
|
@@ -40,7 +48,13 @@ var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
|
40
48
|
color: Color.White40
|
|
41
49
|
}
|
|
42
50
|
},
|
|
43
|
-
variantError: {
|
|
51
|
+
variantError: {
|
|
52
|
+
color: Color.Red500,
|
|
53
|
+
background: Color.Red50,
|
|
54
|
+
'& $closeButton': {
|
|
55
|
+
color: Color.Red500
|
|
56
|
+
}
|
|
57
|
+
},
|
|
44
58
|
variantSuccess: {}
|
|
45
59
|
}), {
|
|
46
60
|
name: 'SD-SnackbarContent'
|
|
@@ -67,7 +81,7 @@ export var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
67
81
|
} = _useStyles,
|
|
68
82
|
styles = _objectWithoutProperties(_useStyles, _excluded2);
|
|
69
83
|
|
|
70
|
-
var Icon = variant === 'error' ?
|
|
84
|
+
var Icon = variant === 'error' ? Error : variant === 'success' ? CheckCircle : undefined;
|
|
71
85
|
return /*#__PURE__*/_jsx(MuiSnackbarContent, _objectSpread(_objectSpread({}, props), {}, {
|
|
72
86
|
ref: ref,
|
|
73
87
|
classes: styles,
|
|
@@ -78,7 +92,9 @@ export var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
78
92
|
message: /*#__PURE__*/_jsxs(_Fragment, {
|
|
79
93
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
|
80
94
|
className: icon
|
|
81
|
-
}),
|
|
95
|
+
}), /*#__PURE__*/_jsx(PaddedContent, {
|
|
96
|
+
children: children
|
|
97
|
+
})]
|
|
82
98
|
}),
|
|
83
99
|
action: !action && !onClose ? null : /*#__PURE__*/_jsxs(Grid, {
|
|
84
100
|
container: true,
|
|
@@ -63,7 +63,7 @@ export function overrideSwitch(theme) {
|
|
|
63
63
|
'&:hover': {
|
|
64
64
|
backgroundColor: undefined,
|
|
65
65
|
'& + $track': {
|
|
66
|
-
backgroundColor: Color.
|
|
66
|
+
backgroundColor: Color.Blue500
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
},
|
|
@@ -71,16 +71,16 @@ export function overrideSwitch(theme) {
|
|
|
71
71
|
backgroundColor: Color.Silver500
|
|
72
72
|
},
|
|
73
73
|
'&$disabled + $track': {
|
|
74
|
-
backgroundColor: Color.
|
|
74
|
+
backgroundColor: Color.Dark30
|
|
75
75
|
},
|
|
76
76
|
'&$checked$disabled + $track': {
|
|
77
|
-
backgroundColor: Color.
|
|
77
|
+
backgroundColor: Color.Blue30
|
|
78
78
|
},
|
|
79
79
|
'&:hover + $track': {
|
|
80
80
|
backgroundColor: Color.Dark100
|
|
81
81
|
},
|
|
82
82
|
'&.Mui-focusVisible + $track': {
|
|
83
|
-
boxShadow: "0 0 0 3px ".concat(Color.
|
|
83
|
+
boxShadow: "0 0 0 3px ".concat(Color.Blue30)
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
};
|
package/dist-src/theme/Color.js
CHANGED
|
@@ -17,6 +17,7 @@ export var Color;
|
|
|
17
17
|
Color["Red30"] = "rgba(229, 35, 13, 0.3)";
|
|
18
18
|
Color["Silver30"] = "rgba(225, 229, 234, 0.3)";
|
|
19
19
|
Color["Blue10"] = "rgba(0, 112, 245, 0.1)";
|
|
20
|
+
Color["Red10"] = "rgba(195, 25, 9, 0.1)";
|
|
20
21
|
Color["Grey100"] = "#8F949E";
|
|
21
22
|
Color["Grey200"] = "#6A707C";
|
|
22
23
|
Color["Grey300"] = "#5B6371";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -371,6 +371,7 @@ declare enum Color {
|
|
|
371
371
|
Red30 = "rgba(229, 35, 13, 0.3)",
|
|
372
372
|
Silver30 = "rgba(225, 229, 234, 0.3)",
|
|
373
373
|
Blue10 = "rgba(0, 112, 245, 0.1)",
|
|
374
|
+
Red10 = "rgba(195, 25, 9, 0.1)",
|
|
374
375
|
/**@deprecated Use Dark100 */
|
|
375
376
|
Grey100 = "#8F949E",
|
|
376
377
|
/**@deprecated Use Dark200 */
|
package/dist-web/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { Button as Button$1, CircularProgress, ButtonGroup, Popover, MenuList, Toolbar, Grid, MenuItem, Typography, Menu, Divider, ButtonBase, Avatar, FormHelperText as FormHelperText$4, FormControlLabel as FormControlLabel$1, Checkbox, FormControl as FormControl$2, FormLabel as FormLabel$2, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card as Card$1, CardContent, IconButton, TextField, Radio, RadioGroup, SnackbarContent as SnackbarContent$1, Portal, Snackbar as Snackbar$1, Slide, CssBaseline, createTheme, createGenerateClassName } from '@material-ui/core';
|
|
4
|
-
import { MoreHoriz, Info, Close,
|
|
4
|
+
import { MoreHoriz, Info, Close, Error, CheckCircle } from '@material-ui/icons';
|
|
5
5
|
import { makeStyles, StylesProvider, ThemeProvider as ThemeProvider$1 } from '@material-ui/styles';
|
|
6
6
|
import { forwardRef, useState, useRef, useLayoutEffect, cloneElement, useMemo, useContext, createContext, Children, useCallback, useEffect } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -451,6 +451,7 @@ var Color;
|
|
|
451
451
|
Color["Red30"] = "rgba(229, 35, 13, 0.3)";
|
|
452
452
|
Color["Silver30"] = "rgba(225, 229, 234, 0.3)";
|
|
453
453
|
Color["Blue10"] = "rgba(0, 112, 245, 0.1)";
|
|
454
|
+
Color["Red10"] = "rgba(195, 25, 9, 0.1)";
|
|
454
455
|
Color["Grey100"] = "#8F949E";
|
|
455
456
|
Color["Grey200"] = "#6A707C";
|
|
456
457
|
Color["Grey300"] = "#5B6371";
|
|
@@ -2022,20 +2023,27 @@ function useMinBreakpoint(minBreakpoint) {
|
|
|
2022
2023
|
|
|
2023
2024
|
var _excluded$m = ["action", "children", "onClose", "className", "classes", "variant"],
|
|
2024
2025
|
_excluded2$4 = ["icon", "closeButton", "variantError", "variantSuccess"];
|
|
2026
|
+
var PaddedContent = /*#__PURE__*/styled.span.withConfig({
|
|
2027
|
+
displayName: "SnackbarContent__PaddedContent",
|
|
2028
|
+
componentId: "SD__sc-1jca4d5-0"
|
|
2029
|
+
})(["padding:2px 0 0;"]);
|
|
2025
2030
|
var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
|
|
2026
2031
|
root: {
|
|
2027
2032
|
color: Color.White,
|
|
2028
2033
|
backgroundColor: Color.Dark500,
|
|
2029
|
-
'
|
|
2030
|
-
|
|
2031
|
-
|
|
2034
|
+
alignItems: 'flex-start',
|
|
2035
|
+
padding: '10px 16px',
|
|
2036
|
+
[theme.breakpoints.up('md')]: {
|
|
2037
|
+
width: 'auto',
|
|
2038
|
+
maxWidth: '512px',
|
|
2039
|
+
minWidth: '432px'
|
|
2032
2040
|
}
|
|
2033
2041
|
},
|
|
2034
2042
|
action: {
|
|
2035
2043
|
paddingLeft: theme.spacing(1)
|
|
2036
2044
|
},
|
|
2037
2045
|
message: {
|
|
2038
|
-
alignItems: '
|
|
2046
|
+
alignItems: 'flex-start',
|
|
2039
2047
|
[theme.breakpoints.down('xs')]: {
|
|
2040
2048
|
fontSize: theme.spacing(2)
|
|
2041
2049
|
}
|
|
@@ -2051,7 +2059,13 @@ var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
|
|
|
2051
2059
|
color: Color.White40
|
|
2052
2060
|
}
|
|
2053
2061
|
},
|
|
2054
|
-
variantError: {
|
|
2062
|
+
variantError: {
|
|
2063
|
+
color: Color.Red500,
|
|
2064
|
+
background: Color.Red50,
|
|
2065
|
+
'& $closeButton': {
|
|
2066
|
+
color: Color.Red500
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2055
2069
|
variantSuccess: {}
|
|
2056
2070
|
}), {
|
|
2057
2071
|
name: 'SD-SnackbarContent'
|
|
@@ -2078,7 +2092,7 @@ var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2078
2092
|
} = _useStyles,
|
|
2079
2093
|
styles = _objectWithoutProperties(_useStyles, _excluded2$4);
|
|
2080
2094
|
|
|
2081
|
-
var Icon = variant === 'error' ?
|
|
2095
|
+
var Icon = variant === 'error' ? Error : variant === 'success' ? CheckCircle : undefined;
|
|
2082
2096
|
return /*#__PURE__*/jsx(SnackbarContent$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
2083
2097
|
ref: ref,
|
|
2084
2098
|
classes: styles,
|
|
@@ -2089,7 +2103,9 @@ var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2089
2103
|
message: /*#__PURE__*/jsxs(Fragment, {
|
|
2090
2104
|
children: [Icon && /*#__PURE__*/jsx(Icon, {
|
|
2091
2105
|
className: icon
|
|
2092
|
-
}),
|
|
2106
|
+
}), /*#__PURE__*/jsx(PaddedContent, {
|
|
2107
|
+
children: children
|
|
2108
|
+
})]
|
|
2093
2109
|
}),
|
|
2094
2110
|
action: !action && !onClose ? null : /*#__PURE__*/jsxs(Grid, {
|
|
2095
2111
|
container: true,
|
|
@@ -3139,7 +3155,7 @@ function overridePagination(theme) {
|
|
|
3139
3155
|
var props = {};
|
|
3140
3156
|
var overrides = {
|
|
3141
3157
|
root: {
|
|
3142
|
-
color: Color.
|
|
3158
|
+
color: Color.Dark500
|
|
3143
3159
|
},
|
|
3144
3160
|
page: {
|
|
3145
3161
|
'&:hover': {
|
|
@@ -3148,12 +3164,12 @@ function overridePagination(theme) {
|
|
|
3148
3164
|
'&$focusVisible': {
|
|
3149
3165
|
borderRadius: 4,
|
|
3150
3166
|
backgroundColor: Color.White,
|
|
3151
|
-
border: "1px solid ".concat(Color.
|
|
3167
|
+
border: "1px solid ".concat(Color.Blue30)
|
|
3152
3168
|
},
|
|
3153
3169
|
'&$selected': {
|
|
3154
3170
|
backgroundColor: Color.Silver400,
|
|
3155
3171
|
'&:hover, &$focusVisible': {
|
|
3156
|
-
backgroundColor: Color.
|
|
3172
|
+
backgroundColor: Color.Silver500
|
|
3157
3173
|
},
|
|
3158
3174
|
'&$disabled': {
|
|
3159
3175
|
color: Color.Dark100,
|
|
@@ -3350,7 +3366,7 @@ function overrideSwitch(theme) {
|
|
|
3350
3366
|
'&:hover': {
|
|
3351
3367
|
backgroundColor: undefined,
|
|
3352
3368
|
'& + $track': {
|
|
3353
|
-
backgroundColor: Color.
|
|
3369
|
+
backgroundColor: Color.Blue500
|
|
3354
3370
|
}
|
|
3355
3371
|
}
|
|
3356
3372
|
},
|
|
@@ -3358,16 +3374,16 @@ function overrideSwitch(theme) {
|
|
|
3358
3374
|
backgroundColor: Color.Silver500
|
|
3359
3375
|
},
|
|
3360
3376
|
'&$disabled + $track': {
|
|
3361
|
-
backgroundColor: Color.
|
|
3377
|
+
backgroundColor: Color.Dark30
|
|
3362
3378
|
},
|
|
3363
3379
|
'&$checked$disabled + $track': {
|
|
3364
|
-
backgroundColor: Color.
|
|
3380
|
+
backgroundColor: Color.Blue30
|
|
3365
3381
|
},
|
|
3366
3382
|
'&:hover + $track': {
|
|
3367
3383
|
backgroundColor: Color.Dark100
|
|
3368
3384
|
},
|
|
3369
3385
|
'&.Mui-focusVisible + $track': {
|
|
3370
|
-
boxShadow: "0 0 0 3px ".concat(Color.
|
|
3386
|
+
boxShadow: "0 0 0 3px ".concat(Color.Blue30)
|
|
3371
3387
|
}
|
|
3372
3388
|
}
|
|
3373
3389
|
};
|