@tenancy.nz/ui 1.2.2 → 1.2.4
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/cjs/components/Alert.cjs +4 -3
- package/dist/cjs/components/AvatarCropDialog.cjs +7 -3
- package/dist/cjs/components/AvatarInput.cjs +15 -17
- package/dist/cjs/components/BaseModal.cjs +1 -1
- package/dist/cjs/components/BooleanInput.styled.cjs +7 -7
- package/dist/cjs/components/CroppedImageInput.cjs +6 -1
- package/dist/cjs/components/CroppedImageInput.styled.cjs +0 -8
- package/dist/cjs/components/CroppedImageInputActions.cjs +2 -4
- package/dist/cjs/components/DropZone.cjs +3 -3
- package/dist/cjs/components/FileUpload.cjs +12 -18
- package/dist/cjs/components/FileUploadButton.cjs +1 -2
- package/dist/cjs/components/FlashMessage.cjs +4 -5
- package/dist/cjs/components/FormControl.cjs +4 -9
- package/dist/cjs/components/Heading.cjs +1 -1
- package/dist/cjs/components/Modal.cjs +2 -2
- package/dist/cjs/components/PropertyCard.styled.cjs +1 -1
- package/dist/cjs/components/SuccessModal.cjs +14 -13
- package/dist/cjs/components/ThemeProvider.cjs +4 -1
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/utils/allGlobalStyles.cjs +11 -0
- package/dist/esm/components/Alert.js +5 -4
- package/dist/esm/components/AvatarCropDialog.js +7 -3
- package/dist/esm/components/AvatarInput.js +16 -18
- package/dist/esm/components/BaseModal.js +1 -1
- package/dist/esm/components/BooleanInput.styled.js +7 -7
- package/dist/esm/components/CroppedImageInput.js +7 -2
- package/dist/esm/components/CroppedImageInput.styled.js +1 -8
- package/dist/esm/components/CroppedImageInputActions.js +2 -4
- package/dist/esm/components/DropZone.js +3 -3
- package/dist/esm/components/FileUpload.js +12 -18
- package/dist/esm/components/FileUploadButton.js +1 -2
- package/dist/esm/components/FlashMessage.js +4 -5
- package/dist/esm/components/FormControl.js +4 -9
- package/dist/esm/components/Heading.js +1 -1
- package/dist/esm/components/Modal.js +2 -2
- package/dist/esm/components/PropertyCard.styled.js +1 -1
- package/dist/esm/components/SuccessModal.js +14 -13
- package/dist/esm/components/ThemeProvider.js +5 -2
- package/dist/esm/index.js +2 -0
- package/dist/esm/utils/allGlobalStyles.js +7 -0
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ var icons = {
|
|
|
36
36
|
}
|
|
37
37
|
})
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
var Alert = /*#__PURE__*/React.forwardRef(function Alert2(_ref, ref) {
|
|
40
40
|
var children = _ref.children,
|
|
41
41
|
_ref$color = _ref.color,
|
|
42
42
|
color = _ref$color === void 0 ? "info" : _ref$color,
|
|
@@ -52,10 +52,11 @@ function Alert(_ref) {
|
|
|
52
52
|
variant: variantMap[variant] || variant,
|
|
53
53
|
severity: color,
|
|
54
54
|
iconMapping: icons,
|
|
55
|
-
closeText: "undo"
|
|
55
|
+
closeText: "undo",
|
|
56
|
+
ref: ref
|
|
56
57
|
}, rest), (!icon || !color || !icons[color]) && {
|
|
57
58
|
icon: false
|
|
58
59
|
}), title && /* @__PURE__ */React.createElement(Alert_styled.StyledAlertTitle, null, title), children);
|
|
59
|
-
}
|
|
60
|
+
});
|
|
60
61
|
|
|
61
62
|
exports.default = Alert;
|
|
@@ -38,7 +38,10 @@ function AvatarCropDialog(_ref) {
|
|
|
38
38
|
var _useState = React.useState({
|
|
39
39
|
aspect: 1,
|
|
40
40
|
unit: "%",
|
|
41
|
-
width:
|
|
41
|
+
width: 50,
|
|
42
|
+
height: 50,
|
|
43
|
+
x: 25,
|
|
44
|
+
y: 25
|
|
42
45
|
}),
|
|
43
46
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
44
47
|
crop = _useState2[0],
|
|
@@ -137,7 +140,6 @@ function AvatarCropDialog(_ref) {
|
|
|
137
140
|
}, /* @__PURE__ */React.createElement(AvatarCropDialog_styled.StyledEditor, {
|
|
138
141
|
showError: showError
|
|
139
142
|
}, /* @__PURE__ */React.createElement(ReactCrop, {
|
|
140
|
-
src: droppedFile,
|
|
141
143
|
crop: crop,
|
|
142
144
|
style: {
|
|
143
145
|
width: editorWidth,
|
|
@@ -147,7 +149,9 @@ function AvatarCropDialog(_ref) {
|
|
|
147
149
|
onChange: handleCropChange,
|
|
148
150
|
onImageLoaded: handleImageLoaded,
|
|
149
151
|
keepSelection: true
|
|
150
|
-
}
|
|
152
|
+
}, /* @__PURE__ */React.createElement("img", {
|
|
153
|
+
src: droppedFile
|
|
154
|
+
})))), /* @__PURE__ */React.createElement(ModalActions.default, null, /* @__PURE__ */React.createElement(Button.default, {
|
|
151
155
|
onClick: handleCancel,
|
|
152
156
|
variant: "outlined",
|
|
153
157
|
loading: cancelling,
|
|
@@ -14,10 +14,9 @@ var DeleteIcon = require('@mui/icons-material/Delete');
|
|
|
14
14
|
var PersonIcon = require('@mui/icons-material/Person');
|
|
15
15
|
var WarningIcon = require('@mui/icons-material/Warning');
|
|
16
16
|
var reactDropzone = require('react-dropzone');
|
|
17
|
+
var IconButton = require('./IconButton.cjs');
|
|
17
18
|
var Confirmation = require('./Confirmation.cjs');
|
|
18
19
|
var Modal = require('./Modal.cjs');
|
|
19
|
-
var ModalContent = require('./ModalContent.cjs');
|
|
20
|
-
var ModalHeader = require('./ModalHeader.cjs');
|
|
21
20
|
var Text = require('./Text.cjs');
|
|
22
21
|
var AvatarCropDialog = require('./AvatarCropDialog.cjs');
|
|
23
22
|
var AvatarInput_styled = require('./AvatarInput.styled.cjs');
|
|
@@ -170,26 +169,25 @@ function AvatarInput(_ref) {
|
|
|
170
169
|
align: isNotMobile ? "left" : "center",
|
|
171
170
|
weight: "500",
|
|
172
171
|
color: "textPrimary"
|
|
173
|
-
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription))))), (savedImage || value) &&
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription))))), (savedImage || value) && /* @__PURE__ */React.createElement(IconButton.default, {
|
|
173
|
+
color: "error",
|
|
174
|
+
onClick: function onClick() {
|
|
175
|
+
return setConfirmDelete(true);
|
|
176
|
+
}
|
|
177
|
+
}, /* @__PURE__ */React.createElement(DeleteIcon, null))), droppedFile && /* @__PURE__ */React.createElement(Modal.default, {
|
|
177
178
|
open: open,
|
|
178
179
|
onClose: function onClose() {
|
|
179
180
|
return setOpen(false);
|
|
180
181
|
},
|
|
181
182
|
fullWidth: true,
|
|
182
|
-
maxWidth: "
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
onSave: handleSave,
|
|
191
|
-
onDelete: handleDelete
|
|
192
|
-
})))), /* @__PURE__ */React.createElement(Confirmation.default, {
|
|
183
|
+
maxWidth: "md",
|
|
184
|
+
content: /* @__PURE__ */React.createElement(AvatarCropDialog.default, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
185
|
+
droppedFile: droppedFile
|
|
186
|
+
}, rest), {}, {
|
|
187
|
+
onSave: handleSave,
|
|
188
|
+
onDelete: handleDelete
|
|
189
|
+
}))
|
|
190
|
+
}), /* @__PURE__ */React.createElement(Confirmation.default, {
|
|
193
191
|
open: confirmDelete,
|
|
194
192
|
onCancel: function onCancel() {
|
|
195
193
|
return setConfirmDelete(false);
|
|
@@ -21,7 +21,7 @@ function BaseModal(_ref) {
|
|
|
21
21
|
_ref$maxWidth = _ref.maxWidth,
|
|
22
22
|
maxWidth = _ref$maxWidth === void 0 ? "sm" : _ref$maxWidth,
|
|
23
23
|
_ref$onClose = _ref.onClose,
|
|
24
|
-
onClose = _ref$onClose === void 0 ?
|
|
24
|
+
onClose = _ref$onClose === void 0 ? void 0 : _ref$onClose,
|
|
25
25
|
_ref$open = _ref.open,
|
|
26
26
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
27
27
|
_ref$slotProps = _ref.slotProps,
|
|
@@ -7,24 +7,24 @@ var ButtonGroup = require('@mui/material/ButtonGroup');
|
|
|
7
7
|
|
|
8
8
|
var selectedStyles = function selectedStyles(hasError, theme) {
|
|
9
9
|
return {
|
|
10
|
-
borderColor: hasError === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
10
|
+
borderColor: hasError === "yes" ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
11
11
|
color: "#fff",
|
|
12
|
-
background: hasError === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
12
|
+
background: hasError === "yes" ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
13
13
|
"&:hover": {
|
|
14
|
-
background: hasError === "yes" ? theme.palette.secondary.dark : theme.palette.
|
|
14
|
+
background: hasError === "yes" ? theme.palette.secondary.dark : theme.palette.primary.dark
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
var unselectedStyles = function unselectedStyles(error, theme) {
|
|
19
19
|
return {
|
|
20
|
-
borderColor: error === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
21
|
-
color: error === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
20
|
+
borderColor: error === "yes" ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
21
|
+
color: error === "yes" ? theme.palette.secondary.main : theme.palette.primary.main
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
var requiredUnselectedStyles = function requiredUnselectedStyles(selected, theme) {
|
|
25
25
|
return {
|
|
26
|
-
borderColor: !selected ? theme.palette.secondary.main : theme.palette.
|
|
27
|
-
color: !selected ? theme.palette.secondary.main : theme.palette.
|
|
26
|
+
borderColor: !selected ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
27
|
+
color: !selected ? theme.palette.secondary.main : theme.palette.primary.main
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
var borderRadiusStyles = function borderRadiusStyles(edges, theme) {
|
|
@@ -338,7 +338,12 @@ function CroppedImageInput(_ref) {
|
|
|
338
338
|
item: true,
|
|
339
339
|
xs: 12,
|
|
340
340
|
md: 1
|
|
341
|
-
}, /* @__PURE__ */React.createElement(
|
|
341
|
+
}, /* @__PURE__ */React.createElement(IconButton.default, {
|
|
342
|
+
onClick: function onClick() {
|
|
343
|
+
return setConfirmDelete(true);
|
|
344
|
+
},
|
|
345
|
+
color: "error"
|
|
346
|
+
}, /* @__PURE__ */React.createElement(DeleteIcon, null))))), !src && !documentFile && !croppedImage && (openInDialog ? /* @__PURE__ */React.createElement(framerMotion.motion.div, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, fade), {}, {
|
|
342
347
|
key: "upload-button"
|
|
343
348
|
}), /* @__PURE__ */React.createElement(FileUploadButton.default, {
|
|
344
349
|
onUpload: onDrop,
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
4
|
-
var styled = require('styled-components');
|
|
5
3
|
var framerMotion = require('framer-motion');
|
|
6
4
|
var styles = require('@mui/material/styles');
|
|
7
5
|
var CircularProgress = require('@mui/material/CircularProgress');
|
|
8
6
|
var DescriptionIcon = require('@mui/icons-material/Description');
|
|
9
7
|
|
|
10
|
-
var _templateObject, _templateObject2;
|
|
11
8
|
var borderRadius = function borderRadius(edges, theme) {
|
|
12
9
|
switch (edges) {
|
|
13
10
|
case "rounded":
|
|
@@ -71,13 +68,8 @@ var StyledCircularProgress = styles.styled(CircularProgress)({
|
|
|
71
68
|
marginLeft: -20,
|
|
72
69
|
zIndex: 1
|
|
73
70
|
});
|
|
74
|
-
var StyledDeleteIcon = styled.span(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", "\n"])), function (_ref4) {
|
|
75
|
-
var theme = _ref4.theme;
|
|
76
|
-
return styled.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n right: 25px;\n z-index: 9;\n background: transparent;\n color: ", ";\n width: 48px;\n height: 48px;\n font-size: 20px;\n transition: all 0.25s ease-in-out;\n transform: translateY(-50%) scale(0.9);\n box-shadow: ", ";\n border-radius: 50%;\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n transform: translateY(-50%) scale(1.05);\n color: ", ";\n box-shadow: ", ";\n }\n "])), theme.palette.grey.main, theme.shadows[2], theme.palette.secondary.main, theme.shadows[4]);
|
|
77
|
-
});
|
|
78
71
|
|
|
79
72
|
exports.StyledCircularProgress = StyledCircularProgress;
|
|
80
|
-
exports.StyledDeleteIcon = StyledDeleteIcon;
|
|
81
73
|
exports.StyledEditor = StyledEditor;
|
|
82
74
|
exports.StyledFileIcon = StyledFileIcon;
|
|
83
75
|
exports.StyledSavedImage = StyledSavedImage;
|
|
@@ -37,22 +37,20 @@ function CroppedImageInputActions(_ref) {
|
|
|
37
37
|
}, /* @__PURE__ */React.createElement(Grid.default, {
|
|
38
38
|
item: true
|
|
39
39
|
}, /* @__PURE__ */React.createElement(Button.default, _rollupPluginBabelHelpers.objectSpread2({
|
|
40
|
-
loading: true,
|
|
41
40
|
color: "primaryAlt",
|
|
42
41
|
variant: "outlined",
|
|
43
42
|
size: "large",
|
|
44
43
|
onClick: handleCancel,
|
|
45
|
-
|
|
44
|
+
loading: cancelling,
|
|
46
45
|
disabled: disabled,
|
|
47
46
|
fullWidth: !isNotMobile
|
|
48
47
|
}, cancelButtonProps), cancelButtonProps.text || "Cancel")), /* @__PURE__ */React.createElement(Grid.default, {
|
|
49
48
|
item: true
|
|
50
49
|
}, /* @__PURE__ */React.createElement(Button.default, _rollupPluginBabelHelpers.objectSpread2({
|
|
51
|
-
loading: true,
|
|
52
50
|
color: "primary",
|
|
53
51
|
size: "large",
|
|
54
52
|
onClick: handleImageSave,
|
|
55
|
-
|
|
53
|
+
loading: saving,
|
|
56
54
|
disabled: disabled,
|
|
57
55
|
fullWidth: !isNotMobile
|
|
58
56
|
}, saveButtonProps), saveButtonProps.text || "Save"))))
|
|
@@ -69,15 +69,15 @@ function DropZone(_ref) {
|
|
|
69
69
|
})), !isDragAccept && !isDragReject && /* @__PURE__ */React.createElement(DropZone_styled.StyledIcon, {
|
|
70
70
|
compact: compact
|
|
71
71
|
}, /* @__PURE__ */React.createElement(CloudUploadIcon, {
|
|
72
|
-
color: "
|
|
72
|
+
color: "primary",
|
|
73
73
|
fontSize: "inherit"
|
|
74
74
|
})), /* @__PURE__ */React.createElement(Typography, {
|
|
75
|
-
variant: "
|
|
75
|
+
variant: "body1",
|
|
76
76
|
align: "center"
|
|
77
77
|
}, isDragReject ? "Error" : dropzoneLabel), /* @__PURE__ */React.createElement(Typography, {
|
|
78
78
|
variant: "body2",
|
|
79
79
|
align: "center",
|
|
80
|
-
color: "
|
|
80
|
+
color: "text.blue"
|
|
81
81
|
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription)), /* @__PURE__ */React.createElement(framerMotion.AnimatePresence, null, listAcceptedFiles && acceptedFiles.length > 0 && /* @__PURE__ */React.createElement(framerMotion.motion.div, {
|
|
82
82
|
initial: {
|
|
83
83
|
translateY: -20,
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var PropTypes = require('prop-types');
|
|
8
|
-
var Alert = require('@mui/material/Alert');
|
|
9
8
|
var framerMotion = require('framer-motion');
|
|
10
9
|
var DeleteIcon = require('@mui/icons-material/Delete');
|
|
11
10
|
var DropZone = require('./DropZone.cjs');
|
|
12
11
|
var FormControl = require('./FormControl.cjs');
|
|
12
|
+
var Alert = require('./Alert.cjs');
|
|
13
13
|
var Button = require('./Button.cjs');
|
|
14
14
|
var Confirmation = require('./Confirmation.cjs');
|
|
15
15
|
var IconButton = require('./IconButton.cjs');
|
|
@@ -158,7 +158,7 @@ function FileUpload(_ref) {
|
|
|
158
158
|
edges: edges
|
|
159
159
|
}, /* @__PURE__ */React.createElement(FormFocus.default, {
|
|
160
160
|
name: name
|
|
161
|
-
}), files && files.length > 0 && /* @__PURE__ */React.createElement(FileUpload_styled.StyledSavedWrapper, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, fade), {}, {
|
|
161
|
+
}), files && files.length > 0 && /* @__PURE__ */React.createElement(framerMotion.AnimatePresence, null, /* @__PURE__ */React.createElement(FileUpload_styled.StyledSavedWrapper, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, fade), {}, {
|
|
162
162
|
edges: edges
|
|
163
163
|
}), (saving || loading) && /* @__PURE__ */React.createElement(FileUpload_styled.StyledLoader, {
|
|
164
164
|
disableShrink: true
|
|
@@ -169,10 +169,9 @@ function FileUpload(_ref) {
|
|
|
169
169
|
}, /* @__PURE__ */React.createElement(Grid.default, {
|
|
170
170
|
item: true,
|
|
171
171
|
xs: 12
|
|
172
|
-
},
|
|
173
|
-
return /* @__PURE__ */React.createElement(framerMotion.
|
|
174
|
-
key: file.getFileName(file$1)
|
|
175
|
-
}, /* @__PURE__ */React.createElement(framerMotion.motion.div, {
|
|
172
|
+
}, files.map(function (file$1, index) {
|
|
173
|
+
return /* @__PURE__ */React.createElement(framerMotion.motion.div, {
|
|
174
|
+
key: file.getFileName(file$1),
|
|
176
175
|
positionTransition: true,
|
|
177
176
|
initial: {
|
|
178
177
|
opacity: 0,
|
|
@@ -191,8 +190,8 @@ function FileUpload(_ref) {
|
|
|
191
190
|
duration: 0.2
|
|
192
191
|
}
|
|
193
192
|
}
|
|
194
|
-
}, /* @__PURE__ */React.createElement(Alert, {
|
|
195
|
-
|
|
193
|
+
}, /* @__PURE__ */React.createElement(Alert.default, {
|
|
194
|
+
color: showError || fileErrors(file$1, index) !== null ? "error" : "success",
|
|
196
195
|
style: {
|
|
197
196
|
marginBottom: 5
|
|
198
197
|
},
|
|
@@ -200,24 +199,19 @@ function FileUpload(_ref) {
|
|
|
200
199
|
onClick: function onClick() {
|
|
201
200
|
return setViewedFile(file$1);
|
|
202
201
|
},
|
|
203
|
-
color: "
|
|
202
|
+
color: "success",
|
|
204
203
|
size: "small",
|
|
205
204
|
variant: "text"
|
|
206
205
|
}, "View"), /* @__PURE__ */React.createElement(Tooltip.default, {
|
|
207
|
-
title: "Delete"
|
|
208
|
-
|
|
209
|
-
}, /* @__PURE__ */React.createElement("div", null, /* @__PURE__ */React.createElement(IconButton.default, {
|
|
206
|
+
title: "Delete"
|
|
207
|
+
}, /* @__PURE__ */React.createElement(IconButton.default, {
|
|
210
208
|
disabled: saving,
|
|
211
209
|
size: "small",
|
|
212
|
-
"aria-label": "delete",
|
|
213
|
-
style: {
|
|
214
|
-
padding: 0
|
|
215
|
-
},
|
|
216
210
|
onClick: function onClick() {
|
|
217
211
|
return !showError ? handleDeleteConfirmation(index) : handleDeleteWithoutConfirmation(index);
|
|
218
212
|
}
|
|
219
|
-
}, /* @__PURE__ */React.createElement(DeleteIcon, null))))
|
|
220
|
-
}, /* @__PURE__ */React.createElement(FileUpload_styled.StyledAlertTitle, null, file.getFileName(file$1)), fileErrors(file$1, index)))
|
|
213
|
+
}, /* @__PURE__ */React.createElement(DeleteIcon, null))))
|
|
214
|
+
}, /* @__PURE__ */React.createElement(FileUpload_styled.StyledAlertTitle, null, file.getFileName(file$1)), fileErrors(file$1, index)));
|
|
221
215
|
}))))), (!files || files.length === 0 || !dropzoneProps || dropzoneProps.maxFiles === void 0 || dropzoneProps.maxFiles > 1) && /* @__PURE__ */React.createElement(framerMotion.motion.div, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, fade), {}, {
|
|
222
216
|
style: files && files.length > 0 ? {
|
|
223
217
|
marginTop: 8
|
|
@@ -90,9 +90,8 @@ function FileUploadButton(_ref) {
|
|
|
90
90
|
getRootProps = _useDropzone.getRootProps,
|
|
91
91
|
getInputProps = _useDropzone.getInputProps;
|
|
92
92
|
return /* @__PURE__ */React.createElement("span", _rollupPluginBabelHelpers.objectSpread2({}, getRootProps()), /* @__PURE__ */React.createElement(Button.default, _rollupPluginBabelHelpers.objectSpread2({
|
|
93
|
-
loading: true,
|
|
94
93
|
disabled: disabled,
|
|
95
|
-
|
|
94
|
+
loading: pending,
|
|
96
95
|
pendingIndicator: /* @__PURE__ */React.createElement(FileUploadButtonLoader.default, {
|
|
97
96
|
accepted: accepted,
|
|
98
97
|
rejected: rejected
|
|
@@ -16,12 +16,12 @@ function FlashMessage(_ref) {
|
|
|
16
16
|
_ref$color = _ref.color,
|
|
17
17
|
color = _ref$color === void 0 ? "success" : _ref$color,
|
|
18
18
|
_ref$horizontal = _ref.horizontal,
|
|
19
|
-
horizontal = _ref$horizontal === void 0 ? "
|
|
19
|
+
horizontal = _ref$horizontal === void 0 ? "right" : _ref$horizontal,
|
|
20
20
|
_ref$open = _ref.open,
|
|
21
21
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
22
22
|
onClose = _ref.onClose,
|
|
23
23
|
_ref$vertical = _ref.vertical,
|
|
24
|
-
vertical = _ref$vertical === void 0 ? "
|
|
24
|
+
vertical = _ref$vertical === void 0 ? "bottom" : _ref$vertical,
|
|
25
25
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
26
26
|
var handleClose = function handleClose() {
|
|
27
27
|
onClose();
|
|
@@ -34,11 +34,10 @@ function FlashMessage(_ref) {
|
|
|
34
34
|
autoHideDuration: autoHideDuration,
|
|
35
35
|
open: open,
|
|
36
36
|
onClose: handleClose,
|
|
37
|
-
message: "
|
|
37
|
+
message: "snack"
|
|
38
38
|
}, rest), /* @__PURE__ */React.createElement(Alert.default, {
|
|
39
39
|
color: color,
|
|
40
|
-
onClose: handleClose
|
|
41
|
-
elevation: 7
|
|
40
|
+
onClose: handleClose
|
|
42
41
|
}, children));
|
|
43
42
|
}
|
|
44
43
|
FlashMessage.propTypes = {
|
|
@@ -73,16 +73,11 @@ var FormControl = /*#__PURE__*/React.forwardRef(function FormControl2(_ref, ref)
|
|
|
73
73
|
color: props.color === "default" ? "info" : props.color
|
|
74
74
|
}, statusMessage))), !!helperText && /* @__PURE__ */React.createElement(FormHelperText, {
|
|
75
75
|
sx: {
|
|
76
|
-
color: "text.
|
|
77
|
-
fontSize:
|
|
78
|
-
|
|
79
|
-
return "".concat(theme.typography.fontSize, "px");
|
|
80
|
-
}
|
|
81
|
-
return null;
|
|
82
|
-
},
|
|
83
|
-
padding: 0,
|
|
76
|
+
color: "text.blue",
|
|
77
|
+
fontSize: "13px",
|
|
78
|
+
padding: "0 0 0 8px",
|
|
84
79
|
margin: 0,
|
|
85
|
-
mt: statusMessage ? 0 : "
|
|
80
|
+
mt: statusMessage ? 0 : "6px"
|
|
86
81
|
}
|
|
87
82
|
}, helperText));
|
|
88
83
|
});
|
|
@@ -17,7 +17,7 @@ function Heading(_ref) {
|
|
|
17
17
|
_ref$transform = _ref.transform,
|
|
18
18
|
transform = _ref$transform === void 0 ? void 0 : _ref$transform,
|
|
19
19
|
_ref$weight = _ref.weight,
|
|
20
|
-
weight = _ref$weight === void 0 ? "
|
|
20
|
+
weight = _ref$weight === void 0 ? "700" : _ref$weight,
|
|
21
21
|
_ref$sx = _ref.sx,
|
|
22
22
|
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
23
23
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
@@ -52,9 +52,9 @@ function Modal(_ref) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
}), heading && /* @__PURE__ */React.createElement(ModalHeader.default, {
|
|
55
|
+
}), heading && /* @__PURE__ */React.createElement(ModalHeader.default, _rollupPluginBabelHelpers.objectSpread2({}, onClose && {
|
|
56
56
|
onClose: handleClose
|
|
57
|
-
}, loading && /* @__PURE__ */React.createElement(Skeleton.default, {
|
|
57
|
+
}), loading && /* @__PURE__ */React.createElement(Skeleton.default, {
|
|
58
58
|
variant: "text",
|
|
59
59
|
height: 20,
|
|
60
60
|
width: 250
|
|
@@ -6,7 +6,7 @@ var styled = require('styled-components');
|
|
|
6
6
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
7
7
|
var StyledContainer = styled.div(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", "}\n"])), function (_ref) {
|
|
8
8
|
var theme = _ref.theme;
|
|
9
|
-
return styled.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: flex;\n @media screen and (max-width: 767px) {\n flex-direction: column;\n padding: ", ";\n }\n @media screen and (min-width: 768px) {\n height: 100%;\n }\n "])), theme.spacing(3));
|
|
9
|
+
return styled.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: flex;\n cusor: pointer;\n @media screen and (max-width: 767px) {\n flex-direction: column;\n padding: ", ";\n }\n @media screen and (min-width: 768px) {\n height: 100%;\n }\n "])), theme.spacing(3));
|
|
10
10
|
});
|
|
11
11
|
var StyledImg = styled.div(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", "}\n\n"])), function (_ref2) {
|
|
12
12
|
var theme = _ref2.theme;
|
|
@@ -9,7 +9,6 @@ var CheckCircleOutlineIcon = require('@mui/icons-material/CheckCircleOutline');
|
|
|
9
9
|
var SuccessModal_styled = require('./SuccessModal.styled.cjs');
|
|
10
10
|
var Heading = require('./Heading.cjs');
|
|
11
11
|
var Modal = require('./Modal.cjs');
|
|
12
|
-
var ModalContent = require('./ModalContent.cjs');
|
|
13
12
|
|
|
14
13
|
function SuccessModal(_ref) {
|
|
15
14
|
var _ref$duration = _ref.duration,
|
|
@@ -23,23 +22,25 @@ function SuccessModal(_ref) {
|
|
|
23
22
|
isOpen = _useState2[0],
|
|
24
23
|
setIsOpen = _useState2[1];
|
|
25
24
|
React.useEffect(function () {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
setIsOpen(show);
|
|
26
|
+
var timeout = setTimeout(function () {
|
|
27
|
+
return setIsOpen(false);
|
|
28
|
+
}, duration);
|
|
29
|
+
return function () {
|
|
30
|
+
return clearTimeout(timeout);
|
|
31
|
+
};
|
|
32
32
|
}, [duration, show]);
|
|
33
33
|
return /* @__PURE__ */React.createElement(Modal.default, {
|
|
34
34
|
open: isOpen,
|
|
35
35
|
fullWidth: true,
|
|
36
36
|
maxWidth: "sm",
|
|
37
|
-
hideBackdrop: true
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
hideBackdrop: true,
|
|
38
|
+
content: /* @__PURE__ */React.createElement(SuccessModal_styled.StyledContent, null, /* @__PURE__ */React.createElement(SuccessModal_styled.StyledIcon, null, /* @__PURE__ */React.createElement(CheckCircleOutlineIcon, null)), /* @__PURE__ */React.createElement(Heading.default, {
|
|
39
|
+
align: "center",
|
|
40
|
+
as: "h4",
|
|
41
|
+
gutterBottom: false
|
|
42
|
+
}, message))
|
|
43
|
+
});
|
|
43
44
|
}
|
|
44
45
|
SuccessModal.propTypes = {
|
|
45
46
|
/**
|
|
@@ -10,6 +10,7 @@ var styled = require('styled-components');
|
|
|
10
10
|
var styles = require('@mui/material/styles');
|
|
11
11
|
var CssBaseline = require('@mui/material/CssBaseline');
|
|
12
12
|
var index = require('../theme/index.cjs');
|
|
13
|
+
var allGlobalStyles = require('../utils/allGlobalStyles.cjs');
|
|
13
14
|
|
|
14
15
|
var _excluded = ["theme", "children"];
|
|
15
16
|
function ThemeProvider(_ref) {
|
|
@@ -28,7 +29,9 @@ function ThemeProvider(_ref) {
|
|
|
28
29
|
theme: mergedTheme
|
|
29
30
|
}, /* @__PURE__ */React.createElement(styles.ThemeProvider, _rollupPluginBabelHelpers.objectSpread2({
|
|
30
31
|
theme: mergedTheme
|
|
31
|
-
}, rest), /* @__PURE__ */React.createElement(CssBaseline, null),
|
|
32
|
+
}, rest), /* @__PURE__ */React.createElement(CssBaseline, null), /* @__PURE__ */React.createElement(react.Global, {
|
|
33
|
+
styles: allGlobalStyles.default
|
|
34
|
+
}), children))));
|
|
32
35
|
}
|
|
33
36
|
ThemeProvider.propTypes = {
|
|
34
37
|
theme: PropTypes.shape({
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var CollapsedText = require('./components/CollapsedText.cjs');
|
|
|
20
20
|
var Confirmation = require('./components/Confirmation.cjs');
|
|
21
21
|
var CroppedImageInput = require('./components/CroppedImageInput.cjs');
|
|
22
22
|
var DateInput = require('./components/DateInput.cjs');
|
|
23
|
+
var DateSelect = require('./components/DateSelect.cjs');
|
|
23
24
|
var Divider = require('./components/Divider.cjs');
|
|
24
25
|
var DropZone = require('./components/DropZone.cjs');
|
|
25
26
|
var Embed = require('./components/Embed.cjs');
|
|
@@ -51,6 +52,7 @@ var Skeleton = require('./components/Skeleton.cjs');
|
|
|
51
52
|
var Stepper = require('./components/Stepper.cjs');
|
|
52
53
|
var SuccessModal = require('./components/SuccessModal.cjs');
|
|
53
54
|
var Switch = require('./components/Switch.cjs');
|
|
55
|
+
var StatusMessage = require('./components/StatusMessage.cjs');
|
|
54
56
|
var Tab = require('./components/Tab.cjs');
|
|
55
57
|
var TabPanel = require('./components/TabPanel.cjs');
|
|
56
58
|
var Tabs = require('./components/Tabs.cjs');
|
|
@@ -106,6 +108,7 @@ exports.CollapsedText = CollapsedText.default;
|
|
|
106
108
|
exports.Confirmation = Confirmation.default;
|
|
107
109
|
exports.CroppedImageInput = CroppedImageInput.default;
|
|
108
110
|
exports.DateInput = DateInput.default;
|
|
111
|
+
exports.DateSelect = DateSelect.default;
|
|
109
112
|
exports.Divider = Divider.default;
|
|
110
113
|
exports.DropZone = DropZone.default;
|
|
111
114
|
exports.Embed = Embed.default;
|
|
@@ -137,6 +140,7 @@ exports.Skeleton = Skeleton.default;
|
|
|
137
140
|
exports.Stepper = Stepper.default;
|
|
138
141
|
exports.SuccessModal = SuccessModal.default;
|
|
139
142
|
exports.Switch = Switch.default;
|
|
143
|
+
exports.StatusMessage = StatusMessage.default;
|
|
140
144
|
exports.Tab = Tab.default;
|
|
141
145
|
exports.TabPanel = TabPanel.default;
|
|
142
146
|
exports.Tabs = Tabs.default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
+
var react = require('@emotion/react');
|
|
7
|
+
|
|
8
|
+
var _templateObject;
|
|
9
|
+
var globalStyles = react.css(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n @keyframes marching-ants {\n 0% {\n background-position:\n 0 0,\n 0 100%,\n 0 0,\n 100% 0;\n }\n\n to {\n background-position:\n 20px 0,\n -20px 100%,\n 0 -20px,\n 100% 20px;\n }\n }\n\n :root {\n --rc-drag-handle-size: 12px;\n --rc-drag-handle-mobile-size: 24px;\n --rc-drag-handle-bg-colour: rgba(0, 0, 0, 0.2);\n --rc-drag-bar-size: 6px;\n --rc-border-color: rgba(255, 255, 255, 0.7);\n --rc-focus-color: #0088ff;\n }\n\n .ReactCrop {\n position: relative;\n display: inline-block;\n cursor: crosshair;\n max-width: 100%;\n }\n\n .ReactCrop *,\n .ReactCrop *:before,\n .ReactCrop *:after {\n box-sizing: border-box;\n }\n\n .ReactCrop--disabled,\n .ReactCrop--locked {\n cursor: inherit;\n }\n\n .ReactCrop__child-wrapper {\n overflow: hidden;\n max-height: inherit;\n }\n\n .ReactCrop__child-wrapper > img,\n .ReactCrop__child-wrapper > video {\n display: block;\n max-width: 100%;\n max-height: inherit;\n }\n\n .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper > img,\n .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper > video {\n touch-action: none;\n }\n\n .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__crop-selection {\n touch-action: none;\n }\n\n .ReactCrop__crop-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n width: calc(100% + 0.5px);\n height: calc(100% + 0.5px);\n }\n\n .ReactCrop__crop-selection {\n position: absolute;\n top: 0;\n left: 0;\n transform: translateZ(0);\n cursor: move;\n }\n\n .ReactCrop--disabled .ReactCrop__crop-selection {\n cursor: inherit;\n }\n\n .ReactCrop--circular-crop .ReactCrop__crop-selection {\n border-radius: 50%;\n }\n\n .ReactCrop--circular-crop .ReactCrop__crop-selection:after {\n pointer-events: none;\n content: '';\n position: absolute;\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n border: 1px solid var(--rc-border-color);\n opacity: 0.3;\n }\n\n .ReactCrop--no-animate .ReactCrop__crop-selection {\n outline: 1px dashed white;\n }\n\n .ReactCrop__crop-selection:not(\n .ReactCrop--no-animate .ReactCrop__crop-selection\n ) {\n animation: marching-ants 1s;\n background-image:\n linear-gradient(to right, #fff 50%, #444 50%),\n linear-gradient(to right, #fff 50%, #444 50%),\n linear-gradient(to bottom, #fff 50%, #444 50%),\n linear-gradient(to bottom, #fff 50%, #444 50%);\n background-size:\n 10px 1px,\n 10px 1px,\n 1px 10px,\n 1px 10px;\n background-position:\n 0 0,\n 0 100%,\n 0 0,\n 100% 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n color: #fff;\n animation-play-state: running;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n\n .ReactCrop__crop-selection:focus {\n outline: 2px solid var(--rc-focus-color);\n outline-offset: -1px;\n }\n\n .ReactCrop--invisible-crop .ReactCrop__crop-mask,\n .ReactCrop--invisible-crop .ReactCrop__crop-selection {\n display: none;\n }\n\n .ReactCrop__rule-of-thirds-vt:before,\n .ReactCrop__rule-of-thirds-vt:after,\n .ReactCrop__rule-of-thirds-hz:before,\n .ReactCrop__rule-of-thirds-hz:after {\n content: '';\n display: block;\n position: absolute;\n background-color: #fff6;\n }\n\n .ReactCrop__rule-of-thirds-vt:before,\n .ReactCrop__rule-of-thirds-vt:after {\n width: 1px;\n height: 100%;\n }\n\n .ReactCrop__rule-of-thirds-vt:before {\n left: 33.3333333333%;\n }\n\n .ReactCrop__rule-of-thirds-vt:after {\n left: 66.6666666667%;\n }\n\n .ReactCrop__rule-of-thirds-hz:before,\n .ReactCrop__rule-of-thirds-hz:after {\n width: 100%;\n height: 1px;\n }\n\n .ReactCrop__rule-of-thirds-hz:before {\n top: 33.3333333333%;\n }\n\n .ReactCrop__rule-of-thirds-hz:after {\n top: 66.6666666667%;\n }\n\n .ReactCrop__drag-handle {\n position: absolute;\n width: var(--rc-drag-handle-size);\n height: var(--rc-drag-handle-size);\n background-color: var(--rc-drag-handle-bg-colour);\n border: 1px solid var(--rc-border-color);\n }\n\n .ReactCrop__drag-handle:focus {\n background: var(--rc-focus-color);\n }\n\n .ReactCrop .ord-nw {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n }\n\n .ReactCrop .ord-n {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n }\n\n .ReactCrop .ord-ne {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n }\n\n .ReactCrop .ord-e {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n }\n\n .ReactCrop .ord-se {\n bottom: 0;\n right: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n }\n\n .ReactCrop .ord-s {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n }\n\n .ReactCrop .ord-sw {\n bottom: 0;\n left: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n }\n\n .ReactCrop .ord-w {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n }\n\n .ReactCrop__disabled .ReactCrop__drag-handle {\n cursor: inherit;\n }\n\n .ReactCrop__drag-bar {\n position: absolute;\n }\n\n .ReactCrop__drag-bar.ord-n {\n top: 0;\n left: 0;\n width: 100%;\n height: var(--rc-drag-bar-size);\n transform: translateY(-50%);\n }\n\n .ReactCrop__drag-bar.ord-e {\n right: 0;\n top: 0;\n width: var(--rc-drag-bar-size);\n height: 100%;\n transform: translate(50%);\n }\n\n .ReactCrop__drag-bar.ord-s {\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--rc-drag-bar-size);\n transform: translateY(50%);\n }\n\n .ReactCrop__drag-bar.ord-w {\n top: 0;\n left: 0;\n width: var(--rc-drag-bar-size);\n height: 100%;\n transform: translate(-50%);\n }\n\n .ReactCrop--new-crop .ReactCrop__drag-bar,\n .ReactCrop--new-crop .ReactCrop__drag-handle,\n .ReactCrop--fixed-aspect .ReactCrop__drag-bar,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w {\n display: none;\n }\n\n @media (pointer: coarse) {\n .ReactCrop .ord-n,\n .ReactCrop .ord-e,\n .ReactCrop .ord-s,\n .ReactCrop .ord-w {\n display: none;\n }\n\n .ReactCrop__drag-handle {\n width: var(--rc-drag-handle-mobile-size);\n height: var(--rc-drag-handle-mobile-size);\n }\n }\n"])));
|
|
10
|
+
|
|
11
|
+
exports.default = globalStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined';
|
|
4
4
|
import ErrorOutlineOutlinedIcon from '@mui/icons-material/ErrorOutlineOutlined';
|
|
5
5
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
@@ -32,7 +32,7 @@ var icons = {
|
|
|
32
32
|
}
|
|
33
33
|
})
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
var Alert = /*#__PURE__*/forwardRef(function Alert2(_ref, ref) {
|
|
36
36
|
var children = _ref.children,
|
|
37
37
|
_ref$color = _ref.color,
|
|
38
38
|
color = _ref$color === void 0 ? "info" : _ref$color,
|
|
@@ -48,10 +48,11 @@ function Alert(_ref) {
|
|
|
48
48
|
variant: variantMap[variant] || variant,
|
|
49
49
|
severity: color,
|
|
50
50
|
iconMapping: icons,
|
|
51
|
-
closeText: "undo"
|
|
51
|
+
closeText: "undo",
|
|
52
|
+
ref: ref
|
|
52
53
|
}, rest), (!icon || !color || !icons[color]) && {
|
|
53
54
|
icon: false
|
|
54
55
|
}), title && /* @__PURE__ */React.createElement(StyledAlertTitle, null, title), children);
|
|
55
|
-
}
|
|
56
|
+
});
|
|
56
57
|
|
|
57
58
|
export { Alert as default };
|
|
@@ -34,7 +34,10 @@ function AvatarCropDialog(_ref) {
|
|
|
34
34
|
var _useState = useState({
|
|
35
35
|
aspect: 1,
|
|
36
36
|
unit: "%",
|
|
37
|
-
width:
|
|
37
|
+
width: 50,
|
|
38
|
+
height: 50,
|
|
39
|
+
x: 25,
|
|
40
|
+
y: 25
|
|
38
41
|
}),
|
|
39
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40
43
|
crop = _useState2[0],
|
|
@@ -133,7 +136,6 @@ function AvatarCropDialog(_ref) {
|
|
|
133
136
|
}, /* @__PURE__ */React.createElement(StyledEditor, {
|
|
134
137
|
showError: showError
|
|
135
138
|
}, /* @__PURE__ */React.createElement(ReactCrop, {
|
|
136
|
-
src: droppedFile,
|
|
137
139
|
crop: crop,
|
|
138
140
|
style: {
|
|
139
141
|
width: editorWidth,
|
|
@@ -143,7 +145,9 @@ function AvatarCropDialog(_ref) {
|
|
|
143
145
|
onChange: handleCropChange,
|
|
144
146
|
onImageLoaded: handleImageLoaded,
|
|
145
147
|
keepSelection: true
|
|
146
|
-
}
|
|
148
|
+
}, /* @__PURE__ */React.createElement("img", {
|
|
149
|
+
src: droppedFile
|
|
150
|
+
})))), /* @__PURE__ */React.createElement(ModalActions, null, /* @__PURE__ */React.createElement(Button, {
|
|
147
151
|
onClick: handleCancel,
|
|
148
152
|
variant: "outlined",
|
|
149
153
|
loading: cancelling,
|
|
@@ -10,13 +10,12 @@ import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
10
10
|
import PersonIcon from '@mui/icons-material/Person';
|
|
11
11
|
import WarningIcon from '@mui/icons-material/Warning';
|
|
12
12
|
import { useDropzone } from 'react-dropzone';
|
|
13
|
+
import IconButton from './IconButton.js';
|
|
13
14
|
import Confirmation from './Confirmation.js';
|
|
14
15
|
import Modal from './Modal.js';
|
|
15
|
-
import ModalContent from './ModalContent.js';
|
|
16
|
-
import ModalHeader from './ModalHeader.js';
|
|
17
16
|
import Text from './Text.js';
|
|
18
17
|
import AvatarCropDialog from './AvatarCropDialog.js';
|
|
19
|
-
import { StyledRoot, StyledLinearProgress, StyledCircularProgress, StyledAvatarIcon, StyledAvatar, StyledAddIcon
|
|
18
|
+
import { StyledRoot, StyledLinearProgress, StyledCircularProgress, StyledAvatarIcon, StyledAvatar, StyledAddIcon } from './AvatarInput.styled.js';
|
|
20
19
|
|
|
21
20
|
var _excluded = ["disabled", "edges", "dropzoneLabel", "dropzoneDescription", "placeholder", "onSave", "onDelete", "value", "DropzoneIcon", "hasSelection"];
|
|
22
21
|
function AvatarInput(_ref) {
|
|
@@ -166,26 +165,25 @@ function AvatarInput(_ref) {
|
|
|
166
165
|
align: isNotMobile ? "left" : "center",
|
|
167
166
|
weight: "500",
|
|
168
167
|
color: "textPrimary"
|
|
169
|
-
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription))))), (savedImage || value) &&
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription))))), (savedImage || value) && /* @__PURE__ */React.createElement(IconButton, {
|
|
169
|
+
color: "error",
|
|
170
|
+
onClick: function onClick() {
|
|
171
|
+
return setConfirmDelete(true);
|
|
172
|
+
}
|
|
173
|
+
}, /* @__PURE__ */React.createElement(DeleteIcon, null))), droppedFile && /* @__PURE__ */React.createElement(Modal, {
|
|
173
174
|
open: open,
|
|
174
175
|
onClose: function onClose() {
|
|
175
176
|
return setOpen(false);
|
|
176
177
|
},
|
|
177
178
|
fullWidth: true,
|
|
178
|
-
maxWidth: "
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
onSave: handleSave,
|
|
187
|
-
onDelete: handleDelete
|
|
188
|
-
})))), /* @__PURE__ */React.createElement(Confirmation, {
|
|
179
|
+
maxWidth: "md",
|
|
180
|
+
content: /* @__PURE__ */React.createElement(AvatarCropDialog, _objectSpread2(_objectSpread2({
|
|
181
|
+
droppedFile: droppedFile
|
|
182
|
+
}, rest), {}, {
|
|
183
|
+
onSave: handleSave,
|
|
184
|
+
onDelete: handleDelete
|
|
185
|
+
}))
|
|
186
|
+
}), /* @__PURE__ */React.createElement(Confirmation, {
|
|
189
187
|
open: confirmDelete,
|
|
190
188
|
onCancel: function onCancel() {
|
|
191
189
|
return setConfirmDelete(false);
|
|
@@ -17,7 +17,7 @@ function BaseModal(_ref) {
|
|
|
17
17
|
_ref$maxWidth = _ref.maxWidth,
|
|
18
18
|
maxWidth = _ref$maxWidth === void 0 ? "sm" : _ref$maxWidth,
|
|
19
19
|
_ref$onClose = _ref.onClose,
|
|
20
|
-
onClose = _ref$onClose === void 0 ?
|
|
20
|
+
onClose = _ref$onClose === void 0 ? void 0 : _ref$onClose,
|
|
21
21
|
_ref$open = _ref.open,
|
|
22
22
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
23
23
|
_ref$slotProps = _ref.slotProps,
|
|
@@ -5,24 +5,24 @@ import ButtonGroup from '@mui/material/ButtonGroup';
|
|
|
5
5
|
|
|
6
6
|
var selectedStyles = function selectedStyles(hasError, theme) {
|
|
7
7
|
return {
|
|
8
|
-
borderColor: hasError === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
8
|
+
borderColor: hasError === "yes" ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
9
9
|
color: "#fff",
|
|
10
|
-
background: hasError === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
10
|
+
background: hasError === "yes" ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
11
11
|
"&:hover": {
|
|
12
|
-
background: hasError === "yes" ? theme.palette.secondary.dark : theme.palette.
|
|
12
|
+
background: hasError === "yes" ? theme.palette.secondary.dark : theme.palette.primary.dark
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
var unselectedStyles = function unselectedStyles(error, theme) {
|
|
17
17
|
return {
|
|
18
|
-
borderColor: error === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
19
|
-
color: error === "yes" ? theme.palette.secondary.main : theme.palette.
|
|
18
|
+
borderColor: error === "yes" ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
19
|
+
color: error === "yes" ? theme.palette.secondary.main : theme.palette.primary.main
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
var requiredUnselectedStyles = function requiredUnselectedStyles(selected, theme) {
|
|
23
23
|
return {
|
|
24
|
-
borderColor: !selected ? theme.palette.secondary.main : theme.palette.
|
|
25
|
-
color: !selected ? theme.palette.secondary.main : theme.palette.
|
|
24
|
+
borderColor: !selected ? theme.palette.secondary.main : theme.palette.primary.main,
|
|
25
|
+
color: !selected ? theme.palette.secondary.main : theme.palette.primary.main
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
var borderRadiusStyles = function borderRadiusStyles(edges, theme) {
|
|
@@ -18,7 +18,7 @@ import Modal from './Modal.js';
|
|
|
18
18
|
import ModalHeader from './ModalHeader.js';
|
|
19
19
|
import ModalContent from './ModalContent.js';
|
|
20
20
|
import CroppedImageInputActions from './CroppedImageInputActions.js';
|
|
21
|
-
import { StyledCircularProgress, StyledSavedImage, StyledFileIcon,
|
|
21
|
+
import { StyledCircularProgress, StyledSavedImage, StyledFileIcon, StyledEditor } from './CroppedImageInput.styled.js';
|
|
22
22
|
import { isImage } from '../utils/helpers/file.js';
|
|
23
23
|
|
|
24
24
|
function CroppedImageInput(_ref) {
|
|
@@ -334,7 +334,12 @@ function CroppedImageInput(_ref) {
|
|
|
334
334
|
item: true,
|
|
335
335
|
xs: 12,
|
|
336
336
|
md: 1
|
|
337
|
-
}, /* @__PURE__ */React.createElement(
|
|
337
|
+
}, /* @__PURE__ */React.createElement(IconButton, {
|
|
338
|
+
onClick: function onClick() {
|
|
339
|
+
return setConfirmDelete(true);
|
|
340
|
+
},
|
|
341
|
+
color: "error"
|
|
342
|
+
}, /* @__PURE__ */React.createElement(DeleteIcon, null))))), !src && !documentFile && !croppedImage && (openInDialog ? /* @__PURE__ */React.createElement(motion.div, _objectSpread2(_objectSpread2({}, fade), {}, {
|
|
338
343
|
key: "upload-button"
|
|
339
344
|
}), /* @__PURE__ */React.createElement(FileUploadButton, {
|
|
340
345
|
onUpload: onDrop,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import styled$1, { css } from 'styled-components';
|
|
3
1
|
import { motion } from 'framer-motion';
|
|
4
2
|
import { styled } from '@mui/material/styles';
|
|
5
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
6
4
|
import DescriptionIcon from '@mui/icons-material/Description';
|
|
7
5
|
|
|
8
|
-
var _templateObject, _templateObject2;
|
|
9
6
|
var borderRadius = function borderRadius(edges, theme) {
|
|
10
7
|
switch (edges) {
|
|
11
8
|
case "rounded":
|
|
@@ -69,9 +66,5 @@ var StyledCircularProgress = styled(CircularProgress)({
|
|
|
69
66
|
marginLeft: -20,
|
|
70
67
|
zIndex: 1
|
|
71
68
|
});
|
|
72
|
-
var StyledDeleteIcon = styled$1.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref4) {
|
|
73
|
-
var theme = _ref4.theme;
|
|
74
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n right: 25px;\n z-index: 9;\n background: transparent;\n color: ", ";\n width: 48px;\n height: 48px;\n font-size: 20px;\n transition: all 0.25s ease-in-out;\n transform: translateY(-50%) scale(0.9);\n box-shadow: ", ";\n border-radius: 50%;\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n transform: translateY(-50%) scale(1.05);\n color: ", ";\n box-shadow: ", ";\n }\n "])), theme.palette.grey.main, theme.shadows[2], theme.palette.secondary.main, theme.shadows[4]);
|
|
75
|
-
});
|
|
76
69
|
|
|
77
|
-
export { StyledCircularProgress,
|
|
70
|
+
export { StyledCircularProgress, StyledEditor, StyledFileIcon, StyledSavedImage };
|
|
@@ -33,22 +33,20 @@ function CroppedImageInputActions(_ref) {
|
|
|
33
33
|
}, /* @__PURE__ */React.createElement(Grid, {
|
|
34
34
|
item: true
|
|
35
35
|
}, /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
36
|
-
loading: true,
|
|
37
36
|
color: "primaryAlt",
|
|
38
37
|
variant: "outlined",
|
|
39
38
|
size: "large",
|
|
40
39
|
onClick: handleCancel,
|
|
41
|
-
|
|
40
|
+
loading: cancelling,
|
|
42
41
|
disabled: disabled,
|
|
43
42
|
fullWidth: !isNotMobile
|
|
44
43
|
}, cancelButtonProps), cancelButtonProps.text || "Cancel")), /* @__PURE__ */React.createElement(Grid, {
|
|
45
44
|
item: true
|
|
46
45
|
}, /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
47
|
-
loading: true,
|
|
48
46
|
color: "primary",
|
|
49
47
|
size: "large",
|
|
50
48
|
onClick: handleImageSave,
|
|
51
|
-
|
|
49
|
+
loading: saving,
|
|
52
50
|
disabled: disabled,
|
|
53
51
|
fullWidth: !isNotMobile
|
|
54
52
|
}, saveButtonProps), saveButtonProps.text || "Save"))))
|
|
@@ -65,15 +65,15 @@ function DropZone(_ref) {
|
|
|
65
65
|
})), !isDragAccept && !isDragReject && /* @__PURE__ */React.createElement(StyledIcon, {
|
|
66
66
|
compact: compact
|
|
67
67
|
}, /* @__PURE__ */React.createElement(CloudUploadIcon, {
|
|
68
|
-
color: "
|
|
68
|
+
color: "primary",
|
|
69
69
|
fontSize: "inherit"
|
|
70
70
|
})), /* @__PURE__ */React.createElement(Typography, {
|
|
71
|
-
variant: "
|
|
71
|
+
variant: "body1",
|
|
72
72
|
align: "center"
|
|
73
73
|
}, isDragReject ? "Error" : dropzoneLabel), /* @__PURE__ */React.createElement(Typography, {
|
|
74
74
|
variant: "body2",
|
|
75
75
|
align: "center",
|
|
76
|
-
color: "
|
|
76
|
+
color: "text.blue"
|
|
77
77
|
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription)), /* @__PURE__ */React.createElement(AnimatePresence, null, listAcceptedFiles && acceptedFiles.length > 0 && /* @__PURE__ */React.createElement(motion.div, {
|
|
78
78
|
initial: {
|
|
79
79
|
translateY: -20,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray, toConsumableArray as _toConsumableArray, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { useState, useCallback } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
5
|
-
import { AnimateSharedLayout, AnimatePresence, motion } from 'framer-motion';
|
|
4
|
+
import { AnimatePresence, motion } from 'framer-motion';
|
|
6
5
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
7
6
|
import DropZone from './DropZone.js';
|
|
8
7
|
import FormControl from './FormControl.js';
|
|
8
|
+
import Alert from './Alert.js';
|
|
9
9
|
import Button from './Button.js';
|
|
10
10
|
import Confirmation from './Confirmation.js';
|
|
11
11
|
import IconButton from './IconButton.js';
|
|
@@ -154,7 +154,7 @@ function FileUpload(_ref) {
|
|
|
154
154
|
edges: edges
|
|
155
155
|
}, /* @__PURE__ */React.createElement(FormFocus, {
|
|
156
156
|
name: name
|
|
157
|
-
}), files && files.length > 0 && /* @__PURE__ */React.createElement(StyledSavedWrapper, _objectSpread2(_objectSpread2({}, fade), {}, {
|
|
157
|
+
}), files && files.length > 0 && /* @__PURE__ */React.createElement(AnimatePresence, null, /* @__PURE__ */React.createElement(StyledSavedWrapper, _objectSpread2(_objectSpread2({}, fade), {}, {
|
|
158
158
|
edges: edges
|
|
159
159
|
}), (saving || loading) && /* @__PURE__ */React.createElement(StyledLoader, {
|
|
160
160
|
disableShrink: true
|
|
@@ -165,10 +165,9 @@ function FileUpload(_ref) {
|
|
|
165
165
|
}, /* @__PURE__ */React.createElement(Grid, {
|
|
166
166
|
item: true,
|
|
167
167
|
xs: 12
|
|
168
|
-
},
|
|
169
|
-
return /* @__PURE__ */React.createElement(
|
|
170
|
-
key: getFileName(file)
|
|
171
|
-
}, /* @__PURE__ */React.createElement(motion.div, {
|
|
168
|
+
}, files.map(function (file, index) {
|
|
169
|
+
return /* @__PURE__ */React.createElement(motion.div, {
|
|
170
|
+
key: getFileName(file),
|
|
172
171
|
positionTransition: true,
|
|
173
172
|
initial: {
|
|
174
173
|
opacity: 0,
|
|
@@ -188,7 +187,7 @@ function FileUpload(_ref) {
|
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
189
|
}, /* @__PURE__ */React.createElement(Alert, {
|
|
191
|
-
|
|
190
|
+
color: showError || fileErrors(file, index) !== null ? "error" : "success",
|
|
192
191
|
style: {
|
|
193
192
|
marginBottom: 5
|
|
194
193
|
},
|
|
@@ -196,24 +195,19 @@ function FileUpload(_ref) {
|
|
|
196
195
|
onClick: function onClick() {
|
|
197
196
|
return setViewedFile(file);
|
|
198
197
|
},
|
|
199
|
-
color: "
|
|
198
|
+
color: "success",
|
|
200
199
|
size: "small",
|
|
201
200
|
variant: "text"
|
|
202
201
|
}, "View"), /* @__PURE__ */React.createElement(Tooltip, {
|
|
203
|
-
title: "Delete"
|
|
204
|
-
|
|
205
|
-
}, /* @__PURE__ */React.createElement("div", null, /* @__PURE__ */React.createElement(IconButton, {
|
|
202
|
+
title: "Delete"
|
|
203
|
+
}, /* @__PURE__ */React.createElement(IconButton, {
|
|
206
204
|
disabled: saving,
|
|
207
205
|
size: "small",
|
|
208
|
-
"aria-label": "delete",
|
|
209
|
-
style: {
|
|
210
|
-
padding: 0
|
|
211
|
-
},
|
|
212
206
|
onClick: function onClick() {
|
|
213
207
|
return !showError ? handleDeleteConfirmation(index) : handleDeleteWithoutConfirmation(index);
|
|
214
208
|
}
|
|
215
|
-
}, /* @__PURE__ */React.createElement(DeleteIcon, null))))
|
|
216
|
-
}, /* @__PURE__ */React.createElement(StyledAlertTitle, null, getFileName(file)), fileErrors(file, index)))
|
|
209
|
+
}, /* @__PURE__ */React.createElement(DeleteIcon, null))))
|
|
210
|
+
}, /* @__PURE__ */React.createElement(StyledAlertTitle, null, getFileName(file)), fileErrors(file, index)));
|
|
217
211
|
}))))), (!files || files.length === 0 || !dropzoneProps || dropzoneProps.maxFiles === void 0 || dropzoneProps.maxFiles > 1) && /* @__PURE__ */React.createElement(motion.div, _objectSpread2(_objectSpread2({}, fade), {}, {
|
|
218
212
|
style: files && files.length > 0 ? {
|
|
219
213
|
marginTop: 8
|
|
@@ -86,9 +86,8 @@ function FileUploadButton(_ref) {
|
|
|
86
86
|
getRootProps = _useDropzone.getRootProps,
|
|
87
87
|
getInputProps = _useDropzone.getInputProps;
|
|
88
88
|
return /* @__PURE__ */React.createElement("span", _objectSpread2({}, getRootProps()), /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
89
|
-
loading: true,
|
|
90
89
|
disabled: disabled,
|
|
91
|
-
|
|
90
|
+
loading: pending,
|
|
92
91
|
pendingIndicator: /* @__PURE__ */React.createElement(FileUploadButtonLoader, {
|
|
93
92
|
accepted: accepted,
|
|
94
93
|
rejected: rejected
|
|
@@ -12,12 +12,12 @@ function FlashMessage(_ref) {
|
|
|
12
12
|
_ref$color = _ref.color,
|
|
13
13
|
color = _ref$color === void 0 ? "success" : _ref$color,
|
|
14
14
|
_ref$horizontal = _ref.horizontal,
|
|
15
|
-
horizontal = _ref$horizontal === void 0 ? "
|
|
15
|
+
horizontal = _ref$horizontal === void 0 ? "right" : _ref$horizontal,
|
|
16
16
|
_ref$open = _ref.open,
|
|
17
17
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
18
18
|
onClose = _ref.onClose,
|
|
19
19
|
_ref$vertical = _ref.vertical,
|
|
20
|
-
vertical = _ref$vertical === void 0 ? "
|
|
20
|
+
vertical = _ref$vertical === void 0 ? "bottom" : _ref$vertical,
|
|
21
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
22
|
var handleClose = function handleClose() {
|
|
23
23
|
onClose();
|
|
@@ -30,11 +30,10 @@ function FlashMessage(_ref) {
|
|
|
30
30
|
autoHideDuration: autoHideDuration,
|
|
31
31
|
open: open,
|
|
32
32
|
onClose: handleClose,
|
|
33
|
-
message: "
|
|
33
|
+
message: "snack"
|
|
34
34
|
}, rest), /* @__PURE__ */React.createElement(Alert, {
|
|
35
35
|
color: color,
|
|
36
|
-
onClose: handleClose
|
|
37
|
-
elevation: 7
|
|
36
|
+
onClose: handleClose
|
|
38
37
|
}, children));
|
|
39
38
|
}
|
|
40
39
|
FlashMessage.propTypes = {
|
|
@@ -69,16 +69,11 @@ var FormControl = /*#__PURE__*/forwardRef(function FormControl2(_ref, ref) {
|
|
|
69
69
|
color: props.color === "default" ? "info" : props.color
|
|
70
70
|
}, statusMessage))), !!helperText && /* @__PURE__ */React.createElement(FormHelperText, {
|
|
71
71
|
sx: {
|
|
72
|
-
color: "text.
|
|
73
|
-
fontSize:
|
|
74
|
-
|
|
75
|
-
return "".concat(theme.typography.fontSize, "px");
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
},
|
|
79
|
-
padding: 0,
|
|
72
|
+
color: "text.blue",
|
|
73
|
+
fontSize: "13px",
|
|
74
|
+
padding: "0 0 0 8px",
|
|
80
75
|
margin: 0,
|
|
81
|
-
mt: statusMessage ? 0 : "
|
|
76
|
+
mt: statusMessage ? 0 : "6px"
|
|
82
77
|
}
|
|
83
78
|
}, helperText));
|
|
84
79
|
});
|
|
@@ -13,7 +13,7 @@ function Heading(_ref) {
|
|
|
13
13
|
_ref$transform = _ref.transform,
|
|
14
14
|
transform = _ref$transform === void 0 ? void 0 : _ref$transform,
|
|
15
15
|
_ref$weight = _ref.weight,
|
|
16
|
-
weight = _ref$weight === void 0 ? "
|
|
16
|
+
weight = _ref$weight === void 0 ? "700" : _ref$weight,
|
|
17
17
|
_ref$sx = _ref.sx,
|
|
18
18
|
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
19
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -48,9 +48,9 @@ function Modal(_ref) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
}), heading && /* @__PURE__ */React.createElement(ModalHeader, {
|
|
51
|
+
}), heading && /* @__PURE__ */React.createElement(ModalHeader, _objectSpread2({}, onClose && {
|
|
52
52
|
onClose: handleClose
|
|
53
|
-
}, loading && /* @__PURE__ */React.createElement(Skeleton, {
|
|
53
|
+
}), loading && /* @__PURE__ */React.createElement(Skeleton, {
|
|
54
54
|
variant: "text",
|
|
55
55
|
height: 20,
|
|
56
56
|
width: 250
|
|
@@ -4,7 +4,7 @@ import styled, { css } from 'styled-components';
|
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
5
5
|
var StyledContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "}\n"])), function (_ref) {
|
|
6
6
|
var theme = _ref.theme;
|
|
7
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n @media screen and (max-width: 767px) {\n flex-direction: column;\n padding: ", ";\n }\n @media screen and (min-width: 768px) {\n height: 100%;\n }\n "])), theme.spacing(3));
|
|
7
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n cusor: pointer;\n @media screen and (max-width: 767px) {\n flex-direction: column;\n padding: ", ";\n }\n @media screen and (min-width: 768px) {\n height: 100%;\n }\n "])), theme.spacing(3));
|
|
8
8
|
});
|
|
9
9
|
var StyledImg = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "}\n\n"])), function (_ref2) {
|
|
10
10
|
var theme = _ref2.theme;
|
|
@@ -5,7 +5,6 @@ import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
|
|
|
5
5
|
import { StyledContent, StyledIcon } from './SuccessModal.styled.js';
|
|
6
6
|
import Heading from './Heading.js';
|
|
7
7
|
import Modal from './Modal.js';
|
|
8
|
-
import ModalContent from './ModalContent.js';
|
|
9
8
|
|
|
10
9
|
function SuccessModal(_ref) {
|
|
11
10
|
var _ref$duration = _ref.duration,
|
|
@@ -19,23 +18,25 @@ function SuccessModal(_ref) {
|
|
|
19
18
|
isOpen = _useState2[0],
|
|
20
19
|
setIsOpen = _useState2[1];
|
|
21
20
|
useEffect(function () {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
setIsOpen(show);
|
|
22
|
+
var timeout = setTimeout(function () {
|
|
23
|
+
return setIsOpen(false);
|
|
24
|
+
}, duration);
|
|
25
|
+
return function () {
|
|
26
|
+
return clearTimeout(timeout);
|
|
27
|
+
};
|
|
28
28
|
}, [duration, show]);
|
|
29
29
|
return /* @__PURE__ */React.createElement(Modal, {
|
|
30
30
|
open: isOpen,
|
|
31
31
|
fullWidth: true,
|
|
32
32
|
maxWidth: "sm",
|
|
33
|
-
hideBackdrop: true
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
hideBackdrop: true,
|
|
34
|
+
content: /* @__PURE__ */React.createElement(StyledContent, null, /* @__PURE__ */React.createElement(StyledIcon, null, /* @__PURE__ */React.createElement(CheckCircleOutlineIcon, null)), /* @__PURE__ */React.createElement(Heading, {
|
|
35
|
+
align: "center",
|
|
36
|
+
as: "h4",
|
|
37
|
+
gutterBottom: false
|
|
38
|
+
}, message))
|
|
39
|
+
});
|
|
39
40
|
}
|
|
40
41
|
SuccessModal.propTypes = {
|
|
41
42
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { ThemeProvider as ThemeProvider$2 } from '@emotion/react';
|
|
4
|
+
import { ThemeProvider as ThemeProvider$2, Global } from '@emotion/react';
|
|
5
5
|
import { ThemeProvider as ThemeProvider$1 } from 'styled-components';
|
|
6
6
|
import { createTheme, StyledEngineProvider, ThemeProvider as ThemeProvider$3 } from '@mui/material/styles';
|
|
7
7
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
8
8
|
import theme from '../theme/index.js';
|
|
9
|
+
import globalStyles from '../utils/allGlobalStyles.js';
|
|
9
10
|
|
|
10
11
|
var _excluded = ["theme", "children"];
|
|
11
12
|
function ThemeProvider(_ref) {
|
|
@@ -24,7 +25,9 @@ function ThemeProvider(_ref) {
|
|
|
24
25
|
theme: mergedTheme
|
|
25
26
|
}, /* @__PURE__ */React.createElement(ThemeProvider$3, _objectSpread2({
|
|
26
27
|
theme: mergedTheme
|
|
27
|
-
}, rest), /* @__PURE__ */React.createElement(CssBaseline, null),
|
|
28
|
+
}, rest), /* @__PURE__ */React.createElement(CssBaseline, null), /* @__PURE__ */React.createElement(Global, {
|
|
29
|
+
styles: globalStyles
|
|
30
|
+
}), children))));
|
|
28
31
|
}
|
|
29
32
|
ThemeProvider.propTypes = {
|
|
30
33
|
theme: PropTypes.shape({
|
package/dist/esm/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { default as CollapsedText } from './components/CollapsedText.js';
|
|
|
18
18
|
export { default as Confirmation } from './components/Confirmation.js';
|
|
19
19
|
export { default as CroppedImageInput } from './components/CroppedImageInput.js';
|
|
20
20
|
export { default as DateInput } from './components/DateInput.js';
|
|
21
|
+
export { default as DateSelect } from './components/DateSelect.js';
|
|
21
22
|
export { default as Divider } from './components/Divider.js';
|
|
22
23
|
export { default as DropZone } from './components/DropZone.js';
|
|
23
24
|
export { default as Embed } from './components/Embed.js';
|
|
@@ -49,6 +50,7 @@ export { default as Skeleton } from './components/Skeleton.js';
|
|
|
49
50
|
export { default as Stepper } from './components/Stepper.js';
|
|
50
51
|
export { default as SuccessModal } from './components/SuccessModal.js';
|
|
51
52
|
export { default as Switch } from './components/Switch.js';
|
|
53
|
+
export { default as StatusMessage } from './components/StatusMessage.js';
|
|
52
54
|
export { default as Tab } from './components/Tab.js';
|
|
53
55
|
export { default as TabPanel } from './components/TabPanel.js';
|
|
54
56
|
export { default as Tabs } from './components/Tabs.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
var _templateObject;
|
|
5
|
+
var globalStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @keyframes marching-ants {\n 0% {\n background-position:\n 0 0,\n 0 100%,\n 0 0,\n 100% 0;\n }\n\n to {\n background-position:\n 20px 0,\n -20px 100%,\n 0 -20px,\n 100% 20px;\n }\n }\n\n :root {\n --rc-drag-handle-size: 12px;\n --rc-drag-handle-mobile-size: 24px;\n --rc-drag-handle-bg-colour: rgba(0, 0, 0, 0.2);\n --rc-drag-bar-size: 6px;\n --rc-border-color: rgba(255, 255, 255, 0.7);\n --rc-focus-color: #0088ff;\n }\n\n .ReactCrop {\n position: relative;\n display: inline-block;\n cursor: crosshair;\n max-width: 100%;\n }\n\n .ReactCrop *,\n .ReactCrop *:before,\n .ReactCrop *:after {\n box-sizing: border-box;\n }\n\n .ReactCrop--disabled,\n .ReactCrop--locked {\n cursor: inherit;\n }\n\n .ReactCrop__child-wrapper {\n overflow: hidden;\n max-height: inherit;\n }\n\n .ReactCrop__child-wrapper > img,\n .ReactCrop__child-wrapper > video {\n display: block;\n max-width: 100%;\n max-height: inherit;\n }\n\n .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper > img,\n .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper > video {\n touch-action: none;\n }\n\n .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__crop-selection {\n touch-action: none;\n }\n\n .ReactCrop__crop-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n width: calc(100% + 0.5px);\n height: calc(100% + 0.5px);\n }\n\n .ReactCrop__crop-selection {\n position: absolute;\n top: 0;\n left: 0;\n transform: translateZ(0);\n cursor: move;\n }\n\n .ReactCrop--disabled .ReactCrop__crop-selection {\n cursor: inherit;\n }\n\n .ReactCrop--circular-crop .ReactCrop__crop-selection {\n border-radius: 50%;\n }\n\n .ReactCrop--circular-crop .ReactCrop__crop-selection:after {\n pointer-events: none;\n content: '';\n position: absolute;\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n border: 1px solid var(--rc-border-color);\n opacity: 0.3;\n }\n\n .ReactCrop--no-animate .ReactCrop__crop-selection {\n outline: 1px dashed white;\n }\n\n .ReactCrop__crop-selection:not(\n .ReactCrop--no-animate .ReactCrop__crop-selection\n ) {\n animation: marching-ants 1s;\n background-image:\n linear-gradient(to right, #fff 50%, #444 50%),\n linear-gradient(to right, #fff 50%, #444 50%),\n linear-gradient(to bottom, #fff 50%, #444 50%),\n linear-gradient(to bottom, #fff 50%, #444 50%);\n background-size:\n 10px 1px,\n 10px 1px,\n 1px 10px,\n 1px 10px;\n background-position:\n 0 0,\n 0 100%,\n 0 0,\n 100% 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n color: #fff;\n animation-play-state: running;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n\n .ReactCrop__crop-selection:focus {\n outline: 2px solid var(--rc-focus-color);\n outline-offset: -1px;\n }\n\n .ReactCrop--invisible-crop .ReactCrop__crop-mask,\n .ReactCrop--invisible-crop .ReactCrop__crop-selection {\n display: none;\n }\n\n .ReactCrop__rule-of-thirds-vt:before,\n .ReactCrop__rule-of-thirds-vt:after,\n .ReactCrop__rule-of-thirds-hz:before,\n .ReactCrop__rule-of-thirds-hz:after {\n content: '';\n display: block;\n position: absolute;\n background-color: #fff6;\n }\n\n .ReactCrop__rule-of-thirds-vt:before,\n .ReactCrop__rule-of-thirds-vt:after {\n width: 1px;\n height: 100%;\n }\n\n .ReactCrop__rule-of-thirds-vt:before {\n left: 33.3333333333%;\n }\n\n .ReactCrop__rule-of-thirds-vt:after {\n left: 66.6666666667%;\n }\n\n .ReactCrop__rule-of-thirds-hz:before,\n .ReactCrop__rule-of-thirds-hz:after {\n width: 100%;\n height: 1px;\n }\n\n .ReactCrop__rule-of-thirds-hz:before {\n top: 33.3333333333%;\n }\n\n .ReactCrop__rule-of-thirds-hz:after {\n top: 66.6666666667%;\n }\n\n .ReactCrop__drag-handle {\n position: absolute;\n width: var(--rc-drag-handle-size);\n height: var(--rc-drag-handle-size);\n background-color: var(--rc-drag-handle-bg-colour);\n border: 1px solid var(--rc-border-color);\n }\n\n .ReactCrop__drag-handle:focus {\n background: var(--rc-focus-color);\n }\n\n .ReactCrop .ord-nw {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n }\n\n .ReactCrop .ord-n {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n }\n\n .ReactCrop .ord-ne {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n }\n\n .ReactCrop .ord-e {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n }\n\n .ReactCrop .ord-se {\n bottom: 0;\n right: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n }\n\n .ReactCrop .ord-s {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n }\n\n .ReactCrop .ord-sw {\n bottom: 0;\n left: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n }\n\n .ReactCrop .ord-w {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n }\n\n .ReactCrop__disabled .ReactCrop__drag-handle {\n cursor: inherit;\n }\n\n .ReactCrop__drag-bar {\n position: absolute;\n }\n\n .ReactCrop__drag-bar.ord-n {\n top: 0;\n left: 0;\n width: 100%;\n height: var(--rc-drag-bar-size);\n transform: translateY(-50%);\n }\n\n .ReactCrop__drag-bar.ord-e {\n right: 0;\n top: 0;\n width: var(--rc-drag-bar-size);\n height: 100%;\n transform: translate(50%);\n }\n\n .ReactCrop__drag-bar.ord-s {\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--rc-drag-bar-size);\n transform: translateY(50%);\n }\n\n .ReactCrop__drag-bar.ord-w {\n top: 0;\n left: 0;\n width: var(--rc-drag-bar-size);\n height: 100%;\n transform: translate(-50%);\n }\n\n .ReactCrop--new-crop .ReactCrop__drag-bar,\n .ReactCrop--new-crop .ReactCrop__drag-handle,\n .ReactCrop--fixed-aspect .ReactCrop__drag-bar,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,\n .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w {\n display: none;\n }\n\n @media (pointer: coarse) {\n .ReactCrop .ord-n,\n .ReactCrop .ord-e,\n .ReactCrop .ord-s,\n .ReactCrop .ord-w {\n display: none;\n }\n\n .ReactCrop__drag-handle {\n width: var(--rc-drag-handle-mobile-size);\n height: var(--rc-drag-handle-mobile-size);\n }\n }\n"])));
|
|
6
|
+
|
|
7
|
+
export { globalStyles as default };
|