@tenancy.nz/ui 1.0.3 → 1.0.5
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 +6 -11
- package/dist/cjs/components/Autocomplete.cjs +32 -34
- package/dist/cjs/components/Avatar.cjs +2 -5
- package/dist/cjs/components/AvatarCropDialog.cjs +40 -48
- package/dist/cjs/components/AvatarInput.cjs +86 -110
- package/dist/cjs/components/Badge.cjs +2 -5
- package/dist/cjs/components/BankAccountInput.cjs +74 -81
- package/dist/cjs/components/Bar.cjs +4 -6
- package/dist/cjs/components/BaseModal.cjs +3 -5
- package/dist/cjs/components/BooleanInput.cjs +37 -44
- package/dist/cjs/components/BorderedGrid.cjs +7 -9
- package/dist/cjs/components/Box.cjs +2 -5
- package/dist/cjs/components/Button.cjs +2 -5
- package/dist/cjs/components/Card.cjs +12 -21
- package/dist/cjs/components/CardContent.cjs +2 -5
- package/dist/cjs/components/Checkbox.cjs +14 -19
- package/dist/cjs/components/CircularProgress.cjs +2 -3
- package/dist/cjs/components/CollapsedText.cjs +29 -38
- package/dist/cjs/components/Confirmation.cjs +19 -26
- package/dist/cjs/components/Container.cjs +2 -5
- package/dist/cjs/components/CroppedImageInput.cjs +145 -167
- package/dist/cjs/components/CroppedImageInputActions.cjs +30 -39
- package/dist/cjs/components/DateInput.cjs +71 -79
- package/dist/cjs/components/DateNumberInput.cjs +49 -51
- package/dist/cjs/components/DatePicker.cjs +36 -41
- package/dist/cjs/components/DateSelect.cjs +100 -111
- package/dist/cjs/components/Divider.cjs +2 -3
- package/dist/cjs/components/DropZone.cjs +96 -112
- package/dist/cjs/components/Embed.cjs +11 -15
- package/dist/cjs/components/FileUpload.cjs +105 -126
- package/dist/cjs/components/FileUploadButton.cjs +9 -14
- package/dist/cjs/components/FileUploadButtonLoader.cjs +4 -5
- package/dist/cjs/components/FileViewer.cjs +50 -69
- package/dist/cjs/components/FlashMessage.cjs +7 -11
- package/dist/cjs/components/FormControl.cjs +45 -52
- package/dist/cjs/components/FormFocus.cjs +2 -3
- package/dist/cjs/components/FormLabel.cjs +1 -4
- package/dist/cjs/components/Grid.cjs +8 -14
- package/dist/cjs/components/Heading.cjs +3 -5
- package/dist/cjs/components/IconButton.cjs +2 -5
- package/dist/cjs/components/Icons.cjs +22 -41
- package/dist/cjs/components/LinearProgress.cjs +2 -3
- package/dist/cjs/components/Link.cjs +2 -5
- package/dist/cjs/components/Media.cjs +7 -10
- package/dist/cjs/components/Modal.cjs +23 -30
- package/dist/cjs/components/ModalActions.cjs +3 -5
- package/dist/cjs/components/ModalContent.cjs +3 -5
- package/dist/cjs/components/ModalHeader.cjs +10 -17
- package/dist/cjs/components/Nameplate.cjs +39 -64
- package/dist/cjs/components/Pagination.cjs +12 -17
- package/dist/cjs/components/Paper.cjs +3 -5
- package/dist/cjs/components/Popper.cjs +13 -17
- package/dist/cjs/components/PropertyCard.cjs +62 -90
- package/dist/cjs/components/Radio.cjs +14 -19
- package/dist/cjs/components/Rating.cjs +2 -3
- package/dist/cjs/components/Select.cjs +17 -24
- package/dist/cjs/components/Skeleton.cjs +3 -5
- package/dist/cjs/components/StatusMessage.cjs +3 -5
- package/dist/cjs/components/StepIcon.cjs +13 -20
- package/dist/cjs/components/Stepper.cjs +29 -35
- package/dist/cjs/components/SuccessModal.cjs +7 -16
- package/dist/cjs/components/Switch.cjs +17 -21
- package/dist/cjs/components/Tab.cjs +2 -3
- package/dist/cjs/components/TabPanel.cjs +4 -6
- package/dist/cjs/components/Table.cjs +2 -5
- package/dist/cjs/components/TableBody.cjs +2 -5
- package/dist/cjs/components/TableCell.cjs +2 -5
- package/dist/cjs/components/TableContainer.cjs +2 -5
- package/dist/cjs/components/TableFooter.cjs +2 -5
- package/dist/cjs/components/TableHead.cjs +2 -5
- package/dist/cjs/components/TableRow.cjs +2 -5
- package/dist/cjs/components/Tabs.cjs +4 -6
- package/dist/cjs/components/Tag.cjs +8 -16
- package/dist/cjs/components/Text.cjs +3 -5
- package/dist/cjs/components/TextInput.cjs +39 -47
- package/dist/cjs/components/ThemeProvider.cjs +8 -15
- package/dist/cjs/components/TimeInput.cjs +63 -71
- package/dist/cjs/components/Tooltip.cjs +5 -9
- package/dist/esm/components/Alert.js +6 -11
- package/dist/esm/components/Autocomplete.js +33 -35
- package/dist/esm/components/Avatar.js +2 -5
- package/dist/esm/components/AvatarCropDialog.js +41 -49
- package/dist/esm/components/AvatarInput.js +87 -111
- package/dist/esm/components/Badge.js +2 -5
- package/dist/esm/components/BankAccountInput.js +75 -82
- package/dist/esm/components/Bar.js +4 -6
- package/dist/esm/components/BaseModal.js +3 -5
- package/dist/esm/components/BooleanInput.js +38 -45
- package/dist/esm/components/BorderedGrid.js +7 -9
- package/dist/esm/components/Box.js +3 -6
- package/dist/esm/components/Button.js +2 -5
- package/dist/esm/components/Card.js +12 -21
- package/dist/esm/components/CardContent.js +2 -5
- package/dist/esm/components/Checkbox.js +14 -19
- package/dist/esm/components/CircularProgress.js +2 -3
- package/dist/esm/components/CollapsedText.js +30 -39
- package/dist/esm/components/Confirmation.js +19 -26
- package/dist/esm/components/Container.js +2 -5
- package/dist/esm/components/CroppedImageInput.js +146 -168
- package/dist/esm/components/CroppedImageInputActions.js +30 -39
- package/dist/esm/components/DateInput.js +72 -80
- package/dist/esm/components/DateNumberInput.js +50 -52
- package/dist/esm/components/DatePicker.js +37 -42
- package/dist/esm/components/DateSelect.js +95 -106
- package/dist/esm/components/Divider.js +2 -3
- package/dist/esm/components/DropZone.js +96 -112
- package/dist/esm/components/Embed.js +11 -15
- package/dist/esm/components/FileUpload.js +106 -127
- package/dist/esm/components/FileUploadButton.js +10 -15
- package/dist/esm/components/FileUploadButtonLoader.js +4 -5
- package/dist/esm/components/FileViewer.js +50 -69
- package/dist/esm/components/FlashMessage.js +7 -11
- package/dist/esm/components/FormControl.js +43 -50
- package/dist/esm/components/FormFocus.js +2 -3
- package/dist/esm/components/FormLabel.js +1 -4
- package/dist/esm/components/Grid.js +8 -14
- package/dist/esm/components/Heading.js +3 -5
- package/dist/esm/components/IconButton.js +2 -5
- package/dist/esm/components/Icons.js +22 -41
- package/dist/esm/components/LinearProgress.js +2 -3
- package/dist/esm/components/Link.js +2 -5
- package/dist/esm/components/Media.js +7 -10
- package/dist/esm/components/Modal.js +23 -30
- package/dist/esm/components/ModalActions.js +3 -5
- package/dist/esm/components/ModalContent.js +3 -5
- package/dist/esm/components/ModalHeader.js +10 -17
- package/dist/esm/components/Nameplate.js +39 -64
- package/dist/esm/components/Pagination.js +12 -17
- package/dist/esm/components/Paper.js +3 -5
- package/dist/esm/components/Popper.js +14 -18
- package/dist/esm/components/PropertyCard.js +62 -90
- package/dist/esm/components/Radio.js +14 -19
- package/dist/esm/components/Rating.js +2 -3
- package/dist/esm/components/Select.js +17 -24
- package/dist/esm/components/Skeleton.js +3 -5
- package/dist/esm/components/StatusMessage.js +3 -5
- package/dist/esm/components/StepIcon.js +13 -20
- package/dist/esm/components/Stepper.js +29 -35
- package/dist/esm/components/SuccessModal.js +8 -17
- package/dist/esm/components/Switch.js +17 -21
- package/dist/esm/components/Tab.js +2 -3
- package/dist/esm/components/TabPanel.js +4 -6
- package/dist/esm/components/Table.js +2 -5
- package/dist/esm/components/TableBody.js +2 -5
- package/dist/esm/components/TableCell.js +2 -5
- package/dist/esm/components/TableContainer.js +2 -5
- package/dist/esm/components/TableFooter.js +2 -5
- package/dist/esm/components/TableHead.js +2 -5
- package/dist/esm/components/TableRow.js +2 -5
- package/dist/esm/components/Tabs.js +4 -6
- package/dist/esm/components/Tag.js +8 -16
- package/dist/esm/components/Text.js +3 -5
- package/dist/esm/components/TextInput.js +36 -44
- package/dist/esm/components/ThemeProvider.js +8 -15
- package/dist/esm/components/TimeInput.js +64 -72
- package/dist/esm/components/Tooltip.js +5 -9
- package/package.json +3 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import
|
|
4
|
-
import { useState } from 'react';
|
|
3
|
+
import React, { useState } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import Box from '@mui/material/Box';
|
|
7
6
|
import Grid from '@mui/material/Grid';
|
|
@@ -109,115 +108,92 @@ function AvatarInput(_ref) {
|
|
|
109
108
|
isDragReject = _useDropzone.isDragReject,
|
|
110
109
|
fileRejections = _useDropzone.fileRejections;
|
|
111
110
|
var hasErrors = fileRejections.length > 0;
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
onClose: function onClose() {
|
|
199
|
-
return setOpen(false);
|
|
200
|
-
},
|
|
201
|
-
children: /* @__PURE__ */jsx("span", {
|
|
202
|
-
children: "\xA0"
|
|
203
|
-
})
|
|
204
|
-
}), /* @__PURE__ */jsx(ModalContent, {
|
|
205
|
-
children: /* @__PURE__ */jsx(AvatarCropDialog, _objectSpread2(_objectSpread2({
|
|
206
|
-
droppedFile: droppedFile
|
|
207
|
-
}, rest), {}, {
|
|
208
|
-
onSave: handleSave,
|
|
209
|
-
onDelete: handleDelete
|
|
210
|
-
}))
|
|
211
|
-
})]
|
|
212
|
-
}), /* @__PURE__ */jsx(Confirmation, {
|
|
213
|
-
open: confirmDelete,
|
|
214
|
-
onCancel: function onCancel() {
|
|
215
|
-
return setConfirmDelete(false);
|
|
216
|
-
},
|
|
217
|
-
onConfirm: handleDelete,
|
|
218
|
-
message: "Are you sure you want to remove the attached image?"
|
|
219
|
-
})]
|
|
220
|
-
});
|
|
111
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("div", {
|
|
112
|
+
style: {
|
|
113
|
+
position: "relative"
|
|
114
|
+
}
|
|
115
|
+
}, /* @__PURE__ */React.createElement(StyledRoot, _objectSpread2({
|
|
116
|
+
disabled: disabled,
|
|
117
|
+
edges: edges,
|
|
118
|
+
errors: hasErrors ? "yes" : ""
|
|
119
|
+
}, getRootProps()), isDragActive && /* @__PURE__ */React.createElement(StyledLinearProgress, {
|
|
120
|
+
isDragReject: isDragReject
|
|
121
|
+
}), loading && !hasErrors && /* @__PURE__ */React.createElement(StyledCircularProgress, null), /* @__PURE__ */React.createElement("input", _objectSpread2({}, getInputProps())), /* @__PURE__ */React.createElement(Grid, {
|
|
122
|
+
container: true,
|
|
123
|
+
spacing: 5,
|
|
124
|
+
alignItems: "center"
|
|
125
|
+
}, /* @__PURE__ */React.createElement(Grid, {
|
|
126
|
+
item: true,
|
|
127
|
+
xs: 12,
|
|
128
|
+
sm: 3,
|
|
129
|
+
md: 2,
|
|
130
|
+
style: {
|
|
131
|
+
textAlign: "center"
|
|
132
|
+
}
|
|
133
|
+
}, /* @__PURE__ */React.createElement(StyledAvatarIcon, null, function () {
|
|
134
|
+
if (isDragReject) {
|
|
135
|
+
return /* @__PURE__ */React.createElement(WarningIcon, null);
|
|
136
|
+
}
|
|
137
|
+
if (isDragAccept) {
|
|
138
|
+
return /* @__PURE__ */React.createElement(CheckCircleIcon, null);
|
|
139
|
+
}
|
|
140
|
+
if (savedImage || value || placeholder) {
|
|
141
|
+
return /* @__PURE__ */React.createElement(StyledAvatar, {
|
|
142
|
+
src: savedImage || value || placeholder
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (DropzoneIcon) {
|
|
146
|
+
return /* @__PURE__ */React.createElement(DropzoneIcon, null);
|
|
147
|
+
}
|
|
148
|
+
return /* @__PURE__ */React.createElement(PersonIcon, null);
|
|
149
|
+
}(), !hasSelection && /* @__PURE__ */React.createElement(StyledAddIcon, null, /* @__PURE__ */React.createElement(AddIcon, {
|
|
150
|
+
style: {
|
|
151
|
+
color: "inherit"
|
|
152
|
+
}
|
|
153
|
+
}))), /* @__PURE__ */React.createElement(Text, {
|
|
154
|
+
align: "center",
|
|
155
|
+
weight: "500",
|
|
156
|
+
color: "textPrimary",
|
|
157
|
+
noWrap: true,
|
|
158
|
+
gutterBottom: false
|
|
159
|
+
}, isDragReject ? "Error!" : dropzoneLabel)), /* @__PURE__ */React.createElement(Grid, {
|
|
160
|
+
item: true,
|
|
161
|
+
xs: 12,
|
|
162
|
+
sm: 8,
|
|
163
|
+
md: 9
|
|
164
|
+
}, /* @__PURE__ */React.createElement(Box, {
|
|
165
|
+
pl: isNotMobile ? 5 : 0
|
|
166
|
+
}, /* @__PURE__ */React.createElement(Text, {
|
|
167
|
+
align: isNotMobile ? "left" : "center",
|
|
168
|
+
weight: "500",
|
|
169
|
+
color: "textPrimary"
|
|
170
|
+
}, isDragReject ? "The selected file(s) will not be accepted" : dropzoneDescription))))), (savedImage || value) &&
|
|
171
|
+
// <ActionArea onClick={() => setConfirmDelete(true)}>
|
|
172
|
+
/* @__PURE__ */
|
|
173
|
+
React.createElement(StyledDeleteIcon, null, /* @__PURE__ */React.createElement(DeleteIcon, null))), droppedFile && /* @__PURE__ */React.createElement(Modal, {
|
|
174
|
+
open: open,
|
|
175
|
+
onClose: function onClose() {
|
|
176
|
+
return setOpen(false);
|
|
177
|
+
},
|
|
178
|
+
fullWidth: true,
|
|
179
|
+
maxWidth: "lg"
|
|
180
|
+
}, /* @__PURE__ */React.createElement(ModalHeader, {
|
|
181
|
+
onClose: function onClose() {
|
|
182
|
+
return setOpen(false);
|
|
183
|
+
}
|
|
184
|
+
}, /* @__PURE__ */React.createElement("span", null, "\xA0")), /* @__PURE__ */React.createElement(ModalContent, null, /* @__PURE__ */React.createElement(AvatarCropDialog, _objectSpread2(_objectSpread2({
|
|
185
|
+
droppedFile: droppedFile
|
|
186
|
+
}, rest), {}, {
|
|
187
|
+
onSave: handleSave,
|
|
188
|
+
onDelete: handleDelete
|
|
189
|
+
})))), /* @__PURE__ */React.createElement(Confirmation, {
|
|
190
|
+
open: confirmDelete,
|
|
191
|
+
onCancel: function onCancel() {
|
|
192
|
+
return setConfirmDelete(false);
|
|
193
|
+
},
|
|
194
|
+
onConfirm: handleDelete,
|
|
195
|
+
message: "Are you sure you want to remove the attached image?"
|
|
196
|
+
}));
|
|
221
197
|
}
|
|
222
198
|
AvatarInput.propTypes = {
|
|
223
199
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import
|
|
4
|
-
import 'react';
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import { StyledBadge } from './Badge.styled.js';
|
|
7
6
|
|
|
@@ -39,9 +38,7 @@ function Badge(_ref) {
|
|
|
39
38
|
showZero: showZero,
|
|
40
39
|
variant: variant
|
|
41
40
|
}, rest);
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
children: children
|
|
44
|
-
}));
|
|
41
|
+
return /* @__PURE__ */React.createElement(StyledBadge, _objectSpread2({}, props), children);
|
|
45
42
|
}
|
|
46
43
|
Badge.propTypes = {
|
|
47
44
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import { useRef, useState } from 'react';
|
|
3
|
+
import React, { useRef, useState } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import CancelIcon from '@mui/icons-material/Cancel';
|
|
7
6
|
import FormControl from './FormControl.js';
|
|
@@ -173,87 +172,81 @@ function BankAccountInput(_ref) {
|
|
|
173
172
|
setSuffix(values.suffix);
|
|
174
173
|
}
|
|
175
174
|
};
|
|
176
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */React.createElement(StyledWrapper, {
|
|
176
|
+
fullWidth: fullWidth
|
|
177
|
+
}, /* @__PURE__ */React.createElement(FormControl, {
|
|
177
178
|
fullWidth: fullWidth,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
children: /* @__PURE__ */jsx(IconButton, {
|
|
250
|
-
onClick: handleClear,
|
|
251
|
-
size: "small",
|
|
252
|
-
color: "inherit",
|
|
253
|
-
children: /* @__PURE__ */jsx(CancelIcon, {})
|
|
254
|
-
})
|
|
255
|
-
})]
|
|
256
|
-
});
|
|
179
|
+
disabled: disabled,
|
|
180
|
+
name: name,
|
|
181
|
+
required: required,
|
|
182
|
+
label: label,
|
|
183
|
+
hideLabel: hideLabel,
|
|
184
|
+
helperText: helperText,
|
|
185
|
+
helperTextPlacement: helperTextPlacement,
|
|
186
|
+
showError: showError,
|
|
187
|
+
errorMessage: errorMessage,
|
|
188
|
+
edges: edges
|
|
189
|
+
}, /* @__PURE__ */React.createElement("input", {
|
|
190
|
+
type: "hidden",
|
|
191
|
+
name: name,
|
|
192
|
+
value: "".concat(bank, " ").concat(branch, " ").concat(account, " ").concat(suffix)
|
|
193
|
+
}), /* @__PURE__ */React.createElement(StyledInputWrapper, {
|
|
194
|
+
disabled: disabled,
|
|
195
|
+
edges: edges,
|
|
196
|
+
focused: focused,
|
|
197
|
+
fullWidth: fullWidth,
|
|
198
|
+
required: required && valueStr.length < 15,
|
|
199
|
+
variant: variant
|
|
200
|
+
}, /* @__PURE__ */React.createElement(StyledInput, {
|
|
201
|
+
disabled: disabled,
|
|
202
|
+
id: "".concat(name, "_bank"),
|
|
203
|
+
fieldType: "bank",
|
|
204
|
+
placeholder: "Bank",
|
|
205
|
+
maxLength: "2",
|
|
206
|
+
ref: bankRef,
|
|
207
|
+
value: bank,
|
|
208
|
+
onChange: handleBankChange,
|
|
209
|
+
onFocus: handleFocus,
|
|
210
|
+
onBlur: handleBlur,
|
|
211
|
+
onPaste: handlePaste
|
|
212
|
+
}), /* @__PURE__ */React.createElement(StyledInput, {
|
|
213
|
+
disabled: disabled,
|
|
214
|
+
id: "".concat(name, "_branch"),
|
|
215
|
+
fieldType: "branch",
|
|
216
|
+
placeholder: "Branch",
|
|
217
|
+
maxLength: "4",
|
|
218
|
+
ref: branchRef,
|
|
219
|
+
value: branch,
|
|
220
|
+
onChange: handleBranchChange,
|
|
221
|
+
onFocus: handleFocus,
|
|
222
|
+
onBlur: handleBlur
|
|
223
|
+
}), /* @__PURE__ */React.createElement(StyledInput, {
|
|
224
|
+
disabled: disabled,
|
|
225
|
+
id: "".concat(name, "_account"),
|
|
226
|
+
fieldType: "account",
|
|
227
|
+
placeholder: "Account",
|
|
228
|
+
maxLength: "7",
|
|
229
|
+
ref: accountRef,
|
|
230
|
+
value: account,
|
|
231
|
+
onChange: handleAccountChange,
|
|
232
|
+
onFocus: handleFocus,
|
|
233
|
+
onBlur: handleBlur
|
|
234
|
+
}), /* @__PURE__ */React.createElement(StyledInput, {
|
|
235
|
+
disabled: disabled,
|
|
236
|
+
id: "".concat(name, "_suffix"),
|
|
237
|
+
fieldType: "suffix",
|
|
238
|
+
placeholder: "Suffix",
|
|
239
|
+
maxLength: "3",
|
|
240
|
+
ref: suffixRef,
|
|
241
|
+
value: suffix,
|
|
242
|
+
onChange: handleSuffixChange,
|
|
243
|
+
onFocus: handleFocus,
|
|
244
|
+
onBlur: handleBlur
|
|
245
|
+
}))), isFunction(onClear) && valueStr && /* @__PURE__ */React.createElement(StyledIcon, null, /* @__PURE__ */React.createElement(IconButton, {
|
|
246
|
+
onClick: handleClear,
|
|
247
|
+
size: "small",
|
|
248
|
+
color: "inherit"
|
|
249
|
+
}, /* @__PURE__ */React.createElement(CancelIcon, null))));
|
|
257
250
|
}
|
|
258
251
|
BankAccountInput.propTypes = {
|
|
259
252
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import
|
|
3
|
-
import 'react';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import { StyledBar } from './Bar.styled.js';
|
|
6
5
|
|
|
@@ -10,11 +9,10 @@ function Bar(_ref) {
|
|
|
10
9
|
color = _ref$color === void 0 ? "transparent" : _ref$color,
|
|
11
10
|
_ref$position = _ref.position,
|
|
12
11
|
position = _ref$position === void 0 ? "relative" : _ref$position;
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */React.createElement(StyledBar, {
|
|
14
13
|
color: color,
|
|
15
|
-
position: position
|
|
16
|
-
|
|
17
|
-
});
|
|
14
|
+
position: position
|
|
15
|
+
}, children);
|
|
18
16
|
}
|
|
19
17
|
Bar.propTypes = {
|
|
20
18
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
3
|
import StyledBaseModal from './BaseModal.styled.js';
|
|
5
4
|
import { objectDeepMerge as _objectDeepMerge } from '../utils/helpers/object.js';
|
|
6
5
|
|
|
@@ -39,10 +38,9 @@ function BaseModal(_ref) {
|
|
|
39
38
|
}, rest), {}, {
|
|
40
39
|
slotProps: _objectDeepMerge(defaultSlotProps, slotProps)
|
|
41
40
|
});
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
disableEscapeKeyDown: !escapePress
|
|
44
|
-
|
|
45
|
-
}));
|
|
41
|
+
return /* @__PURE__ */React.createElement(StyledBaseModal, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
42
|
+
disableEscapeKeyDown: !escapePress
|
|
43
|
+
}), children);
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
export { BaseModal as default };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import { useState, useEffect } from 'react';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import FormControl from './FormControl.js';
|
|
7
6
|
import FormFocus from './FormFocus.js';
|
|
@@ -63,7 +62,7 @@ function BooleanInput(_ref) {
|
|
|
63
62
|
e.preventDefault();
|
|
64
63
|
onChange(parseValue(bool));
|
|
65
64
|
};
|
|
66
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */React.createElement(FormControl, {
|
|
67
66
|
fullWidth: fullWidth,
|
|
68
67
|
label: label,
|
|
69
68
|
name: name,
|
|
@@ -73,48 +72,42 @@ function BooleanInput(_ref) {
|
|
|
73
72
|
required: required,
|
|
74
73
|
showError: showError,
|
|
75
74
|
errorMessage: errorMessage,
|
|
76
|
-
edges: edges
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
error: hasError ? "yes" : "no",
|
|
113
|
-
children: falseLabel
|
|
114
|
-
})]
|
|
115
|
-
})]
|
|
116
|
-
})
|
|
117
|
-
});
|
|
75
|
+
edges: edges
|
|
76
|
+
}, /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(FormFocus, {
|
|
77
|
+
name: name
|
|
78
|
+
}), /* @__PURE__ */React.createElement(StyledButtonGroup, {
|
|
79
|
+
edges: edges
|
|
80
|
+
}, /* @__PURE__ */React.createElement(StyledButton, {
|
|
81
|
+
variant: indeterminate || !checked ? "outlined" : "contained",
|
|
82
|
+
onClick: function onClick(e) {
|
|
83
|
+
return handleChange(e, true);
|
|
84
|
+
},
|
|
85
|
+
disableElevation: true,
|
|
86
|
+
disableRipple: disableRipple,
|
|
87
|
+
disableTouchRipple: disableRipple,
|
|
88
|
+
disableFocusRipple: disableRipple,
|
|
89
|
+
type: "button",
|
|
90
|
+
indeterminate: indeterminate ? "yes" : "no",
|
|
91
|
+
checked: checked,
|
|
92
|
+
required: required,
|
|
93
|
+
selected: !indeterminate && checked,
|
|
94
|
+
error: hasError ? "yes" : "no"
|
|
95
|
+
}, trueLabel), /* @__PURE__ */React.createElement(StyledButton, {
|
|
96
|
+
variant: indeterminate || checked ? "outlined" : "contained",
|
|
97
|
+
onClick: function onClick(e) {
|
|
98
|
+
return handleChange(e, false);
|
|
99
|
+
},
|
|
100
|
+
disableElevation: true,
|
|
101
|
+
disableRipple: disableRipple,
|
|
102
|
+
disableTouchRipple: disableRipple,
|
|
103
|
+
disableFocusRipple: disableRipple,
|
|
104
|
+
type: "button",
|
|
105
|
+
indeterminate: indeterminate ? "yes" : "no",
|
|
106
|
+
checked: checked,
|
|
107
|
+
required: required,
|
|
108
|
+
selected: !indeterminate && !checked,
|
|
109
|
+
error: hasError ? "yes" : "no"
|
|
110
|
+
}, falseLabel))));
|
|
118
111
|
}
|
|
119
112
|
BooleanInput.propTypes = {
|
|
120
113
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import
|
|
4
|
-
import 'react';
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import Grid from './Grid.js';
|
|
7
6
|
import { StyledGridBox } from './Grid.styled.js';
|
|
@@ -15,14 +14,13 @@ function BorderedGrid(_ref) {
|
|
|
15
14
|
_ref$borderStyle = _ref.borderStyle,
|
|
16
15
|
borderStyle = _ref$borderStyle === void 0 ? "solid" : _ref$borderStyle,
|
|
17
16
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */React.createElement(StyledGridBox, {
|
|
19
18
|
error: error,
|
|
20
|
-
borderStyle: borderStyle
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
19
|
+
borderStyle: borderStyle
|
|
20
|
+
}, /* @__PURE__ */React.createElement(Grid, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
21
|
+
spacing: spacing,
|
|
22
|
+
marginFix: true
|
|
23
|
+
})));
|
|
26
24
|
}
|
|
27
25
|
BorderedGrid.propTypes = {
|
|
28
26
|
error: PropTypes.bool,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import { forwardRef } from 'react';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import Box$2 from '@mui/material/Box';
|
|
7
6
|
|
|
@@ -26,15 +25,13 @@ function Box(_ref, ref) {
|
|
|
26
25
|
alignItems: align,
|
|
27
26
|
justifyContent: justify
|
|
28
27
|
});
|
|
29
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */React.createElement(Box$2, _objectSpread2({
|
|
30
29
|
component: as,
|
|
31
30
|
ref: ref,
|
|
32
31
|
sx: _objectSpread2(_objectSpread2({
|
|
33
32
|
display: display
|
|
34
33
|
}, flexProps), sx)
|
|
35
|
-
}, rest),
|
|
36
|
-
children: children
|
|
37
|
-
}));
|
|
34
|
+
}, rest), children);
|
|
38
35
|
}
|
|
39
36
|
Box.propTypes = {
|
|
40
37
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
5
4
|
import StyledButton from './Button.styled.js';
|
|
6
5
|
|
|
@@ -45,16 +44,14 @@ function Button(_ref) {
|
|
|
45
44
|
disableFocusRipple: true,
|
|
46
45
|
component: as,
|
|
47
46
|
fullWidth: fill,
|
|
48
|
-
loadingIndicator: /* @__PURE__ */
|
|
47
|
+
loadingIndicator: /* @__PURE__ */React.createElement(CircularProgress, {
|
|
49
48
|
size: loadingIndicatorSizes[size],
|
|
50
49
|
color: "inherit"
|
|
51
50
|
})
|
|
52
51
|
}, others), loading === true && {
|
|
53
52
|
loading: !disabled && loading
|
|
54
53
|
});
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
children: children
|
|
57
|
-
}));
|
|
54
|
+
return /* @__PURE__ */React.createElement(StyledButton, _objectSpread2({}, rest), children);
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
export { Button as default };
|