@superdispatch/ui 0.21.5-alpha.4 → 0.21.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 +1359 -1442
- package/dist-node/index.js.map +1 -1
- package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +12 -14
- package/dist-src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +3 -3
- package/dist-src/app-bar/AppBarOverrides.js +4 -6
- package/dist-src/autocomplete/AutocompleteOverrides.js +18 -14
- package/dist-src/avatar/AvatarOverrides.js +12 -14
- package/dist-src/avatar-button/AvatarButton.js +92 -80
- package/dist-src/button/Button.js +15 -11
- package/dist-src/button/ButtonOverrides.js +149 -147
- package/dist-src/card/CardOverrides.js +6 -10
- package/dist-src/card-button/CardButton.js +75 -78
- package/dist-src/checkbox/CheckboxField.js +1 -1
- package/dist-src/checkbox/CheckboxGroudField.js +1 -1
- package/dist-src/checkbox/CheckboxOverrides.js +50 -60
- package/dist-src/chip/ChipOverrides.js +85 -88
- package/dist-src/description-list/DescriptionList.js +55 -58
- package/dist-src/dialog/DialogOverrides.js +25 -31
- package/dist-src/drawer/DrawerActions.js +34 -32
- package/dist-src/drawer/DrawerContent.js +26 -10
- package/dist-src/drawer/DrawerList.js +27 -8
- package/dist-src/drawer/DrawerOverrides.js +10 -12
- package/dist-src/drawer/DrawerTitle.js +40 -46
- package/dist-src/dropdown-button/DropdownButton.js +1 -1
- package/dist-src/grid/GridStack.js +1 -1
- package/dist-src/grid/InlineGrid.js +2 -2
- package/dist-src/icon-button/IconButtonOverrides.js +32 -48
- package/dist-src/info-card/InfoCard.js +37 -27
- package/dist-src/link/LinkOverrides.js +26 -29
- package/dist-src/list/ListOverrides.js +7 -10
- package/dist-src/menu/MenuOverrides.js +14 -28
- package/dist-src/number-field/NumberField.js +3 -2
- package/dist-src/overflow-text/OverflowText.js +34 -35
- package/dist-src/pagination/PaginationOverrides.js +32 -27
- package/dist-src/paper/PaperOverrides.js +6 -8
- package/dist-src/radio/RadioField.js +1 -1
- package/dist-src/radio/RadioGroupField.js +1 -1
- package/dist-src/radio/RadioOverrides.js +36 -38
- package/dist-src/responsive/ResponsiveContext.js +1 -1
- package/dist-src/snackbar/Snackbar.js +1 -1
- package/dist-src/snackbar/SnackbarContent.js +3 -3
- package/dist-src/snackbar/SnackbarOverrides.js +18 -28
- package/dist-src/svg-icon/SvgIconOverrides.js +18 -28
- package/dist-src/switch/SwitchOverrides.js +71 -72
- package/dist-src/tabs/TabsOverrides.js +30 -34
- package/dist-src/tag/Tag.js +2 -2
- package/dist-src/text-field/TextFieldOverrides.js +137 -158
- package/dist-src/theme/ThemeProvider.js +28 -25
- package/dist-src/tiles/Tiles.js +3 -4
- package/dist-src/toolbar/ToolbarOverrides.js +8 -10
- package/dist-src/tooltip/TooltipOverrides.js +30 -33
- package/dist-src/typography/TypographyOverrides.js +2 -12
- package/dist-types/index.d.ts +381 -385
- package/dist-web/index.js +1291 -1374
- package/dist-web/index.js.map +1 -1
- package/package.json +39 -39
- package/dist-src/theme/CssBaselineOverrides.js +0 -8
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import { loadingButtonClasses } from '@mui/lab';
|
|
3
|
-
import { buttonClasses } from '@mui/material';
|
|
4
1
|
import { Color } from "../theme/Color.js";
|
|
5
2
|
|
|
6
3
|
function outlineShadow() {
|
|
@@ -11,11 +8,9 @@ function outlineShadow() {
|
|
|
11
8
|
|
|
12
9
|
function textVariant(text, outline, background, progress) {
|
|
13
10
|
return {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
backgroundColor: Color.Transparent
|
|
18
|
-
},
|
|
11
|
+
color: text,
|
|
12
|
+
boxShadow: outlineShadow(),
|
|
13
|
+
backgroundColor: Color.Transparent,
|
|
19
14
|
'&:hover': {
|
|
20
15
|
backgroundColor: background
|
|
21
16
|
},
|
|
@@ -26,13 +21,13 @@ function textVariant(text, outline, background, progress) {
|
|
|
26
21
|
backgroundColor: background,
|
|
27
22
|
boxShadow: outlineShadow(2, outline)
|
|
28
23
|
},
|
|
29
|
-
|
|
24
|
+
'&$disabled': {
|
|
30
25
|
color: outline,
|
|
31
26
|
boxShadow: outlineShadow(),
|
|
32
|
-
backgroundColor: Color.Transparent
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
backgroundColor: Color.Transparent
|
|
28
|
+
},
|
|
29
|
+
'&$disabled[aria-busy="true"]': {
|
|
30
|
+
color: progress
|
|
36
31
|
}
|
|
37
32
|
};
|
|
38
33
|
}
|
|
@@ -46,11 +41,11 @@ function outlinedVariant(staleText, staleBorder, disabledText, disabledBorder, a
|
|
|
46
41
|
return {
|
|
47
42
|
backgroundColor,
|
|
48
43
|
color: staleText,
|
|
49
|
-
border:
|
|
44
|
+
border: undefined,
|
|
50
45
|
boxShadow: outlinedBorder(staleBorder),
|
|
51
46
|
'&:hover': {
|
|
52
47
|
color: activeText,
|
|
53
|
-
border:
|
|
48
|
+
border: undefined,
|
|
54
49
|
backgroundColor: activeBackground,
|
|
55
50
|
boxShadow: outlinedBorder(activeBorder)
|
|
56
51
|
},
|
|
@@ -62,13 +57,13 @@ function outlinedVariant(staleText, staleBorder, disabledText, disabledBorder, a
|
|
|
62
57
|
'&:focus': {
|
|
63
58
|
boxShadow: outlinedBorder(activeBorder, activeOutline)
|
|
64
59
|
},
|
|
65
|
-
|
|
60
|
+
'&$disabled': {
|
|
66
61
|
backgroundColor,
|
|
67
62
|
color: disabledText,
|
|
68
|
-
boxShadow: outlinedBorder(disabledBorder)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
boxShadow: outlinedBorder(disabledBorder)
|
|
64
|
+
},
|
|
65
|
+
'&$disabled[aria-busy="true"]': {
|
|
66
|
+
color: progress
|
|
72
67
|
}
|
|
73
68
|
};
|
|
74
69
|
}
|
|
@@ -87,152 +82,159 @@ function containedVariant(text, backgroundColor, outline, active, disabledText,
|
|
|
87
82
|
'&:focus': {
|
|
88
83
|
boxShadow: outlineShadow(3, outline)
|
|
89
84
|
},
|
|
90
|
-
|
|
85
|
+
'&$disabled': {
|
|
91
86
|
color: disabledText,
|
|
92
87
|
boxShadow: outlineShadow(),
|
|
93
|
-
backgroundColor: disabledBackground
|
|
94
|
-
["& .".concat(loadingButtonClasses.loadingIndicator)]: {
|
|
95
|
-
color: disabledText
|
|
96
|
-
}
|
|
88
|
+
backgroundColor: disabledBackground
|
|
97
89
|
}
|
|
98
90
|
};
|
|
99
91
|
}
|
|
100
92
|
|
|
101
|
-
function sizeSmall(theme) {
|
|
102
|
-
var sm = theme.breakpoints.up('sm');
|
|
103
|
-
return _objectSpread(_objectSpread({}, theme.typography.button), {}, {
|
|
104
|
-
padding: theme.spacing(0.5, 3),
|
|
105
|
-
[sm]: {
|
|
106
|
-
padding: theme.spacing(0.25, 2)
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function sizeLarge(theme) {
|
|
112
|
-
var sm = theme.breakpoints.up('sm');
|
|
113
|
-
return _objectSpread(_objectSpread({}, theme.typography.button), {}, {
|
|
114
|
-
fontSize: '18px',
|
|
115
|
-
lineHeight: '28px',
|
|
116
|
-
padding: theme.spacing(1.75, 8),
|
|
117
|
-
[sm]: {
|
|
118
|
-
fontSize: '16px',
|
|
119
|
-
lineHeight: '24px',
|
|
120
|
-
padding: theme.spacing(1, 4)
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
|
|
125
93
|
export function overrideButton(theme) {
|
|
126
94
|
var sm = theme.breakpoints.up('sm');
|
|
127
|
-
theme.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
styleOverrides: {
|
|
132
|
-
loadingIndicator: {
|
|
133
|
-
color: 'inherit',
|
|
134
|
-
fontSize: theme.spacing(2),
|
|
135
|
-
[".".concat(buttonClasses.sizeLarge, " &")]: {
|
|
136
|
-
fontSize: theme.spacing(3)
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
95
|
+
theme.props.MuiButton = {
|
|
96
|
+
color: 'primary',
|
|
97
|
+
variant: 'outlined',
|
|
98
|
+
disableFocusRipple: true
|
|
140
99
|
};
|
|
141
|
-
theme.
|
|
142
|
-
|
|
143
|
-
color:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
100
|
+
theme.overrides.MuiButton = {
|
|
101
|
+
root: {
|
|
102
|
+
color: undefined,
|
|
103
|
+
minWidth: theme.spacing(6),
|
|
104
|
+
transition: theme.transitions.create(['color', 'border', 'box-shadow', 'background-color']),
|
|
105
|
+
padding: theme.spacing(1.25, 3),
|
|
106
|
+
[sm]: {
|
|
107
|
+
padding: theme.spacing(0.75, 2)
|
|
108
|
+
},
|
|
109
|
+
'&:hover': {
|
|
110
|
+
backgroundColor: undefined,
|
|
111
|
+
'&$disabled': {
|
|
112
|
+
backgroundColor: undefined
|
|
154
113
|
},
|
|
155
|
-
'
|
|
156
|
-
backgroundColor:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
114
|
+
'@media (hover: none)': {
|
|
115
|
+
backgroundColor: undefined
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
'&$disabled': {
|
|
119
|
+
color: undefined
|
|
120
|
+
},
|
|
121
|
+
'&[aria-busy="true"]': {
|
|
122
|
+
'& $label': {
|
|
123
|
+
visibility: 'hidden',
|
|
124
|
+
'& > [role="progressbar"]': {
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
visibility: 'visible',
|
|
127
|
+
top: 'calc(50% - 0.5em)',
|
|
128
|
+
left: 'calc(50% - 0.5em)',
|
|
129
|
+
fontSize: theme.spacing(2),
|
|
130
|
+
'$sizeLarge &': {
|
|
131
|
+
fontSize: theme.spacing(3)
|
|
132
|
+
}
|
|
162
133
|
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
label: {
|
|
138
|
+
'& > .MuiSvgIcon-root': {
|
|
139
|
+
fontSize: '24px',
|
|
140
|
+
[sm]: {
|
|
141
|
+
fontSize: '20px'
|
|
163
142
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
'& > .MuiSvgIcon-root': {
|
|
168
|
-
fontSize: '24px',
|
|
143
|
+
'$sizeLarge &': {
|
|
144
|
+
fontSize: '28px',
|
|
169
145
|
[sm]: {
|
|
170
|
-
fontSize: '
|
|
171
|
-
},
|
|
172
|
-
[".".concat(buttonClasses.sizeLarge, "&")]: {
|
|
173
|
-
fontSize: '28px',
|
|
174
|
-
[sm]: {
|
|
175
|
-
fontSize: '24px'
|
|
176
|
-
}
|
|
146
|
+
fontSize: '24px'
|
|
177
147
|
}
|
|
178
148
|
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
sizeSmall: {
|
|
152
|
+
padding: theme.spacing(0.5, 3),
|
|
153
|
+
[sm]: {
|
|
154
|
+
padding: theme.spacing(0.25, 2)
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
sizeLarge: {
|
|
158
|
+
fontSize: '18px',
|
|
159
|
+
lineHeight: '28px',
|
|
160
|
+
padding: theme.spacing(1.75, 8),
|
|
161
|
+
[sm]: {
|
|
162
|
+
fontSize: '16px',
|
|
163
|
+
lineHeight: '24px',
|
|
164
|
+
padding: theme.spacing(1, 4)
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
text: {
|
|
168
|
+
padding: undefined,
|
|
169
|
+
'&[data-color="error"]': textVariant(Color.Red300, Color.Red100, Color.Red50, Color.Red200),
|
|
170
|
+
'&[data-color="success"]': textVariant(Color.Green300, Color.Green100, Color.Green50, Color.Green200),
|
|
171
|
+
'&[data-color="white"]': textVariant(Color.White, Color.White50, Color.White10, Color.White50)
|
|
172
|
+
},
|
|
173
|
+
textPrimary: textVariant(Color.Blue300, Color.Blue100, Color.Blue50, Color.Blue200),
|
|
174
|
+
textSizeSmall: {
|
|
175
|
+
padding: undefined,
|
|
176
|
+
fontSize: undefined
|
|
177
|
+
},
|
|
178
|
+
textSizeLarge: {
|
|
179
|
+
padding: undefined,
|
|
180
|
+
fontSize: undefined
|
|
181
|
+
},
|
|
182
|
+
outlined: {
|
|
183
|
+
border: undefined,
|
|
184
|
+
padding: undefined,
|
|
185
|
+
'&$disabled': {
|
|
186
|
+
border: undefined
|
|
179
187
|
},
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
'&[data-color="error"]': outlinedVariant(Color.Red300, Color.Red300, Color.Red100, Color.Red100, Color.Red300, Color.Red300, Color.Red100, Color.Red50, Color.Red300, Color.White),
|
|
189
|
+
'&[data-color="success"]': outlinedVariant(Color.Green300, Color.Green300, Color.Green100, Color.Green100, Color.Green300, Color.Green300, Color.Green100, Color.Green50, Color.Green300, Color.White),
|
|
190
|
+
'&[data-color="white"]': outlinedVariant(Color.White, Color.White50, Color.White50, Color.White40, Color.White, Color.White50, Color.White40, Color.White10, Color.White50, Color.Transparent)
|
|
191
|
+
},
|
|
192
|
+
outlinedPrimary: outlinedVariant(Color.Dark500, Color.Silver500, Color.Silver500, Color.Silver400, Color.Blue300, Color.Blue300, Color.Blue100, Color.Blue50, Color.Dark200, Color.White),
|
|
193
|
+
outlinedSizeSmall: {
|
|
194
|
+
padding: undefined,
|
|
195
|
+
fontSize: undefined
|
|
196
|
+
},
|
|
197
|
+
outlinedSizeLarge: {
|
|
198
|
+
padding: undefined,
|
|
199
|
+
fontSize: undefined
|
|
200
|
+
},
|
|
201
|
+
contained: {
|
|
202
|
+
boxShadow: undefined,
|
|
203
|
+
backgroundColor: undefined,
|
|
204
|
+
'&:hover': {
|
|
205
|
+
boxShadow: undefined,
|
|
206
|
+
backgroundColor: undefined,
|
|
207
|
+
'&$disabled': {
|
|
208
|
+
backgroundColor: undefined
|
|
196
209
|
},
|
|
197
|
-
'
|
|
198
|
-
|
|
199
|
-
|
|
210
|
+
'@media (hover: none)': {
|
|
211
|
+
boxShadow: undefined,
|
|
212
|
+
backgroundColor: undefined
|
|
213
|
+
}
|
|
200
214
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
boxShadow:
|
|
206
|
-
backgroundColor: 'initial',
|
|
207
|
-
'&:hover': {
|
|
208
|
-
boxShadow: 'none',
|
|
209
|
-
backgroundColor: 'initial',
|
|
210
|
-
["&.".concat(buttonClasses.disabled)]: {
|
|
211
|
-
backgroundColor: 'none'
|
|
212
|
-
},
|
|
213
|
-
'@media (hover: none)': {
|
|
214
|
-
boxShadow: 'none',
|
|
215
|
-
backgroundColor: 'none'
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
'&:active': {
|
|
219
|
-
boxShadow: 'none'
|
|
220
|
-
},
|
|
221
|
-
["&.".concat(buttonClasses.focusVisible)]: {
|
|
222
|
-
boxShadow: 'none'
|
|
223
|
-
},
|
|
224
|
-
["&.".concat(buttonClasses.disabled)]: {
|
|
225
|
-
color: 'initial',
|
|
226
|
-
boxShadow: 'none',
|
|
227
|
-
backgroundColor: 'initial'
|
|
228
|
-
},
|
|
229
|
-
'&[data-color="error"]': containedVariant(Color.White, Color.Red300, Color.Red100, Color.Red500, Color.White, Color.Red100),
|
|
230
|
-
'&[data-color="success"]': containedVariant(Color.White, Color.Green300, Color.Green100, Color.Green500, Color.White, Color.Green100),
|
|
231
|
-
'&[data-color="white"]': containedVariant(Color.White, Color.White20, Color.White40, Color.White40, Color.White50, Color.White08)
|
|
215
|
+
'&:active': {
|
|
216
|
+
boxShadow: undefined
|
|
217
|
+
},
|
|
218
|
+
'&$focusVisible': {
|
|
219
|
+
boxShadow: undefined
|
|
232
220
|
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
221
|
+
'&$disabled': {
|
|
222
|
+
color: undefined,
|
|
223
|
+
boxShadow: undefined,
|
|
224
|
+
backgroundColor: undefined
|
|
225
|
+
},
|
|
226
|
+
'&[data-color="error"]': containedVariant(Color.White, Color.Red300, Color.Red100, Color.Red500, Color.White, Color.Red100),
|
|
227
|
+
'&[data-color="success"]': containedVariant(Color.White, Color.Green300, Color.Green100, Color.Green500, Color.White, Color.Green100),
|
|
228
|
+
'&[data-color="white"]': containedVariant(Color.White, Color.White20, Color.White40, Color.White40, Color.White50, Color.White08)
|
|
229
|
+
},
|
|
230
|
+
containedPrimary: containedVariant(Color.White, Color.Blue300, Color.Blue100, Color.Blue500, Color.White, Color.Blue100),
|
|
231
|
+
containedSizeSmall: {
|
|
232
|
+
padding: undefined,
|
|
233
|
+
fontSize: undefined
|
|
234
|
+
},
|
|
235
|
+
containedSizeLarge: {
|
|
236
|
+
padding: undefined,
|
|
237
|
+
fontSize: undefined
|
|
236
238
|
}
|
|
237
239
|
};
|
|
238
240
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
export function overrideCard(theme) {
|
|
2
|
-
theme.
|
|
3
|
-
|
|
4
|
-
variant: 'outlined'
|
|
5
|
-
}
|
|
2
|
+
theme.props.MuiCard = {
|
|
3
|
+
variant: 'outlined'
|
|
6
4
|
};
|
|
7
|
-
theme.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
paddingBottom: '16px'
|
|
12
|
-
}
|
|
5
|
+
theme.overrides.MuiCardContent = {
|
|
6
|
+
root: {
|
|
7
|
+
'&:last-child': {
|
|
8
|
+
paddingBottom: undefined
|
|
13
9
|
}
|
|
14
10
|
}
|
|
15
11
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["hint", "size", "error", "classes", "className", "children", "endIcon", "startIcon", "disabled"];
|
|
4
|
-
import { ButtonBase,
|
|
4
|
+
import { ButtonBase, Typography } from '@material-ui/core';
|
|
5
|
+
import { makeStyles } from '@material-ui/styles';
|
|
6
|
+
import clsx from 'clsx';
|
|
5
7
|
import { forwardRef } from 'react';
|
|
6
8
|
import { Color } from "../theme/Color.js";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
theme
|
|
13
|
-
} = _ref;
|
|
14
|
-
return {
|
|
12
|
+
var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
13
|
+
root: {
|
|
15
14
|
width: '100%',
|
|
16
15
|
display: 'flex',
|
|
17
16
|
alignItems: 'center',
|
|
@@ -22,74 +21,66 @@ var StyledButton = /*#__PURE__*/styled(ButtonBase)(_ref => {
|
|
|
22
21
|
borderRadius: theme.spacing(0.5),
|
|
23
22
|
padding: theme.spacing(1.5),
|
|
24
23
|
minHeight: theme.spacing(13),
|
|
25
|
-
transition: theme.transitions.create(['color', 'box-shadow', 'border-color', 'background-color'])
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
backgroundColor: Color.Red50,
|
|
46
|
-
'&:focus': {
|
|
47
|
-
backgroundColor: Color.Red75
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
'&[data-size="small"]': {
|
|
51
|
-
minHeight: theme.spacing(6)
|
|
24
|
+
transition: theme.transitions.create(['color', 'box-shadow', 'border-color', 'background-color'])
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
color: Color.Dark200,
|
|
28
|
+
borderColor: Color.Silver500,
|
|
29
|
+
backgroundColor: Color.Silver100
|
|
30
|
+
},
|
|
31
|
+
error: {
|
|
32
|
+
color: Color.Red300,
|
|
33
|
+
borderColor: Color.Red300,
|
|
34
|
+
backgroundColor: Color.Red50,
|
|
35
|
+
'&:focus': {
|
|
36
|
+
backgroundColor: Color.Red75
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
primary: {
|
|
40
|
+
color: Color.Blue300,
|
|
41
|
+
borderColor: Color.Silver500,
|
|
42
|
+
'&:focus': {
|
|
43
|
+
backgroundColor: Color.Blue50
|
|
52
44
|
},
|
|
53
|
-
'
|
|
54
|
-
|
|
45
|
+
'&:hover, &:active': {
|
|
46
|
+
borderColor: Color.Blue300,
|
|
47
|
+
backgroundColor: Color.Blue50
|
|
55
48
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
var Icon = /*#__PURE__*/styled('span')(_ref3 => {
|
|
71
|
-
var {
|
|
72
|
-
theme
|
|
73
|
-
} = _ref3;
|
|
74
|
-
return {
|
|
49
|
+
},
|
|
50
|
+
sizeSmall: {
|
|
51
|
+
minHeight: theme.spacing(6)
|
|
52
|
+
},
|
|
53
|
+
sizeLarge: {
|
|
54
|
+
minHeight: theme.spacing(17.5)
|
|
55
|
+
},
|
|
56
|
+
label: {
|
|
57
|
+
display: 'flex',
|
|
58
|
+
alignItems: 'center'
|
|
59
|
+
},
|
|
60
|
+
icon: {
|
|
75
61
|
display: 'flex',
|
|
76
62
|
'& svg': {
|
|
77
63
|
fontSize: theme.spacing(3),
|
|
78
64
|
[theme.breakpoints.up('sm')]: {
|
|
79
65
|
fontSize: theme.spacing(2.5)
|
|
80
66
|
}
|
|
81
|
-
},
|
|
82
|
-
'&[data-placement="start"]': {
|
|
83
|
-
marginRight: theme.spacing(1),
|
|
84
|
-
marginLeft: theme.spacing(-0.5)
|
|
85
|
-
},
|
|
86
|
-
'&[data-placement="end"]': {
|
|
87
|
-
marginLeft: theme.spacing(1),
|
|
88
|
-
marginRight: theme.spacing(-0.5)
|
|
89
67
|
}
|
|
90
|
-
}
|
|
68
|
+
},
|
|
69
|
+
startIcon: {
|
|
70
|
+
marginRight: theme.spacing(1),
|
|
71
|
+
marginLeft: theme.spacing(-0.5)
|
|
72
|
+
},
|
|
73
|
+
endIcon: {
|
|
74
|
+
marginLeft: theme.spacing(1),
|
|
75
|
+
marginRight: theme.spacing(-0.5)
|
|
76
|
+
},
|
|
77
|
+
hint: {
|
|
78
|
+
marginTop: theme.spacing(0.5)
|
|
79
|
+
}
|
|
80
|
+
}), {
|
|
81
|
+
name: 'SD-CardButton'
|
|
91
82
|
});
|
|
92
|
-
export var CardButton = /*#__PURE__*/forwardRef((
|
|
83
|
+
export var CardButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
93
84
|
var {
|
|
94
85
|
hint,
|
|
95
86
|
size,
|
|
@@ -100,33 +91,39 @@ export var CardButton = /*#__PURE__*/forwardRef((_ref4, ref) => {
|
|
|
100
91
|
endIcon,
|
|
101
92
|
startIcon,
|
|
102
93
|
disabled
|
|
103
|
-
} =
|
|
104
|
-
props = _objectWithoutProperties(
|
|
94
|
+
} = _ref,
|
|
95
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
105
96
|
|
|
106
|
-
|
|
97
|
+
var styles = useStyles({
|
|
98
|
+
classes
|
|
99
|
+
});
|
|
100
|
+
return /*#__PURE__*/_jsx(ButtonBase, _objectSpread(_objectSpread({}, props), {}, {
|
|
107
101
|
ref: ref,
|
|
108
102
|
disabled: disabled,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
children: error ? /*#__PURE__*/_jsx(
|
|
103
|
+
className: clsx(styles.root, className, disabled ? styles.disabled : error ? styles.error : styles.primary, {
|
|
104
|
+
'small': styles.sizeSmall,
|
|
105
|
+
'large': styles.sizeLarge
|
|
106
|
+
}[size]),
|
|
107
|
+
children: error ? /*#__PURE__*/_jsx(Typography, {
|
|
114
108
|
variant: "h4",
|
|
115
109
|
color: "inherit",
|
|
110
|
+
className: styles.label,
|
|
116
111
|
children: error
|
|
117
112
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
118
|
-
children: [/*#__PURE__*/_jsxs(
|
|
113
|
+
children: [/*#__PURE__*/_jsxs(Typography, {
|
|
119
114
|
variant: "h4",
|
|
120
115
|
color: "inherit",
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
className: styles.label,
|
|
117
|
+
children: [!!startIcon && /*#__PURE__*/_jsx("span", {
|
|
118
|
+
className: clsx(styles.icon, styles.startIcon),
|
|
123
119
|
children: startIcon
|
|
124
|
-
}), children, !!endIcon && /*#__PURE__*/_jsx(
|
|
125
|
-
|
|
120
|
+
}), children, !!endIcon && /*#__PURE__*/_jsx("span", {
|
|
121
|
+
className: clsx(styles.icon, styles.endIcon),
|
|
126
122
|
children: endIcon
|
|
127
123
|
})]
|
|
128
|
-
}), !!hint && /*#__PURE__*/_jsx(
|
|
124
|
+
}), !!hint && /*#__PURE__*/_jsx(Typography, {
|
|
129
125
|
color: "textSecondary",
|
|
126
|
+
className: styles.hint,
|
|
130
127
|
children: hint
|
|
131
128
|
})]
|
|
132
129
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
|
|
4
|
-
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from '@
|
|
4
|
+
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from '@material-ui/core';
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["FormGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
|
|
4
|
-
import { FormControl, FormGroup, FormHelperText, FormLabel } from '@
|
|
4
|
+
import { FormControl, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|