@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 { 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 useMediaQuery from '@mui/material/useMediaQuery';
|
|
7
6
|
import Box from './Box.js';
|
|
@@ -25,43 +24,35 @@ function CroppedImageInputActions(_ref) {
|
|
|
25
24
|
return (
|
|
26
25
|
// <Animate key="edit-controls">
|
|
27
26
|
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
paddingTop: "1.25rem"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
disabled: disabled,
|
|
58
|
-
fullWidth: !isNotMobile
|
|
59
|
-
}, saveButtonProps), {}, {
|
|
60
|
-
children: saveButtonProps.text || "Save"
|
|
61
|
-
}))
|
|
62
|
-
})]
|
|
63
|
-
})
|
|
64
|
-
})
|
|
27
|
+
React.createElement(Box, {
|
|
28
|
+
paddingTop: "1.25rem"
|
|
29
|
+
}, /* @__PURE__ */React.createElement(Grid, {
|
|
30
|
+
container: true,
|
|
31
|
+
justifyContent: "flex-end",
|
|
32
|
+
direction: isNotMobile ? "row" : "column-reverse",
|
|
33
|
+
spacing: 5
|
|
34
|
+
}, /* @__PURE__ */React.createElement(Grid, {
|
|
35
|
+
item: true
|
|
36
|
+
}, /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
37
|
+
loading: true,
|
|
38
|
+
color: "primaryAlt",
|
|
39
|
+
variant: "outlined",
|
|
40
|
+
size: "large",
|
|
41
|
+
onClick: handleCancel,
|
|
42
|
+
pending: cancelling,
|
|
43
|
+
disabled: disabled,
|
|
44
|
+
fullWidth: !isNotMobile
|
|
45
|
+
}, cancelButtonProps), cancelButtonProps.text || "Cancel")), /* @__PURE__ */React.createElement(Grid, {
|
|
46
|
+
item: true
|
|
47
|
+
}, /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
48
|
+
loading: true,
|
|
49
|
+
color: "primary",
|
|
50
|
+
size: "large",
|
|
51
|
+
onClick: handleImageSave,
|
|
52
|
+
pending: saving,
|
|
53
|
+
disabled: disabled,
|
|
54
|
+
fullWidth: !isNotMobile
|
|
55
|
+
}, saveButtonProps), saveButtonProps.text || "Save"))))
|
|
65
56
|
);
|
|
66
57
|
}
|
|
67
58
|
CroppedImageInputActions.propTypes = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import Grid from '@mui/material/Grid';
|
|
7
6
|
import FormControl from './FormControl.js';
|
|
@@ -73,7 +72,7 @@ function DateInput(_ref) {
|
|
|
73
72
|
setMaxDays(31);
|
|
74
73
|
}
|
|
75
74
|
}, [month, year]);
|
|
76
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */React.createElement(FormControl, {
|
|
77
76
|
fullWidth: fullWidth,
|
|
78
77
|
name: name,
|
|
79
78
|
label: label,
|
|
@@ -83,83 +82,76 @@ function DateInput(_ref) {
|
|
|
83
82
|
required: required,
|
|
84
83
|
showError: showError,
|
|
85
84
|
errorMessage: errorMessage,
|
|
86
|
-
edges: edges
|
|
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
|
-
|
|
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
|
-
label: "Year",
|
|
157
|
-
reverse: true,
|
|
158
|
-
hideLabel: true
|
|
159
|
-
})
|
|
160
|
-
})]
|
|
161
|
-
})]
|
|
162
|
-
});
|
|
85
|
+
edges: edges
|
|
86
|
+
}, /* @__PURE__ */React.createElement("input", {
|
|
87
|
+
name: name,
|
|
88
|
+
style: {
|
|
89
|
+
height: 0,
|
|
90
|
+
width: 0,
|
|
91
|
+
appearance: "none",
|
|
92
|
+
border: "none",
|
|
93
|
+
outline: "none",
|
|
94
|
+
margin: 0,
|
|
95
|
+
padding: 0
|
|
96
|
+
}
|
|
97
|
+
}), /* @__PURE__ */React.createElement(Grid, {
|
|
98
|
+
container: true,
|
|
99
|
+
spacing: 2,
|
|
100
|
+
style: {
|
|
101
|
+
flexWrap: "nowrap"
|
|
102
|
+
},
|
|
103
|
+
alignItems: "center"
|
|
104
|
+
}, /* @__PURE__ */React.createElement(StyledDay, {
|
|
105
|
+
item: true
|
|
106
|
+
}, /* @__PURE__ */React.createElement(DateNumberInput, {
|
|
107
|
+
disabled: disabled,
|
|
108
|
+
min: 1,
|
|
109
|
+
max: maxDays,
|
|
110
|
+
placeholder: "DD",
|
|
111
|
+
leadingZero: true,
|
|
112
|
+
onChange: handleDayChange,
|
|
113
|
+
value: day,
|
|
114
|
+
name: "".concat(name, "_day"),
|
|
115
|
+
inputRef: dayInput,
|
|
116
|
+
required: required,
|
|
117
|
+
label: "Day",
|
|
118
|
+
hideLabel: true
|
|
119
|
+
})), /* @__PURE__ */React.createElement(StyledSlash, {
|
|
120
|
+
item: true
|
|
121
|
+
}, "/"), /* @__PURE__ */React.createElement(StyledMonth, {
|
|
122
|
+
item: true
|
|
123
|
+
}, /* @__PURE__ */React.createElement(DateNumberInput, {
|
|
124
|
+
disabled: disabled,
|
|
125
|
+
min: 1,
|
|
126
|
+
max: 12,
|
|
127
|
+
placeholder: "MM",
|
|
128
|
+
leadingZero: true,
|
|
129
|
+
onChange: handleMonthChange,
|
|
130
|
+
value: month,
|
|
131
|
+
name: "".concat(name, "_month"),
|
|
132
|
+
inputRef: monthInput,
|
|
133
|
+
required: required,
|
|
134
|
+
label: "Month",
|
|
135
|
+
hideLabel: true
|
|
136
|
+
})), /* @__PURE__ */React.createElement(StyledSlash, {
|
|
137
|
+
item: true
|
|
138
|
+
}, "/"), /* @__PURE__ */React.createElement(StyledYear, {
|
|
139
|
+
item: true
|
|
140
|
+
}, /* @__PURE__ */React.createElement(DateNumberInput, {
|
|
141
|
+
disabled: disabled,
|
|
142
|
+
min: parseInt(minYear, 10),
|
|
143
|
+
max: parseInt(maxYear, 10),
|
|
144
|
+
placeholder: "YYYY",
|
|
145
|
+
leadingZero: false,
|
|
146
|
+
onChange: handleYearChange,
|
|
147
|
+
value: value.year,
|
|
148
|
+
name: "".concat(name, "_year"),
|
|
149
|
+
inputRef: yearInput,
|
|
150
|
+
required: required,
|
|
151
|
+
label: "Year",
|
|
152
|
+
reverse: true,
|
|
153
|
+
hideLabel: true
|
|
154
|
+
}))));
|
|
163
155
|
}
|
|
164
156
|
DateInput.propTypes = {
|
|
165
157
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, toConsumableArray as _toConsumableArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import {
|
|
4
|
-
import { useState, useEffect, useMemo } from 'react';
|
|
3
|
+
import React, { useState, useEffect, useMemo } from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import { useAnimation } from 'framer-motion';
|
|
7
6
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
@@ -122,57 +121,56 @@ function DateNumberInput(_ref) {
|
|
|
122
121
|
var autoCompleteDefault = Object.values(options).filter(function (option) {
|
|
123
122
|
return option.value === value;
|
|
124
123
|
})[0];
|
|
125
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */React.createElement(StyledWrapper, {
|
|
126
125
|
animate: controls,
|
|
127
|
-
error: error
|
|
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
|
-
});
|
|
126
|
+
error: error
|
|
127
|
+
}, isNotMobile ? /* @__PURE__ */React.createElement(Autocomplete, _objectSpread2({
|
|
128
|
+
fullWidth: true,
|
|
129
|
+
autoHighlight: true,
|
|
130
|
+
autoSelect: true,
|
|
131
|
+
blurOnSelect: true,
|
|
132
|
+
value: selected || autoCompleteDefault || null,
|
|
133
|
+
noOptionsText: "Invalid",
|
|
134
|
+
options: [{
|
|
135
|
+
value: "",
|
|
136
|
+
label: ""
|
|
137
|
+
}].concat(_toConsumableArray(options)),
|
|
138
|
+
disableClearable: true,
|
|
139
|
+
name: name,
|
|
140
|
+
required: required,
|
|
141
|
+
onChange: handleAutocompleteChange,
|
|
142
|
+
getOptionLabel: function getOptionLabel(option) {
|
|
143
|
+
return option.label ? option.label : "";
|
|
144
|
+
},
|
|
145
|
+
renderInput: function renderInput(params) {
|
|
146
|
+
return /* @__PURE__ */React.createElement(StyledTextField, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
147
|
+
value: value,
|
|
148
|
+
placeholder: placeholder,
|
|
149
|
+
name: name,
|
|
150
|
+
variant: "outlined",
|
|
151
|
+
onChange: handleNativeChange,
|
|
152
|
+
onKeyDown: handleKeyDown,
|
|
153
|
+
inputRef: inputRef,
|
|
154
|
+
required: required,
|
|
155
|
+
inputProps: _objectSpread2({
|
|
156
|
+
autoComplete: "off"
|
|
157
|
+
}, params.inputProps)
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
}, rest)) : /* @__PURE__ */React.createElement(Select, _objectSpread2({
|
|
161
|
+
fullWidth: true,
|
|
162
|
+
value: !Number.isNaN(value) ? value : null,
|
|
163
|
+
required: required,
|
|
164
|
+
placeholder: placeholder,
|
|
165
|
+
onChange: handleNativeChange,
|
|
166
|
+
options: [{
|
|
167
|
+
value: "",
|
|
168
|
+
label: placeholder
|
|
169
|
+
}].concat(_toConsumableArray(options)),
|
|
170
|
+
inputRef: inputRef,
|
|
171
|
+
name: name,
|
|
172
|
+
native: true
|
|
173
|
+
}, rest)));
|
|
176
174
|
}
|
|
177
175
|
DateNumberInput.propTypes = {
|
|
178
176
|
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, 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 InputAdornment from '@mui/material/InputAdornment';
|
|
7
6
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
@@ -50,52 +49,48 @@ function DatePicker(_ref) {
|
|
|
50
49
|
_useState2 = _slicedToArray(_useState, 2);
|
|
51
50
|
_useState2[0];
|
|
52
51
|
var setOpen = _useState2[1];
|
|
53
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */React.createElement(StyledWrapper, {
|
|
54
53
|
required: required,
|
|
55
|
-
hasValue: !!value
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
hasValue: !!value
|
|
55
|
+
}, /* @__PURE__ */React.createElement(LocalizationProvider, {
|
|
56
|
+
dateAdapter: AdapterDayjs
|
|
57
|
+
}, /* @__PURE__ */React.createElement(DatePicker$1, _objectSpread2({
|
|
58
|
+
clearable: true,
|
|
59
|
+
disableCloseOnSelect: false,
|
|
60
|
+
inputFormat: format,
|
|
61
|
+
value: value,
|
|
62
|
+
onChange: onChange,
|
|
63
|
+
onClose: function onClose() {
|
|
64
|
+
return setOpen(false);
|
|
65
|
+
},
|
|
66
|
+
renderInput: function renderInput(params) {
|
|
67
|
+
return /* @__PURE__ */React.createElement(TextInput, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
return setOpen(true);
|
|
66
70
|
},
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
name: name,
|
|
72
|
+
fullWidth: fullWidth,
|
|
73
|
+
label: label,
|
|
74
|
+
helperText: helperText,
|
|
75
|
+
disabled: disabled,
|
|
76
|
+
required: required,
|
|
77
|
+
showError: showError,
|
|
78
|
+
message: errorMessage,
|
|
79
|
+
edges: edges,
|
|
80
|
+
variant: variant,
|
|
81
|
+
autoComplete: "off",
|
|
82
|
+
InputProps: {
|
|
83
|
+
endAdornment: /* @__PURE__ */React.createElement(InputAdornment, {
|
|
84
|
+
position: "end"
|
|
85
|
+
}, /* @__PURE__ */React.createElement(IconButton, {
|
|
69
86
|
onClick: function onClick() {
|
|
70
87
|
return setOpen(true);
|
|
71
|
-
},
|
|
72
|
-
name: name,
|
|
73
|
-
fullWidth: fullWidth,
|
|
74
|
-
label: label,
|
|
75
|
-
helperText: helperText,
|
|
76
|
-
disabled: disabled,
|
|
77
|
-
required: required,
|
|
78
|
-
showError: showError,
|
|
79
|
-
message: errorMessage,
|
|
80
|
-
edges: edges,
|
|
81
|
-
variant: variant,
|
|
82
|
-
autoComplete: "off",
|
|
83
|
-
InputProps: {
|
|
84
|
-
endAdornment: /* @__PURE__ */jsx(InputAdornment, {
|
|
85
|
-
position: "end",
|
|
86
|
-
children: /* @__PURE__ */jsx(IconButton, {
|
|
87
|
-
onClick: function onClick() {
|
|
88
|
-
return setOpen(true);
|
|
89
|
-
},
|
|
90
|
-
children: icon || /* @__PURE__ */jsx(EventIcon, {})
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
88
|
}
|
|
94
|
-
}))
|
|
89
|
+
}, icon || /* @__PURE__ */React.createElement(EventIcon, null)))
|
|
95
90
|
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
});
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
}, rest))));
|
|
99
94
|
}
|
|
100
95
|
DatePicker.propTypes = {
|
|
101
96
|
/**
|