@tenancy.nz/ui 1.0.4 → 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 +1 -1
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
7
|
-
var
|
|
8
|
-
var React = require('react');
|
|
7
|
+
var React$1 = require('react');
|
|
9
8
|
var InputAdornment = require('@mui/material/InputAdornment');
|
|
10
9
|
var FormControl = require('./FormControl.cjs');
|
|
11
10
|
var FormLabel = require('./FormLabel.cjs');
|
|
@@ -17,7 +16,7 @@ var _excluded = ["autoComplete", "autoFocus", "color", "disabled", "edges", "end
|
|
|
17
16
|
var typeMap = {
|
|
18
17
|
number: "text"
|
|
19
18
|
};
|
|
20
|
-
var TextInput = /*#__PURE__*/React.forwardRef(function TextInput2(_ref, ref) {
|
|
19
|
+
var TextInput = /*#__PURE__*/React$1.forwardRef(function TextInput2(_ref, ref) {
|
|
21
20
|
var _ref$autoComplete = _ref.autoComplete,
|
|
22
21
|
autoComplete = _ref$autoComplete === void 0 ? "off" : _ref$autoComplete,
|
|
23
22
|
_ref$autoFocus = _ref.autoFocus,
|
|
@@ -70,7 +69,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput2(_ref, ref) {
|
|
|
70
69
|
_ref$type = _ref.type,
|
|
71
70
|
type = _ref$type === void 0 ? "text" : _ref$type,
|
|
72
71
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
73
|
-
var _useState = React.useState(rest.value ? rest.value.length : 0),
|
|
72
|
+
var _useState = React$1.useState(rest.value ? rest.value.length : 0),
|
|
74
73
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
75
74
|
noOfChars = _useState2[0],
|
|
76
75
|
setNoOfChars = _useState2[1];
|
|
@@ -92,11 +91,10 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput2(_ref, ref) {
|
|
|
92
91
|
autoFocus: autoFocus,
|
|
93
92
|
color: showError ? "error" : color,
|
|
94
93
|
disabled: disabled,
|
|
95
|
-
endAdornment: endAdornment && /* @__PURE__ */
|
|
94
|
+
endAdornment: endAdornment && /* @__PURE__ */React.createElement(InputAdornment, {
|
|
96
95
|
position: "end",
|
|
97
|
-
variant: "outlined"
|
|
98
|
-
|
|
99
|
-
}),
|
|
96
|
+
variant: "outlined"
|
|
97
|
+
}, endAdornment),
|
|
100
98
|
edges: edges,
|
|
101
99
|
fullWidth: fullWidth,
|
|
102
100
|
id: id || name,
|
|
@@ -108,11 +106,10 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput2(_ref, ref) {
|
|
|
108
106
|
$error: showError,
|
|
109
107
|
readOnly: readOnly,
|
|
110
108
|
size: size,
|
|
111
|
-
startAdornment: startAdornment && /* @__PURE__ */
|
|
109
|
+
startAdornment: startAdornment && /* @__PURE__ */React.createElement(InputAdornment, {
|
|
112
110
|
position: "start",
|
|
113
|
-
variant: "outlined"
|
|
114
|
-
|
|
115
|
-
}),
|
|
111
|
+
variant: "outlined"
|
|
112
|
+
}, startAdornment),
|
|
116
113
|
type: typeMap[type] || type
|
|
117
114
|
}, multiline && textareaProps), rest), {}, {
|
|
118
115
|
margin: "none"
|
|
@@ -121,36 +118,32 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput2(_ref, ref) {
|
|
|
121
118
|
var value = event.target.value;
|
|
122
119
|
setNoOfChars(value.length);
|
|
123
120
|
};
|
|
124
|
-
var controlLabel = showCounter ? /* @__PURE__ */
|
|
121
|
+
var controlLabel = showCounter ? /* @__PURE__ */React.createElement(Box.default, {
|
|
125
122
|
display: "flex",
|
|
126
|
-
mb: "8px"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (size === "medium") {
|
|
145
|
-
return "".concat(theme.typography.fontSize, "px");
|
|
146
|
-
}
|
|
147
|
-
return null;
|
|
123
|
+
mb: "8px"
|
|
124
|
+
}, /* @__PURE__ */React.createElement(Box.default, {
|
|
125
|
+
as: "span"
|
|
126
|
+
}, /* @__PURE__ */React.createElement(FormLabel.default, {
|
|
127
|
+
disabled: disabled,
|
|
128
|
+
htmlFor: id,
|
|
129
|
+
required: required,
|
|
130
|
+
margin: "none",
|
|
131
|
+
size: size
|
|
132
|
+
}, label)), /* @__PURE__ */React.createElement(Box.default, {
|
|
133
|
+
as: "span",
|
|
134
|
+
sx: {
|
|
135
|
+
color: disabled ? "grey.400" : "grey.600",
|
|
136
|
+
flexShrink: 0,
|
|
137
|
+
ml: "auto",
|
|
138
|
+
fontSize: function fontSize(theme) {
|
|
139
|
+
if (size === "medium") {
|
|
140
|
+
return "".concat(theme.typography.fontSize, "px");
|
|
148
141
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
}) : label;
|
|
153
|
-
return /* @__PURE__ */
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}, noOfChars, maxLength ? " / ".concat(maxLength) : "")) : label;
|
|
146
|
+
return /* @__PURE__ */React.createElement(FormControl.default, {
|
|
154
147
|
color: color,
|
|
155
148
|
id: props.id,
|
|
156
149
|
label: controlLabel,
|
|
@@ -161,13 +154,12 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput2(_ref, ref) {
|
|
|
161
154
|
disabled: disabled,
|
|
162
155
|
required: required,
|
|
163
156
|
size: size,
|
|
164
|
-
ref: ref
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
});
|
|
157
|
+
ref: ref
|
|
158
|
+
}, /* @__PURE__ */React.createElement(TextInput_styled.default, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, props), {}, {
|
|
159
|
+
error: true
|
|
160
|
+
}, showCounter && {
|
|
161
|
+
onKeyUp: handleChange
|
|
162
|
+
})));
|
|
171
163
|
});
|
|
172
164
|
|
|
173
165
|
exports.default = TextInput;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
7
|
-
var
|
|
8
|
-
require('react');
|
|
7
|
+
var React = require('react');
|
|
9
8
|
var PropTypes = require('prop-types');
|
|
10
9
|
var react = require('@emotion/react');
|
|
11
10
|
var styled = require('styled-components');
|
|
@@ -24,19 +23,13 @@ function ThemeProvider(_ref) {
|
|
|
24
23
|
cssVarPrefix: "tn"
|
|
25
24
|
}
|
|
26
25
|
}));
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, rest), {}, {
|
|
35
|
-
children: [/* @__PURE__ */jsxRuntime.jsx(CssBaseline, {}), children]
|
|
36
|
-
}))
|
|
37
|
-
})
|
|
38
|
-
})
|
|
39
|
-
});
|
|
26
|
+
return /* @__PURE__ */React.createElement(styles.StyledEngineProvider, null, /* @__PURE__ */React.createElement(styled.ThemeProvider, {
|
|
27
|
+
theme: mergedTheme
|
|
28
|
+
}, /* @__PURE__ */React.createElement(react.ThemeProvider, {
|
|
29
|
+
theme: mergedTheme
|
|
30
|
+
}, /* @__PURE__ */React.createElement(styles.ThemeProvider, _rollupPluginBabelHelpers.objectSpread2({
|
|
31
|
+
theme: mergedTheme
|
|
32
|
+
}, rest), /* @__PURE__ */React.createElement(CssBaseline, null), children))));
|
|
40
33
|
}
|
|
41
34
|
ThemeProvider.propTypes = {
|
|
42
35
|
theme: PropTypes.shape({
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
7
|
var React = require('react');
|
|
9
8
|
var PropTypes = require('prop-types');
|
|
10
9
|
var FormControl = require('./FormControl.cjs');
|
|
@@ -82,7 +81,7 @@ function TimeInput(_ref) {
|
|
|
82
81
|
setValues(newValues);
|
|
83
82
|
onChange(evt);
|
|
84
83
|
};
|
|
85
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */React.createElement(FormControl.default, {
|
|
86
85
|
fullWidth: fullWidth,
|
|
87
86
|
name: name,
|
|
88
87
|
label: label,
|
|
@@ -92,75 +91,68 @@ function TimeInput(_ref) {
|
|
|
92
91
|
required: required,
|
|
93
92
|
showError: showError,
|
|
94
93
|
errorMessage: errorMessage,
|
|
95
|
-
edges: "normal"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
onChange: function onChange(e) {
|
|
158
|
-
handleChange(e, "meridian");
|
|
159
|
-
}
|
|
160
|
-
})
|
|
161
|
-
})]
|
|
162
|
-
})]
|
|
163
|
-
});
|
|
94
|
+
edges: "normal"
|
|
95
|
+
}, /* @__PURE__ */React.createElement("input", {
|
|
96
|
+
defaultValue: rest.defaultValue || value,
|
|
97
|
+
name: name,
|
|
98
|
+
ref: inputRef,
|
|
99
|
+
style: {
|
|
100
|
+
height: 0,
|
|
101
|
+
width: 0,
|
|
102
|
+
appearance: "none",
|
|
103
|
+
border: "none",
|
|
104
|
+
outline: "none",
|
|
105
|
+
margin: 0,
|
|
106
|
+
padding: 0
|
|
107
|
+
}
|
|
108
|
+
}), /* @__PURE__ */React.createElement(TimeInput_styled.StyledContainer, {
|
|
109
|
+
size: size
|
|
110
|
+
}, /* @__PURE__ */React.createElement(TimeInput_styled.StyledSelect, {
|
|
111
|
+
required: required,
|
|
112
|
+
size: size,
|
|
113
|
+
value: inputRef.current ? inputRef.current.value : value
|
|
114
|
+
}, /* @__PURE__ */React.createElement(Select.default, {
|
|
115
|
+
disabled: disabled,
|
|
116
|
+
name: "".concat(name, "_hours"),
|
|
117
|
+
placeholder: "HH",
|
|
118
|
+
required: required,
|
|
119
|
+
native: true,
|
|
120
|
+
options: hourOptions,
|
|
121
|
+
value: values.hour,
|
|
122
|
+
onChange: function onChange(e) {
|
|
123
|
+
handleChange(e, "hour");
|
|
124
|
+
}
|
|
125
|
+
})), /* @__PURE__ */React.createElement(TimeInput_styled.StyledSpacer, null, ":"), /* @__PURE__ */React.createElement(TimeInput_styled.StyledSelect, {
|
|
126
|
+
required: required,
|
|
127
|
+
size: size,
|
|
128
|
+
value: inputRef.current ? inputRef.current.value : value
|
|
129
|
+
}, /* @__PURE__ */React.createElement(Select.default, {
|
|
130
|
+
disabled: disabled,
|
|
131
|
+
name: "".concat(name, "_minutes"),
|
|
132
|
+
placeholder: "MM",
|
|
133
|
+
required: required,
|
|
134
|
+
native: true,
|
|
135
|
+
options: minuteOptions,
|
|
136
|
+
value: values.minute,
|
|
137
|
+
onChange: function onChange(e) {
|
|
138
|
+
handleChange(e, "minute");
|
|
139
|
+
}
|
|
140
|
+
})), /* @__PURE__ */React.createElement(TimeInput_styled.StyledSpacer, null), /* @__PURE__ */React.createElement(TimeInput_styled.StyledSelect, {
|
|
141
|
+
required: required,
|
|
142
|
+
size: size,
|
|
143
|
+
value: inputRef.current ? inputRef.current.value : value
|
|
144
|
+
}, /* @__PURE__ */React.createElement(Select.default, {
|
|
145
|
+
disabled: disabled,
|
|
146
|
+
name: "".concat(name, "_meridian"),
|
|
147
|
+
placeholder: "AM",
|
|
148
|
+
required: required,
|
|
149
|
+
native: true,
|
|
150
|
+
options: meridianOptions,
|
|
151
|
+
value: values.meridian,
|
|
152
|
+
onChange: function onChange(e) {
|
|
153
|
+
handleChange(e, "meridian");
|
|
154
|
+
}
|
|
155
|
+
}))));
|
|
164
156
|
}
|
|
165
157
|
TimeInput.propTypes = {
|
|
166
158
|
/**
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
7
|
var Box = require('./Box.cjs');
|
|
9
8
|
var Tooltip_styled = require('./Tooltip.styled.cjs');
|
|
10
9
|
|
|
@@ -44,17 +43,14 @@ function Tooltip(_ref) {
|
|
|
44
43
|
leaveTouchDelay: leaveTouchDelay,
|
|
45
44
|
placement: placement
|
|
46
45
|
}, others);
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */React.createElement(Tooltip_styled.default, _rollupPluginBabelHelpers.objectSpread2({
|
|
48
47
|
classes: {
|
|
49
48
|
popper: className
|
|
50
49
|
}
|
|
51
|
-
}, rest),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
children: children
|
|
56
|
-
})
|
|
57
|
-
}));
|
|
50
|
+
}, rest), /* @__PURE__ */React.createElement(Box.default, {
|
|
51
|
+
display: "inline-flex",
|
|
52
|
+
sx: boxProps
|
|
53
|
+
}, children));
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
exports.default = Tooltip;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
3
|
import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined';
|
|
5
4
|
import ErrorOutlineOutlinedIcon from '@mui/icons-material/ErrorOutlineOutlined';
|
|
6
5
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
@@ -12,22 +11,22 @@ var variantMap = {
|
|
|
12
11
|
contained: "filled"
|
|
13
12
|
};
|
|
14
13
|
var icons = {
|
|
15
|
-
info: /* @__PURE__ */
|
|
14
|
+
info: /* @__PURE__ */React.createElement(InfoOutlinedIcon, {
|
|
16
15
|
sx: {
|
|
17
16
|
fontSize: 24
|
|
18
17
|
}
|
|
19
18
|
}),
|
|
20
|
-
success: /* @__PURE__ */
|
|
19
|
+
success: /* @__PURE__ */React.createElement(CheckCircleOutlineOutlinedIcon, {
|
|
21
20
|
sx: {
|
|
22
21
|
fontSize: 24
|
|
23
22
|
}
|
|
24
23
|
}),
|
|
25
|
-
error: /* @__PURE__ */
|
|
24
|
+
error: /* @__PURE__ */React.createElement(ErrorOutlineOutlinedIcon, {
|
|
26
25
|
sx: {
|
|
27
26
|
fontSize: 24
|
|
28
27
|
}
|
|
29
28
|
}),
|
|
30
|
-
warning: /* @__PURE__ */
|
|
29
|
+
warning: /* @__PURE__ */React.createElement(WarningAmberOutlinedIcon, {
|
|
31
30
|
sx: {
|
|
32
31
|
fontSize: 24
|
|
33
32
|
}
|
|
@@ -44,7 +43,7 @@ function Alert(_ref) {
|
|
|
44
43
|
_ref$variant = _ref.variant,
|
|
45
44
|
variant = _ref$variant === void 0 ? "standard" : _ref$variant,
|
|
46
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */React.createElement(StyledAlert, _objectSpread2(_objectSpread2({
|
|
48
47
|
color: color,
|
|
49
48
|
variant: variantMap[variant] || variant,
|
|
50
49
|
severity: color,
|
|
@@ -52,11 +51,7 @@ function Alert(_ref) {
|
|
|
52
51
|
closeText: "undo"
|
|
53
52
|
}, rest), (!icon || !color || !icons[color]) && {
|
|
54
53
|
icon: false
|
|
55
|
-
}),
|
|
56
|
-
children: [title && /* @__PURE__ */jsx(StyledAlertTitle, {
|
|
57
|
-
children: title
|
|
58
|
-
}), children]
|
|
59
|
-
}));
|
|
54
|
+
}), title && /* @__PURE__ */React.createElement(StyledAlertTitle, null, title), children);
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
export { Alert as default };
|
|
@@ -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 KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
7
6
|
import FormControl from './FormControl.js';
|
|
@@ -60,7 +59,7 @@ function Autocomplete(_ref) {
|
|
|
60
59
|
}
|
|
61
60
|
onChange.apply(void 0, [event, val].concat(extras));
|
|
62
61
|
};
|
|
63
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */React.createElement(FormControl, {
|
|
64
63
|
name: name,
|
|
65
64
|
fullWidth: fullWidth,
|
|
66
65
|
label: label,
|
|
@@ -71,38 +70,37 @@ function Autocomplete(_ref) {
|
|
|
71
70
|
showError: showError,
|
|
72
71
|
errorMessage: errorMessage,
|
|
73
72
|
hideLabel: hideLabel,
|
|
74
|
-
edges: edges
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
});
|
|
73
|
+
edges: edges
|
|
74
|
+
}, /* @__PURE__ */React.createElement(StyledAutocomplete, _objectSpread2({
|
|
75
|
+
disabled: disabled,
|
|
76
|
+
iconrotation: disableIconRotation ? "no" : "yes",
|
|
77
|
+
popupIcon: popupIcon === void 0 ? /* @__PURE__ */React.createElement(KeyboardArrowDownIcon, null) : popupIcon,
|
|
78
|
+
renderInput: function renderInput(_ref2) {
|
|
79
|
+
var inputProps = _ref2.inputProps,
|
|
80
|
+
InputProps = _ref2.InputProps,
|
|
81
|
+
params = _objectWithoutProperties(_ref2, _excluded2);
|
|
82
|
+
return /* @__PURE__ */React.createElement(TextInput, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
83
|
+
disabled: disabled,
|
|
84
|
+
name: name,
|
|
85
|
+
variant: variant,
|
|
86
|
+
size: size,
|
|
87
|
+
edges: edges,
|
|
88
|
+
required: required,
|
|
89
|
+
value: selectedValue,
|
|
90
|
+
placeholder: placeholder,
|
|
91
|
+
inputProps: _objectSpread2(_objectSpread2({
|
|
92
|
+
autoComplete: "off"
|
|
93
|
+
}, textInputAttrs), inputProps),
|
|
94
|
+
slotProps: {
|
|
95
|
+
input: _objectSpread2(_objectSpread2({}, TextInputProps), InputProps)
|
|
96
|
+
},
|
|
97
|
+
showError: showError,
|
|
98
|
+
message: errorMessage,
|
|
99
|
+
ref: InputProps.ref
|
|
100
|
+
}));
|
|
101
|
+
},
|
|
102
|
+
onChange: handleChange
|
|
103
|
+
}, rest)));
|
|
106
104
|
}
|
|
107
105
|
Autocomplete.propTypes = {
|
|
108
106
|
/**
|
|
@@ -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 { StyledAvatar } from './Avatar.styled.js';
|
|
7
6
|
|
|
@@ -24,9 +23,7 @@ function Avatar(_ref) {
|
|
|
24
23
|
srcSet: srcSet,
|
|
25
24
|
variant: variant
|
|
26
25
|
}, rest);
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
children: children
|
|
29
|
-
}));
|
|
26
|
+
return /* @__PURE__ */React.createElement(StyledAvatar, _objectSpread2({}, props), children);
|
|
30
27
|
}
|
|
31
28
|
Avatar.propTypes = {
|
|
32
29
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { slicedToArray as _slicedToArray } 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 useMediaQuery from '@mui/material/useMediaQuery';
|
|
7
6
|
import ReactCrop from 'react-image-crop';
|
|
@@ -125,53 +124,46 @@ function AvatarCropDialog(_ref) {
|
|
|
125
124
|
}
|
|
126
125
|
return false;
|
|
127
126
|
};
|
|
128
|
-
return /* @__PURE__ */
|
|
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
|
-
onCancel: function onCancel() {
|
|
169
|
-
return setConfirmDelete(false);
|
|
170
|
-
},
|
|
171
|
-
onConfirm: handleCancel,
|
|
172
|
-
message: "Are you sure you want to remove the attached image?"
|
|
173
|
-
})]
|
|
174
|
-
});
|
|
127
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(FormControl, {
|
|
128
|
+
key: "form-control",
|
|
129
|
+
name: "avatar-crop-editor",
|
|
130
|
+
fullWidth: true,
|
|
131
|
+
label: label,
|
|
132
|
+
helperText: helperText,
|
|
133
|
+
showError: showError,
|
|
134
|
+
errorMessage: errorMessage
|
|
135
|
+
}, /* @__PURE__ */React.createElement(StyledEditor, {
|
|
136
|
+
showError: showError
|
|
137
|
+
}, /* @__PURE__ */React.createElement(ReactCrop, {
|
|
138
|
+
src: droppedFile,
|
|
139
|
+
crop: crop,
|
|
140
|
+
style: {
|
|
141
|
+
width: editorWidth,
|
|
142
|
+
maxHeight: window.innerHeight * 0.7
|
|
143
|
+
},
|
|
144
|
+
circularCrop: true,
|
|
145
|
+
onChange: handleCropChange,
|
|
146
|
+
onImageLoaded: handleImageLoaded,
|
|
147
|
+
keepSelection: true
|
|
148
|
+
}))), /* @__PURE__ */React.createElement(ModalActions, null, /* @__PURE__ */React.createElement(Button, {
|
|
149
|
+
onClick: handleCancel,
|
|
150
|
+
variant: "outlined",
|
|
151
|
+
loading: cancelling,
|
|
152
|
+
color: "primaryAlt",
|
|
153
|
+
fullWidth: !isNotMobile
|
|
154
|
+
}, "Cancel"), /* @__PURE__ */React.createElement(Button, {
|
|
155
|
+
onClick: handleImageSave,
|
|
156
|
+
loading: saving,
|
|
157
|
+
color: "primaryAlt",
|
|
158
|
+
fullWidth: !isNotMobile
|
|
159
|
+
}, "Save")), /* @__PURE__ */React.createElement(Confirmation, {
|
|
160
|
+
open: confirmDelete,
|
|
161
|
+
onCancel: function onCancel() {
|
|
162
|
+
return setConfirmDelete(false);
|
|
163
|
+
},
|
|
164
|
+
onConfirm: handleCancel,
|
|
165
|
+
message: "Are you sure you want to remove the attached image?"
|
|
166
|
+
}));
|
|
175
167
|
}
|
|
176
168
|
AvatarCropDialog.propTypes = {
|
|
177
169
|
/**
|