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