@tenancy.nz/ui 1.0.0 → 1.0.2
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/README.md +0 -69
- package/dist/cjs/components/Alert.cjs +48 -0
- package/dist/cjs/components/Alert.styled.cjs +41 -0
- package/dist/cjs/components/Autocomplete.cjs +176 -0
- package/dist/cjs/components/Autocomplete.styled.cjs +15 -0
- package/dist/cjs/components/Avatar.cjs +52 -0
- package/dist/cjs/components/Avatar.styled.cjs +24 -0
- package/dist/cjs/components/AvatarCropDialog.cjs +200 -0
- package/dist/cjs/components/AvatarCropDialog.styled.cjs +21 -0
- package/dist/cjs/components/AvatarInput.cjs +215 -0
- package/dist/cjs/components/AvatarInput.styled.cjs +151 -0
- package/dist/cjs/components/Badge.cjs +83 -0
- package/dist/cjs/components/Badge.styled.cjs +23 -0
- package/dist/cjs/components/BankAccountInput.cjs +296 -0
- package/dist/cjs/components/BankAccountInput.styled.cjs +163 -0
- package/dist/cjs/components/Bar.cjs +44 -0
- package/dist/cjs/components/Bar.styled.cjs +22 -0
- package/dist/cjs/components/BaseModal.cjs +41 -0
- package/dist/cjs/components/BaseModal.styled.cjs +20 -0
- package/dist/cjs/components/BooleanInput.cjs +173 -0
- package/dist/cjs/components/BooleanInput.styled.cjs +65 -0
- package/dist/cjs/components/BorderedGrid.cjs +46 -0
- package/dist/cjs/components/Box.cjs +97 -0
- package/dist/cjs/components/Button.cjs +48 -0
- package/dist/cjs/components/Button.styled.cjs +106 -0
- package/dist/cjs/components/Card.cjs +61 -0
- package/dist/cjs/components/Card.styled.cjs +15 -0
- package/dist/cjs/components/CardContent.cjs +21 -0
- package/dist/cjs/components/CardContent.styled.cjs +10 -0
- package/dist/cjs/components/Checkbox.cjs +49 -0
- package/dist/cjs/components/Checkbox.styled.cjs +25 -0
- package/dist/cjs/components/CircularProgress.cjs +14 -0
- package/dist/cjs/components/CollapsedText.cjs +88 -0
- package/dist/cjs/components/CollapsedText.styled.cjs +52 -0
- package/dist/cjs/components/Confirmation.cjs +60 -0
- package/dist/cjs/components/Container.cjs +21 -0
- package/dist/cjs/components/CroppedImageInput.cjs +465 -0
- package/dist/cjs/components/CroppedImageInput.styled.cjs +91 -0
- package/dist/cjs/components/CroppedImageInputActions.cjs +78 -0
- package/dist/cjs/components/DateInput.cjs +218 -0
- package/dist/cjs/components/DateInput.styled.cjs +26 -0
- package/dist/cjs/components/DateNumberInput.cjs +175 -0
- package/dist/cjs/components/DateNumberInput.styled.cjs +58 -0
- package/dist/cjs/components/DatePicker.cjs +134 -0
- package/dist/cjs/components/DatePicker.styled.cjs +17 -0
- package/dist/cjs/components/DateSelect.cjs +212 -0
- package/dist/cjs/components/DateSelect.styled.cjs +15 -0
- package/dist/cjs/components/Divider.cjs +67 -0
- package/dist/cjs/components/Divider.styled.cjs +62 -0
- package/dist/cjs/components/DropZone.cjs +153 -0
- package/dist/cjs/components/DropZone.styled.cjs +76 -0
- package/dist/cjs/components/Embed.cjs +41 -0
- package/dist/cjs/components/Embed.styled.cjs +38 -0
- package/dist/cjs/components/FileUpload.cjs +319 -0
- package/dist/cjs/components/FileUpload.styled.cjs +47 -0
- package/dist/cjs/components/FileUploadButton.cjs +117 -0
- package/dist/cjs/components/FileUploadButtonLoader.cjs +27 -0
- package/dist/cjs/components/FileViewer.cjs +117 -0
- package/dist/cjs/components/FileViewer.styled.cjs +29 -0
- package/dist/cjs/components/FlashMessage.cjs +69 -0
- package/dist/cjs/components/FormControl.cjs +102 -0
- package/dist/cjs/components/FormControl.styled.cjs +22 -0
- package/dist/cjs/components/FormFocus.cjs +37 -0
- package/dist/cjs/components/FormLabel.cjs +24 -0
- package/dist/cjs/components/FormLabel.styled.cjs +55 -0
- package/dist/cjs/components/Grid.cjs +52 -0
- package/dist/cjs/components/Grid.styled.cjs +12 -0
- package/dist/cjs/components/Heading.cjs +41 -0
- package/dist/cjs/components/IconButton.cjs +31 -0
- package/dist/cjs/components/IconButton.styled.cjs +31 -0
- package/dist/cjs/components/Icons.cjs +62 -0
- package/dist/cjs/components/LinearProgress.cjs +14 -0
- package/dist/cjs/components/Link.cjs +37 -0
- package/dist/cjs/components/Link.styled.cjs +39 -0
- package/dist/cjs/components/Media.cjs +44 -0
- package/dist/cjs/components/Media.styled.cjs +46 -0
- package/dist/cjs/components/Modal.cjs +56 -0
- package/dist/cjs/components/ModalActions.cjs +23 -0
- package/dist/cjs/components/ModalContent.cjs +32 -0
- package/dist/cjs/components/ModalHeader.cjs +24 -0
- package/dist/cjs/components/ModalHeader.styled.cjs +29 -0
- package/dist/cjs/components/Nameplate.cjs +110 -0
- package/dist/cjs/components/Nameplate.styled.cjs +49 -0
- package/dist/cjs/components/Pagination.cjs +147 -0
- package/dist/cjs/components/Pagination.styled.cjs +83 -0
- package/dist/cjs/components/Paper.cjs +34 -0
- package/dist/cjs/components/Paper.styled.cjs +63 -0
- package/dist/cjs/components/Popper.cjs +64 -0
- package/dist/cjs/components/PropertyCard.cjs +222 -0
- package/dist/cjs/components/PropertyCard.styled.cjs +67 -0
- package/dist/cjs/components/Radio.cjs +49 -0
- package/dist/cjs/components/Radio.styled.cjs +25 -0
- package/dist/cjs/components/Rating.cjs +14 -0
- package/dist/cjs/components/Select.cjs +105 -0
- package/dist/cjs/components/Select.styled.cjs +104 -0
- package/dist/cjs/components/Skeleton.cjs +23 -0
- package/dist/cjs/components/StatusMessage.cjs +27 -0
- package/dist/cjs/components/StepIcon.cjs +50 -0
- package/dist/cjs/components/StepIcon.styled.cjs +57 -0
- package/dist/cjs/components/Stepper.cjs +58 -0
- package/dist/cjs/components/Stepper.styled.cjs +61 -0
- package/dist/cjs/components/SuccessModal.cjs +43 -0
- package/dist/cjs/components/SuccessModal.styled.cjs +22 -0
- package/dist/cjs/components/Switch.cjs +46 -0
- package/dist/cjs/components/Switch.styled.cjs +109 -0
- package/dist/cjs/components/Tab.cjs +39 -0
- package/dist/cjs/components/Tab.styled.cjs +14 -0
- package/dist/cjs/components/TabPanel.cjs +30 -0
- package/dist/cjs/components/TabPanel.styled.cjs +12 -0
- package/dist/cjs/components/Table.cjs +21 -0
- package/dist/cjs/components/TableBody.cjs +21 -0
- package/dist/cjs/components/TableCell.cjs +21 -0
- package/dist/cjs/components/TableContainer.cjs +21 -0
- package/dist/cjs/components/TableFooter.cjs +21 -0
- package/dist/cjs/components/TableHead.cjs +21 -0
- package/dist/cjs/components/TableRow.cjs +21 -0
- package/dist/cjs/components/Tabs.cjs +65 -0
- package/dist/cjs/components/Tabs.styled.cjs +90 -0
- package/dist/cjs/components/Tag.cjs +37 -0
- package/dist/cjs/components/Tag.styled.cjs +120 -0
- package/dist/cjs/components/Text.cjs +36 -0
- package/dist/cjs/components/TextInput.cjs +145 -0
- package/dist/cjs/components/TextInput.styled.cjs +117 -0
- package/dist/cjs/components/ThemeProvider.cjs +43 -0
- package/dist/cjs/components/TimeInput.cjs +248 -0
- package/dist/cjs/components/TimeInput.styled.cjs +38 -0
- package/dist/cjs/components/Tooltip.cjs +40 -0
- package/dist/cjs/components/Tooltip.styled.cjs +55 -0
- package/dist/cjs/components/Truncate.cjs +23 -0
- package/dist/cjs/index.cjs +182 -0
- package/dist/cjs/theme/index.cjs +252 -0
- package/dist/cjs/utils/animations.cjs +68 -0
- package/dist/cjs/utils/colors.cjs +31 -0
- package/dist/cjs/utils/constants.cjs +8 -0
- package/dist/cjs/utils/files.cjs +44 -0
- package/dist/cjs/utils/helpers/array.cjs +24 -0
- package/dist/cjs/utils/helpers/boolean.cjs +25 -0
- package/dist/cjs/utils/helpers/date.cjs +11 -0
- package/dist/cjs/utils/helpers/dateSelect.cjs +41 -0
- package/dist/cjs/utils/helpers/file.cjs +53 -0
- package/dist/cjs/utils/helpers/index.cjs +36 -0
- package/dist/cjs/utils/helpers/number.cjs +18 -0
- package/dist/cjs/utils/helpers/object.cjs +97 -0
- package/dist/cjs/utils/helpers/string.cjs +21 -0
- package/dist/cjs/utils/helpers/time.cjs +64 -0
- package/dist/cjs/utils/loadFont.cjs +19 -0
- package/dist/cjs/utils/useResize.cjs +24 -0
- package/dist/esm/components/Alert.js +44 -0
- package/dist/esm/components/Alert.styled.js +36 -0
- package/dist/esm/components/Autocomplete.js +172 -0
- package/dist/esm/components/Autocomplete.styled.js +13 -0
- package/dist/esm/components/Avatar.js +48 -0
- package/dist/esm/components/Avatar.styled.js +22 -0
- package/dist/esm/components/AvatarCropDialog.js +196 -0
- package/dist/esm/components/AvatarCropDialog.styled.js +19 -0
- package/dist/esm/components/AvatarInput.js +211 -0
- package/dist/esm/components/AvatarInput.styled.js +143 -0
- package/dist/esm/components/Badge.js +79 -0
- package/dist/esm/components/Badge.styled.js +21 -0
- package/dist/esm/components/BankAccountInput.js +292 -0
- package/dist/esm/components/BankAccountInput.styled.js +158 -0
- package/dist/esm/components/Bar.js +40 -0
- package/dist/esm/components/Bar.styled.js +20 -0
- package/dist/esm/components/BaseModal.js +37 -0
- package/dist/esm/components/BaseModal.styled.js +16 -0
- package/dist/esm/components/BooleanInput.js +169 -0
- package/dist/esm/components/BooleanInput.styled.js +62 -0
- package/dist/esm/components/BorderedGrid.js +42 -0
- package/dist/esm/components/Box.js +93 -0
- package/dist/esm/components/Button.js +44 -0
- package/dist/esm/components/Button.styled.js +96 -0
- package/dist/esm/components/Card.js +57 -0
- package/dist/esm/components/Card.styled.js +13 -0
- package/dist/esm/components/CardContent.js +17 -0
- package/dist/esm/components/CardContent.styled.js +8 -0
- package/dist/esm/components/Checkbox.js +45 -0
- package/dist/esm/components/Checkbox.styled.js +23 -0
- package/dist/esm/components/CircularProgress.js +10 -0
- package/dist/esm/components/CollapsedText.js +84 -0
- package/dist/esm/components/CollapsedText.styled.js +48 -0
- package/dist/esm/components/Confirmation.js +56 -0
- package/dist/esm/components/Container.js +17 -0
- package/dist/esm/components/CroppedImageInput.js +461 -0
- package/dist/esm/components/CroppedImageInput.styled.js +85 -0
- package/dist/esm/components/CroppedImageInputActions.js +74 -0
- package/dist/esm/components/DateInput.js +214 -0
- package/dist/esm/components/DateInput.styled.js +21 -0
- package/dist/esm/components/DateNumberInput.js +171 -0
- package/dist/esm/components/DateNumberInput.styled.js +55 -0
- package/dist/esm/components/DatePicker.js +130 -0
- package/dist/esm/components/DatePicker.styled.js +15 -0
- package/dist/esm/components/DateSelect.js +208 -0
- package/dist/esm/components/DateSelect.styled.js +11 -0
- package/dist/esm/components/Divider.js +63 -0
- package/dist/esm/components/Divider.styled.js +60 -0
- package/dist/esm/components/DropZone.js +149 -0
- package/dist/esm/components/DropZone.styled.js +71 -0
- package/dist/esm/components/Embed.js +37 -0
- package/dist/esm/components/Embed.styled.js +34 -0
- package/dist/esm/components/FileUpload.js +315 -0
- package/dist/esm/components/FileUpload.styled.js +43 -0
- package/dist/esm/components/FileUploadButton.js +113 -0
- package/dist/esm/components/FileUploadButtonLoader.js +23 -0
- package/dist/esm/components/FileViewer.js +113 -0
- package/dist/esm/components/FileViewer.styled.js +25 -0
- package/dist/esm/components/FlashMessage.js +65 -0
- package/dist/esm/components/FormControl.js +98 -0
- package/dist/esm/components/FormControl.styled.js +18 -0
- package/dist/esm/components/FormFocus.js +33 -0
- package/dist/esm/components/FormLabel.js +20 -0
- package/dist/esm/components/FormLabel.styled.js +51 -0
- package/dist/esm/components/Grid.js +48 -0
- package/dist/esm/components/Grid.styled.js +10 -0
- package/dist/esm/components/Heading.js +37 -0
- package/dist/esm/components/IconButton.js +27 -0
- package/dist/esm/components/IconButton.styled.js +27 -0
- package/dist/esm/components/Icons.js +58 -0
- package/dist/esm/components/LinearProgress.js +10 -0
- package/dist/esm/components/Link.js +33 -0
- package/dist/esm/components/Link.styled.js +37 -0
- package/dist/esm/components/Media.js +40 -0
- package/dist/esm/components/Media.styled.js +42 -0
- package/dist/esm/components/Modal.js +52 -0
- package/dist/esm/components/ModalActions.js +19 -0
- package/dist/esm/components/ModalContent.js +28 -0
- package/dist/esm/components/ModalHeader.js +20 -0
- package/dist/esm/components/ModalHeader.styled.js +25 -0
- package/dist/esm/components/Nameplate.js +106 -0
- package/dist/esm/components/Nameplate.styled.js +44 -0
- package/dist/esm/components/Pagination.js +143 -0
- package/dist/esm/components/Pagination.styled.js +79 -0
- package/dist/esm/components/Paper.js +30 -0
- package/dist/esm/components/Paper.styled.js +59 -0
- package/dist/esm/components/Popper.js +60 -0
- package/dist/esm/components/PropertyCard.js +218 -0
- package/dist/esm/components/PropertyCard.styled.js +62 -0
- package/dist/esm/components/Radio.js +45 -0
- package/dist/esm/components/Radio.styled.js +23 -0
- package/dist/esm/components/Rating.js +10 -0
- package/dist/esm/components/Select.js +101 -0
- package/dist/esm/components/Select.styled.js +95 -0
- package/dist/esm/components/Skeleton.js +19 -0
- package/dist/esm/components/StatusMessage.js +23 -0
- package/dist/esm/components/StepIcon.js +46 -0
- package/dist/esm/components/StepIcon.styled.js +54 -0
- package/dist/esm/components/Stepper.js +54 -0
- package/dist/esm/components/Stepper.styled.js +59 -0
- package/dist/esm/components/SuccessModal.js +39 -0
- package/dist/esm/components/SuccessModal.styled.js +19 -0
- package/dist/esm/components/Switch.js +42 -0
- package/dist/esm/components/Switch.styled.js +103 -0
- package/dist/esm/components/Tab.js +35 -0
- package/dist/esm/components/Tab.styled.js +12 -0
- package/dist/esm/components/TabPanel.js +26 -0
- package/dist/esm/components/TabPanel.styled.js +10 -0
- package/dist/esm/components/Table.js +17 -0
- package/dist/esm/components/TableBody.js +17 -0
- package/dist/esm/components/TableCell.js +17 -0
- package/dist/esm/components/TableContainer.js +17 -0
- package/dist/esm/components/TableFooter.js +17 -0
- package/dist/esm/components/TableHead.js +17 -0
- package/dist/esm/components/TableRow.js +17 -0
- package/dist/esm/components/Tabs.js +61 -0
- package/dist/esm/components/Tabs.styled.js +88 -0
- package/dist/esm/components/Tag.js +33 -0
- package/dist/esm/components/Tag.styled.js +114 -0
- package/dist/esm/components/Text.js +32 -0
- package/dist/esm/components/TextInput.js +141 -0
- package/dist/esm/components/TextInput.styled.js +105 -0
- package/dist/esm/components/ThemeProvider.js +39 -0
- package/dist/esm/components/TimeInput.js +244 -0
- package/dist/esm/components/TimeInput.styled.js +34 -0
- package/dist/esm/components/Tooltip.js +36 -0
- package/dist/esm/components/Tooltip.styled.js +51 -0
- package/dist/esm/components/Truncate.js +19 -0
- package/dist/esm/index.js +84 -0
- package/dist/esm/theme/index.js +247 -0
- package/dist/esm/utils/animations.js +60 -0
- package/dist/esm/utils/colors.js +28 -0
- package/dist/esm/utils/constants.js +5 -0
- package/dist/esm/utils/files.js +39 -0
- package/dist/esm/utils/helpers/array.js +20 -0
- package/dist/esm/utils/helpers/boolean.js +16 -0
- package/dist/esm/utils/helpers/date.js +6 -0
- package/dist/esm/utils/helpers/dateSelect.js +35 -0
- package/dist/esm/utils/helpers/file.js +47 -0
- package/dist/esm/utils/helpers/index.js +6 -0
- package/dist/esm/utils/helpers/number.js +15 -0
- package/dist/esm/utils/helpers/object.js +88 -0
- package/dist/esm/utils/helpers/string.js +15 -0
- package/dist/esm/utils/helpers/time.js +59 -0
- package/dist/esm/utils/loadFont.js +15 -0
- package/dist/esm/utils/useResize.js +20 -0
- package/package.json +2 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
import Box from '@mui/material/Box';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { getObjectProp } from '../utils/helpers/object.js';
|
|
6
|
+
|
|
7
|
+
const getPadding = (inset) => {
|
|
8
|
+
if (typeof inset === "number") {
|
|
9
|
+
return `${inset}px`;
|
|
10
|
+
}
|
|
11
|
+
if (inset === "none") {
|
|
12
|
+
return "0px";
|
|
13
|
+
}
|
|
14
|
+
if (inset === "small") {
|
|
15
|
+
return "8px";
|
|
16
|
+
}
|
|
17
|
+
if (inset === "medium") {
|
|
18
|
+
return "16px";
|
|
19
|
+
}
|
|
20
|
+
if (inset === "large") {
|
|
21
|
+
return "24px";
|
|
22
|
+
}
|
|
23
|
+
if (inset === "xlarge") {
|
|
24
|
+
return "32px";
|
|
25
|
+
}
|
|
26
|
+
return `${inset}`;
|
|
27
|
+
};
|
|
28
|
+
const StyledPaper = styled(Box)`
|
|
29
|
+
${({ elevate, fill, inset, noOverflow, outlined, rounded, theme }) => css`
|
|
30
|
+
background-color: ${getObjectProp(theme, "vars.palette.background.paper")};
|
|
31
|
+
font-family: ${getObjectProp(theme, "typography.fontFamily")};
|
|
32
|
+
padding: ${getPadding(inset)};
|
|
33
|
+
|
|
34
|
+
${elevate && !outlined && css`
|
|
35
|
+
border: none;
|
|
36
|
+
box-shadow: 0 0 12px 2px rgba(0, 0, 0, 0.1);
|
|
37
|
+
`}
|
|
38
|
+
|
|
39
|
+
${noOverflow && css`
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
`}
|
|
42
|
+
|
|
43
|
+
${outlined && css`
|
|
44
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
45
|
+
box-shadow: none;
|
|
46
|
+
`}
|
|
47
|
+
|
|
48
|
+
${rounded && css`
|
|
49
|
+
border-radius: 8px;
|
|
50
|
+
`}
|
|
51
|
+
|
|
52
|
+
${fill && css`
|
|
53
|
+
height: 100%;
|
|
54
|
+
width: 100%;
|
|
55
|
+
`}
|
|
56
|
+
`};
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
export { StyledPaper as default };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import MuiPopper from '@mui/material/Popper';
|
|
6
|
+
import MuiFade from '@mui/material/Fade';
|
|
7
|
+
import MuiPaper from '@mui/material/Paper';
|
|
8
|
+
|
|
9
|
+
function Popper({
|
|
10
|
+
children,
|
|
11
|
+
anchorEl = null,
|
|
12
|
+
open = false,
|
|
13
|
+
disablePortal = false,
|
|
14
|
+
placement = "bottom",
|
|
15
|
+
...others
|
|
16
|
+
}, ref) {
|
|
17
|
+
const rest = { anchorEl, open, disablePortal, placement, ...others };
|
|
18
|
+
return /* @__PURE__ */ jsx(MuiPopper, { ...rest, transition: true, ref, style: { zIndex: 9999 }, children: ({ TransitionProps }) => /* @__PURE__ */ jsx(MuiFade, { ...TransitionProps, timeout: 350, children: /* @__PURE__ */ jsx(MuiPaper, { elevation: 3, style: { margin: 5 }, children }) }) });
|
|
19
|
+
}
|
|
20
|
+
Popper.propTypes = {
|
|
21
|
+
/**
|
|
22
|
+
* An HTML element, virtualElement, or a function which is used to set the position of the popper.
|
|
23
|
+
*/
|
|
24
|
+
anchorEl: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
25
|
+
/**
|
|
26
|
+
* Popper render function or node.
|
|
27
|
+
*/
|
|
28
|
+
children: PropTypes.node.isRequired,
|
|
29
|
+
/**
|
|
30
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
31
|
+
*/
|
|
32
|
+
disablePortal: PropTypes.bool,
|
|
33
|
+
/**
|
|
34
|
+
* If `true`, the component is shown.
|
|
35
|
+
*/
|
|
36
|
+
open: PropTypes.bool,
|
|
37
|
+
/**
|
|
38
|
+
* Placement of popper
|
|
39
|
+
*/
|
|
40
|
+
placement: PropTypes.oneOf([
|
|
41
|
+
"auto-end",
|
|
42
|
+
"auto-start",
|
|
43
|
+
"auto",
|
|
44
|
+
"bottom-end",
|
|
45
|
+
"bottom-start",
|
|
46
|
+
"bottom",
|
|
47
|
+
"left-end",
|
|
48
|
+
"left-start",
|
|
49
|
+
"left",
|
|
50
|
+
"right-end",
|
|
51
|
+
"right-start",
|
|
52
|
+
"right",
|
|
53
|
+
"top-end",
|
|
54
|
+
"top-start",
|
|
55
|
+
"top"
|
|
56
|
+
])
|
|
57
|
+
};
|
|
58
|
+
var Popper$1 = forwardRef(Popper);
|
|
59
|
+
|
|
60
|
+
export { Popper$1 as default };
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import HotelIcon from '@mui/icons-material/Hotel';
|
|
6
|
+
import DirectionsCarIcon from '@mui/icons-material/DirectionsCar';
|
|
7
|
+
import BathtubIcon from '@mui/icons-material/Bathtub';
|
|
8
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
9
|
+
import Box from './Box.js';
|
|
10
|
+
import Divider from './Divider.js';
|
|
11
|
+
import Heading from './Heading.js';
|
|
12
|
+
import Media from './Media.js';
|
|
13
|
+
import Paper from './Paper.js';
|
|
14
|
+
import Skeleton from './Skeleton.js';
|
|
15
|
+
import Text from './Text.js';
|
|
16
|
+
import { StyledContainer, StyledImg, StyledDetails, StyledIcon } from './PropertyCard.styled.js';
|
|
17
|
+
import { implode } from '../utils/helpers/array.js';
|
|
18
|
+
import { isEmpty } from '../utils/helpers/boolean.js';
|
|
19
|
+
import 'mime/lite';
|
|
20
|
+
import '../utils/helpers/time.js';
|
|
21
|
+
|
|
22
|
+
function PropertyCard({
|
|
23
|
+
bedrooms = 0,
|
|
24
|
+
bathrooms = 0,
|
|
25
|
+
elevation = true,
|
|
26
|
+
footerContent = void 0,
|
|
27
|
+
onView = null,
|
|
28
|
+
photo = "",
|
|
29
|
+
parkingSpaces = 0,
|
|
30
|
+
rentAmount = 0,
|
|
31
|
+
rentFrequency = "weekly",
|
|
32
|
+
skeleton = false,
|
|
33
|
+
unit = "",
|
|
34
|
+
streetNumber = "",
|
|
35
|
+
streetName = "",
|
|
36
|
+
suburb = "",
|
|
37
|
+
city = ""
|
|
38
|
+
}) {
|
|
39
|
+
const isMobile = useMediaQuery((theme) => theme.breakpoints.down("sm"));
|
|
40
|
+
const abbreviatedRentFrequency = () => {
|
|
41
|
+
switch (rentFrequency) {
|
|
42
|
+
case "weekly":
|
|
43
|
+
return "pw";
|
|
44
|
+
case "monthly":
|
|
45
|
+
return "pm";
|
|
46
|
+
case "daily":
|
|
47
|
+
return "day";
|
|
48
|
+
case "fortnightly":
|
|
49
|
+
return "fortn";
|
|
50
|
+
default:
|
|
51
|
+
return "pw";
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const address1 = implode(" ", [
|
|
55
|
+
implode("/", [unit, streetNumber]),
|
|
56
|
+
streetName
|
|
57
|
+
]);
|
|
58
|
+
const address2 = implode(", ", [suburb, city]);
|
|
59
|
+
const address = `${address1} ${address2}`;
|
|
60
|
+
return /* @__PURE__ */ jsx(Paper, { rounded: true, elevate: elevation, fill: !isMobile, children: /* @__PURE__ */ jsxs(StyledContainer, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx(StyledImg, { children: /* @__PURE__ */ jsx(Media, { skeleton, src: photo, title: address }) }),
|
|
62
|
+
/* @__PURE__ */ jsxs(StyledDetails, { children: [
|
|
63
|
+
!skeleton && /* @__PURE__ */ jsx(Heading, { as: "h3", gutterBottom: false, children: address1 }),
|
|
64
|
+
skeleton && /* @__PURE__ */ jsx(Skeleton, { width: "75%", height: 30 }),
|
|
65
|
+
!skeleton && /* @__PURE__ */ jsx(Text, { variant: "subtitle1", weight: "500", color: "textPrimary", children: address2 }),
|
|
66
|
+
skeleton && /* @__PURE__ */ jsx(Skeleton, { width: "65%", height: 30 }),
|
|
67
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
68
|
+
/* @__PURE__ */ jsxs(
|
|
69
|
+
Box,
|
|
70
|
+
{
|
|
71
|
+
display: "flex",
|
|
72
|
+
width: "100%",
|
|
73
|
+
align: "center",
|
|
74
|
+
marginBottom: !skeleton ? "20px" : "-13px",
|
|
75
|
+
children: [
|
|
76
|
+
!skeleton && /* @__PURE__ */ jsxs(
|
|
77
|
+
Text,
|
|
78
|
+
{
|
|
79
|
+
as: "span",
|
|
80
|
+
weight: "600",
|
|
81
|
+
variant: "inherit",
|
|
82
|
+
color: "textPrimary",
|
|
83
|
+
children: [
|
|
84
|
+
"$",
|
|
85
|
+
rentAmount,
|
|
86
|
+
abbreviatedRentFrequency()
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
skeleton && /* @__PURE__ */ jsx(Skeleton, { width: 60, height: 27 }),
|
|
91
|
+
/* @__PURE__ */ jsxs(StyledIcon, { children: [
|
|
92
|
+
!skeleton && !isEmpty(bedrooms) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
Text,
|
|
95
|
+
{
|
|
96
|
+
as: "span",
|
|
97
|
+
weight: "600",
|
|
98
|
+
variant: "inherit",
|
|
99
|
+
color: "textPrimary",
|
|
100
|
+
children: bedrooms
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
"\xA0",
|
|
104
|
+
/* @__PURE__ */ jsx(HotelIcon, {})
|
|
105
|
+
] }),
|
|
106
|
+
skeleton && /* @__PURE__ */ jsx(Skeleton, { width: 40, height: 27 })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsxs(StyledIcon, { children: [
|
|
109
|
+
!skeleton && !isEmpty(bathrooms) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
Text,
|
|
112
|
+
{
|
|
113
|
+
as: "span",
|
|
114
|
+
weight: "600",
|
|
115
|
+
variant: "inherit",
|
|
116
|
+
color: "textPrimary",
|
|
117
|
+
children: bathrooms
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
"\xA0",
|
|
121
|
+
/* @__PURE__ */ jsx(BathtubIcon, {})
|
|
122
|
+
] }),
|
|
123
|
+
skeleton && /* @__PURE__ */ jsx(Skeleton, { width: 40, height: 27 })
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsxs(StyledIcon, { children: [
|
|
126
|
+
!skeleton && !isEmpty(parkingSpaces) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
127
|
+
/* @__PURE__ */ jsx(
|
|
128
|
+
Text,
|
|
129
|
+
{
|
|
130
|
+
as: "span",
|
|
131
|
+
weight: "600",
|
|
132
|
+
variant: "inherit",
|
|
133
|
+
color: "textPrimary",
|
|
134
|
+
children: parkingSpaces
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
"\xA0",
|
|
138
|
+
/* @__PURE__ */ jsx(DirectionsCarIcon, {})
|
|
139
|
+
] }),
|
|
140
|
+
skeleton && /* @__PURE__ */ jsx(Skeleton, { width: 40, height: 27 })
|
|
141
|
+
] })
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
footerContent && /* @__PURE__ */ jsx(Box, { display: "flex", justify: "flex-end", align: "center", children: footerContent })
|
|
146
|
+
] })
|
|
147
|
+
] }) });
|
|
148
|
+
}
|
|
149
|
+
PropertyCard.propTypes = {
|
|
150
|
+
/**
|
|
151
|
+
* URL for the property photo
|
|
152
|
+
*/
|
|
153
|
+
photo: PropTypes.string,
|
|
154
|
+
/**
|
|
155
|
+
* The number of bedrooms
|
|
156
|
+
*/
|
|
157
|
+
bedrooms: PropTypes.number,
|
|
158
|
+
/**
|
|
159
|
+
* The number of bathrooms
|
|
160
|
+
*/
|
|
161
|
+
bathrooms: PropTypes.number,
|
|
162
|
+
/**
|
|
163
|
+
* Shadow depth
|
|
164
|
+
*/
|
|
165
|
+
elevation: PropTypes.bool,
|
|
166
|
+
/**
|
|
167
|
+
* Content to display in footer, action buttons etc.
|
|
168
|
+
*/
|
|
169
|
+
footerContent: PropTypes.node,
|
|
170
|
+
/**
|
|
171
|
+
* View click handler
|
|
172
|
+
*/
|
|
173
|
+
onView: PropTypes.oneOfType([PropTypes.func, PropTypes.instanceOf(null)]),
|
|
174
|
+
/**
|
|
175
|
+
* The number of vehicles that can be parked
|
|
176
|
+
*/
|
|
177
|
+
parkingSpaces: PropTypes.number,
|
|
178
|
+
/**
|
|
179
|
+
* Dollar amount for rent
|
|
180
|
+
*/
|
|
181
|
+
rentAmount: PropTypes.number,
|
|
182
|
+
/**
|
|
183
|
+
* Dollar amount for rent
|
|
184
|
+
*/
|
|
185
|
+
rentFrequency: PropTypes.oneOf([
|
|
186
|
+
"weekly",
|
|
187
|
+
"monthly",
|
|
188
|
+
"fortnightly",
|
|
189
|
+
"daily",
|
|
190
|
+
""
|
|
191
|
+
]),
|
|
192
|
+
/**
|
|
193
|
+
* Show skeleton layout
|
|
194
|
+
*/
|
|
195
|
+
skeleton: PropTypes.bool,
|
|
196
|
+
/**
|
|
197
|
+
* Unit number in address
|
|
198
|
+
*/
|
|
199
|
+
unit: PropTypes.string,
|
|
200
|
+
/**
|
|
201
|
+
* Street number in address
|
|
202
|
+
*/
|
|
203
|
+
streetNumber: PropTypes.string,
|
|
204
|
+
/**
|
|
205
|
+
* Street name in address
|
|
206
|
+
*/
|
|
207
|
+
streetName: PropTypes.string,
|
|
208
|
+
/**
|
|
209
|
+
* Address suburb
|
|
210
|
+
*/
|
|
211
|
+
suburb: PropTypes.string,
|
|
212
|
+
/**
|
|
213
|
+
* Address city
|
|
214
|
+
*/
|
|
215
|
+
city: PropTypes.string
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export { PropertyCard as default };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
const StyledContainer = styled.div`
|
|
5
|
+
${({ theme }) => css`
|
|
6
|
+
display: flex;
|
|
7
|
+
@media screen and (max-width: 767px) {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
padding: ${theme.spacing(3)};
|
|
10
|
+
}
|
|
11
|
+
@media screen and (min-width: 768px) {
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
`}}
|
|
15
|
+
`;
|
|
16
|
+
const StyledImg = styled.div`
|
|
17
|
+
${({ theme }) => css`
|
|
18
|
+
background: ${theme.palette.grey[200]};
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
|
|
21
|
+
@media screen and (max-width: 767px) {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 142px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media screen and (min-width: 768px) {
|
|
27
|
+
width: 182px;
|
|
28
|
+
flex: 0 0 182px;
|
|
29
|
+
min-height: 162px;
|
|
30
|
+
|
|
31
|
+
border-top-left-radius: ${theme.shape.borderRadius * 2}px;
|
|
32
|
+
border-bottom-left-radius: ${theme.shape.borderRadius * 2}px;
|
|
33
|
+
}
|
|
34
|
+
`}}
|
|
35
|
+
|
|
36
|
+
`;
|
|
37
|
+
const StyledDetails = styled.div`
|
|
38
|
+
${({ theme }) => css`
|
|
39
|
+
flex-grow: 1;
|
|
40
|
+
|
|
41
|
+
@media screen and (max-width: 767px) {
|
|
42
|
+
padding: ${theme.spacing(3, 0, 1, 0)};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media screen and (min-width: 768px) {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
padding: ${theme.spacing(3, 5)};
|
|
49
|
+
}
|
|
50
|
+
`}}
|
|
51
|
+
`;
|
|
52
|
+
const StyledIcon = styled.span`
|
|
53
|
+
${({ theme }) => css`
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
margin: 0 12px;
|
|
58
|
+
color: ${theme.palette.grey.main};
|
|
59
|
+
`}}
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
export { StyledContainer, StyledDetails, StyledIcon, StyledImg };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import Stack from '@mui/material/Stack';
|
|
4
|
+
import Box from './Box.js';
|
|
5
|
+
import FormLabel from './FormLabel.js';
|
|
6
|
+
import { StyledRadio } from './Radio.styled.js';
|
|
7
|
+
|
|
8
|
+
function Radio({
|
|
9
|
+
color = "primary",
|
|
10
|
+
disabled = false,
|
|
11
|
+
id = "",
|
|
12
|
+
required = false,
|
|
13
|
+
value = "",
|
|
14
|
+
label,
|
|
15
|
+
name,
|
|
16
|
+
size = "medium",
|
|
17
|
+
...rest
|
|
18
|
+
}) {
|
|
19
|
+
const props = {
|
|
20
|
+
color,
|
|
21
|
+
disabled,
|
|
22
|
+
id: id || name,
|
|
23
|
+
required,
|
|
24
|
+
value,
|
|
25
|
+
size,
|
|
26
|
+
name,
|
|
27
|
+
...rest
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ jsxs(Stack, { direction: "row", gap: "10px", alignItems: "flex-start", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(StyledRadio, { ...props, disableRipple: true }) }),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
FormLabel,
|
|
33
|
+
{
|
|
34
|
+
htmlFor: id,
|
|
35
|
+
size,
|
|
36
|
+
disabled,
|
|
37
|
+
margin: "none",
|
|
38
|
+
sx: { mt: "2px", fontWeight: "500" },
|
|
39
|
+
children: label
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { Radio as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import Radio from '@mui/material/Radio';
|
|
5
|
+
import { getObjectProp } from '../utils/helpers/object.js';
|
|
6
|
+
|
|
7
|
+
const StyledRadio = styled(Radio)`
|
|
8
|
+
${({ checked, disabled, theme }) => css`
|
|
9
|
+
padding: 0;
|
|
10
|
+
border-radius: 0;
|
|
11
|
+
|
|
12
|
+
${!checked && css`
|
|
13
|
+
color: ${getObjectProp(theme, "vars.palette.grey.600")};
|
|
14
|
+
`}
|
|
15
|
+
${disabled && css`
|
|
16
|
+
&& {
|
|
17
|
+
color: ${getObjectProp(theme, "vars.palette.grey.400")};
|
|
18
|
+
}
|
|
19
|
+
`}
|
|
20
|
+
`}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export { StyledRadio };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import uuid from 'react-uuid';
|
|
4
|
+
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
5
|
+
import FormControl from './FormControl.js';
|
|
6
|
+
import StyledSelect, { StyledSelectOption, StyledPlaceholder, StyledSelectValue } from './Select.styled.js';
|
|
7
|
+
|
|
8
|
+
function Select({
|
|
9
|
+
color = "default",
|
|
10
|
+
disabled = false,
|
|
11
|
+
edges = "smooth",
|
|
12
|
+
errorMessage = "",
|
|
13
|
+
fullWidth = true,
|
|
14
|
+
helperText = "",
|
|
15
|
+
id = void 0,
|
|
16
|
+
inputRef = void 0,
|
|
17
|
+
inputProps = {},
|
|
18
|
+
label = void 0,
|
|
19
|
+
IconComponent = void 0,
|
|
20
|
+
message = "",
|
|
21
|
+
MenuProps = {},
|
|
22
|
+
name,
|
|
23
|
+
native = false,
|
|
24
|
+
placeholder = "",
|
|
25
|
+
required = false,
|
|
26
|
+
showError = false,
|
|
27
|
+
size = "medium",
|
|
28
|
+
readOnly = false,
|
|
29
|
+
options = [],
|
|
30
|
+
...rest
|
|
31
|
+
}) {
|
|
32
|
+
const allowEmpty = !!placeholder;
|
|
33
|
+
const inputAttrs = {
|
|
34
|
+
...readOnly && { readOnly },
|
|
35
|
+
...inputProps
|
|
36
|
+
};
|
|
37
|
+
const props = {
|
|
38
|
+
color: showError ? "error" : color,
|
|
39
|
+
disabled,
|
|
40
|
+
$edges: edges,
|
|
41
|
+
fullWidth,
|
|
42
|
+
id: id || name,
|
|
43
|
+
inputProps: inputAttrs,
|
|
44
|
+
inputRef,
|
|
45
|
+
name,
|
|
46
|
+
placeholder,
|
|
47
|
+
required,
|
|
48
|
+
error: showError,
|
|
49
|
+
readOnly,
|
|
50
|
+
size,
|
|
51
|
+
...rest,
|
|
52
|
+
allowEmpty,
|
|
53
|
+
displayEmpty: allowEmpty,
|
|
54
|
+
native,
|
|
55
|
+
MenuProps: {
|
|
56
|
+
...MenuProps,
|
|
57
|
+
anchorOrigin: {
|
|
58
|
+
vertical: "bottom",
|
|
59
|
+
horizontal: "center"
|
|
60
|
+
},
|
|
61
|
+
transformOrigin: {
|
|
62
|
+
vertical: "top",
|
|
63
|
+
horizontal: "center"
|
|
64
|
+
},
|
|
65
|
+
marginThreshold: 0
|
|
66
|
+
},
|
|
67
|
+
IconComponent: IconComponent || KeyboardArrowDownIcon
|
|
68
|
+
};
|
|
69
|
+
const renderValue = (selected) => {
|
|
70
|
+
if (!selected) {
|
|
71
|
+
return /* @__PURE__ */ jsx(StyledPlaceholder, { children: placeholder });
|
|
72
|
+
}
|
|
73
|
+
return /* @__PURE__ */ jsx(StyledSelectValue, { children: selected });
|
|
74
|
+
};
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
FormControl,
|
|
77
|
+
{
|
|
78
|
+
color,
|
|
79
|
+
id: props.id,
|
|
80
|
+
label,
|
|
81
|
+
helperText,
|
|
82
|
+
showError,
|
|
83
|
+
message: errorMessage || message,
|
|
84
|
+
fullWidth,
|
|
85
|
+
disabled,
|
|
86
|
+
required,
|
|
87
|
+
size,
|
|
88
|
+
children: /* @__PURE__ */ jsx(StyledSelect, { renderValue, ...props, variant: "outlined", children: options.map(({ label: optionLabel, ...others }) => /* @__PURE__ */ jsx(
|
|
89
|
+
StyledSelectOption,
|
|
90
|
+
{
|
|
91
|
+
...others,
|
|
92
|
+
...native && { as: "option" },
|
|
93
|
+
children: optionLabel
|
|
94
|
+
},
|
|
95
|
+
uuid()
|
|
96
|
+
)) })
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { Select as default };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
import '@emotion/styled';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import MuiMenuItem from '@mui/material/MenuItem';
|
|
6
|
+
import Select from '@mui/material/Select';
|
|
7
|
+
import { edgesStyles, sizeStyles, colorStyles, readOnlyStyles, disabledStyles } from './TextInput.styled.js';
|
|
8
|
+
import { getObjectProp } from '../utils/helpers/object.js';
|
|
9
|
+
|
|
10
|
+
const hoverStyles = css`
|
|
11
|
+
border-color: #1f1c4f;
|
|
12
|
+
`;
|
|
13
|
+
const focusStyles = ({ color, theme }) => css`
|
|
14
|
+
box-shadow: 0px 0px 6px 0px
|
|
15
|
+
${getObjectProp(theme, `vars.palette.${color}.main`)};
|
|
16
|
+
border-color: ${getObjectProp(theme, `vars.palette.${color}.main`)};
|
|
17
|
+
`;
|
|
18
|
+
const StyledPlaceholder = styled(
|
|
19
|
+
"span"
|
|
20
|
+
)`
|
|
21
|
+
${({ disabled, theme }) => css`
|
|
22
|
+
color: ${getObjectProp(theme, "vars.palette.grey.600")};
|
|
23
|
+
|
|
24
|
+
${disabled && `
|
|
25
|
+
color: ${getObjectProp(theme, "vars.palette.grey.600")};
|
|
26
|
+
`}
|
|
27
|
+
`}
|
|
28
|
+
`;
|
|
29
|
+
const StyledSelectValue = styled(
|
|
30
|
+
"span"
|
|
31
|
+
)`
|
|
32
|
+
${({ disabled, theme }) => css`
|
|
33
|
+
color: ${getObjectProp(theme, "vars.palette.text.primary")};
|
|
34
|
+
|
|
35
|
+
${disabled && `
|
|
36
|
+
color: ${getObjectProp(theme, "vars.palette.grey.600")};
|
|
37
|
+
`}
|
|
38
|
+
`}
|
|
39
|
+
`;
|
|
40
|
+
const StyledSelectOption = styled(
|
|
41
|
+
MuiMenuItem
|
|
42
|
+
)`
|
|
43
|
+
${({ theme }) => css`
|
|
44
|
+
color: ${getObjectProp(theme, "vars.palette.text.primary")};
|
|
45
|
+
`}
|
|
46
|
+
`;
|
|
47
|
+
const StyledSelect = styled(Select)`
|
|
48
|
+
${({ color, disabled, $edges, multiline, readOnly, size, theme }) => css`
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
color: ${getObjectProp(theme, "vars.palette.text.primary")};
|
|
51
|
+
${edgesStyles({ edges: $edges, theme })}
|
|
52
|
+
${sizeStyles({ size, multiline, theme })}
|
|
53
|
+
|
|
54
|
+
.MuiSvgIcon-root,
|
|
55
|
+
.MuiSelect-select {
|
|
56
|
+
z-index: 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.MuiSelect-select {
|
|
60
|
+
padding-left: 0px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.MuiNativeSelect-select {
|
|
64
|
+
padding-left: 0px;
|
|
65
|
+
padding-top: 0px;
|
|
66
|
+
padding-bottom: 0px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
fieldset {
|
|
70
|
+
${colorStyles({ color, theme })}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&&:hover fieldset {
|
|
74
|
+
${!disabled && !readOnly && hoverStyles}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&&.Mui-focused fieldset {
|
|
78
|
+
${!disabled && !readOnly && focusStyles({ color: color === "default" ? "info" : color, theme })}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&&.Mui-readOnly fieldset {
|
|
82
|
+
${!disabled && readOnly && readOnlyStyles({ theme })}
|
|
83
|
+
border: 1px solid ${getObjectProp(theme, "vars.palette.grey.600")};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&&.Mui-disabled {
|
|
87
|
+
color: ${getObjectProp(theme, "vars.palette.grey.600")};
|
|
88
|
+
fieldset {
|
|
89
|
+
${disabled && disabledStyles({ theme })}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`}
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
export { StyledPlaceholder, StyledSelectOption, StyledSelectValue, StyledSelect as default, focusStyles, hoverStyles };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import Skeleton$1 from '@mui/material/Skeleton';
|
|
4
|
+
|
|
5
|
+
function Skeleton({
|
|
6
|
+
animation = "pulse",
|
|
7
|
+
children = void 0,
|
|
8
|
+
light = false,
|
|
9
|
+
variant = "text",
|
|
10
|
+
...others
|
|
11
|
+
}) {
|
|
12
|
+
const rest = { animation, variant, ...others };
|
|
13
|
+
const styles = {
|
|
14
|
+
...light && { backgroundColor: "rgba(255, 255, 255, 0.13)" }
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ jsx(Skeleton$1, { ...rest, sx: styles, children });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Skeleton as default };
|