@tenancy.nz/tenant-ui 1.10.6 → 1.10.7
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/{property-attributes.cjs → PropertyAttributes.cjs} +5 -5
- package/dist/cjs/components/PropertyCard.cjs +93 -0
- package/dist/cjs/components/PropertyCardBanner.cjs +49 -0
- package/dist/cjs/components/{agency-logo.cjs → PropertyCardFooter.cjs} +14 -5
- package/dist/cjs/components/PropertyCardHeader.cjs +40 -0
- package/dist/cjs/components/PropertyCardImage.cjs +21 -0
- package/dist/cjs/components/{property-card.styled.cjs → PropertyCardImage.styled.cjs} +7 -3
- package/dist/cjs/components/{property-card-skeleton.cjs → PropertyCardSkeleton.cjs} +1 -0
- package/dist/cjs/components/PropertyOverviewCard.cjs +88 -0
- package/dist/cjs/components/{property-horizontal-card-skeleton.cjs → PropertyOverviewCardSkeleton.cjs} +8 -8
- package/dist/cjs/components/{rent-icon-label.cjs → RentIconLabel.cjs} +2 -2
- package/dist/cjs/index.cjs +22 -16
- package/dist/esm/components/{property-attributes.js → PropertyAttributes.js} +1 -1
- package/dist/esm/components/PropertyCard.js +89 -0
- package/dist/esm/components/PropertyCardBanner.js +45 -0
- package/dist/esm/components/{agency-logo.js → PropertyCardFooter.js} +14 -5
- package/dist/esm/components/PropertyCardHeader.js +36 -0
- package/dist/esm/components/PropertyCardImage.js +17 -0
- package/dist/esm/components/{property-card.styled.js → PropertyCardImage.styled.js} +7 -3
- package/dist/esm/components/{property-card-skeleton.js → PropertyCardSkeleton.js} +1 -0
- package/dist/esm/components/PropertyOverviewCard.js +84 -0
- package/dist/esm/components/{property-horizontal-card-skeleton.js → PropertyOverviewCardSkeleton.js} +8 -8
- package/dist/esm/components/{rent-icon-label.js → RentIconLabel.js} +1 -1
- package/dist/esm/index.js +11 -8
- package/package.json +5 -5
- package/dist/cjs/components/property-card.cjs +0 -108
- package/dist/cjs/components/property-horizontal-card.cjs +0 -96
- package/dist/esm/components/property-card.js +0 -104
- package/dist/esm/components/property-horizontal-card.js +0 -92
- /package/dist/cjs/components/{icon-label.cjs → IconLabel.cjs} +0 -0
- /package/dist/esm/components/{icon-label.js → IconLabel.js} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { token, Box, Tag } from '@tenancy.nz/ui';
|
|
4
|
+
|
|
5
|
+
var _excluded = ["label", "emphasis", "sx"];
|
|
6
|
+
var base = {
|
|
7
|
+
display: "flex",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
px: 2,
|
|
10
|
+
py: 1
|
|
11
|
+
};
|
|
12
|
+
var styles = {
|
|
13
|
+
subtle: _objectSpread2(_objectSpread2({}, base), {}, {
|
|
14
|
+
bgcolor: token("palette.component.tag.backgroundGrey")
|
|
15
|
+
}),
|
|
16
|
+
primary: _objectSpread2(_objectSpread2({}, base), {}, {
|
|
17
|
+
bgcolor: token("palette.component.tag.backgroundPrimary"),
|
|
18
|
+
color: token("palette.component.tag.textWhite")
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
var tagColors = {
|
|
22
|
+
subtle: "gray",
|
|
23
|
+
primary: "inherit"
|
|
24
|
+
};
|
|
25
|
+
function PropertyCardBanner(_ref) {
|
|
26
|
+
var label = _ref.label,
|
|
27
|
+
_ref$emphasis = _ref.emphasis,
|
|
28
|
+
emphasis = _ref$emphasis === void 0 ? "subtle" : _ref$emphasis,
|
|
29
|
+
_ref$sx = _ref.sx,
|
|
30
|
+
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
if (!label) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
36
|
+
sx: _objectSpread2(_objectSpread2({}, sx), styles[emphasis])
|
|
37
|
+
}, /* @__PURE__ */React.createElement(Tag, _objectSpread2({
|
|
38
|
+
color: tagColors[emphasis],
|
|
39
|
+
label: label,
|
|
40
|
+
variant: "text",
|
|
41
|
+
size: "large"
|
|
42
|
+
}, rest)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { PropertyCardBanner as default };
|
|
@@ -2,8 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import Stack from '@mui/material/Stack';
|
|
3
3
|
import { Text } from '@tenancy.nz/ui';
|
|
4
4
|
|
|
5
|
-
function
|
|
6
|
-
var
|
|
5
|
+
function PropertyCardFooter(_ref) {
|
|
6
|
+
var _ref$action = _ref.action,
|
|
7
|
+
action = _ref$action === void 0 ? void 0 : _ref$action,
|
|
8
|
+
src = _ref.src,
|
|
7
9
|
_ref$title = _ref.title,
|
|
8
10
|
title = _ref$title === void 0 ? void 0 : _ref$title,
|
|
9
11
|
_ref$subtitle = _ref.subtitle,
|
|
@@ -31,7 +33,10 @@ function AgencyLogo(_ref) {
|
|
|
31
33
|
}, /* @__PURE__ */React.createElement("img", {
|
|
32
34
|
src: src,
|
|
33
35
|
alt: "Logo"
|
|
34
|
-
})), /* @__PURE__ */React.createElement(Stack,
|
|
36
|
+
})), /* @__PURE__ */React.createElement(Stack, {
|
|
37
|
+
flex: 1,
|
|
38
|
+
minWidth: 0
|
|
39
|
+
}, title && /* @__PURE__ */React.createElement(Text, {
|
|
35
40
|
weight: "500",
|
|
36
41
|
variant: "body2",
|
|
37
42
|
color: "textPrimary"
|
|
@@ -42,7 +47,11 @@ function AgencyLogo(_ref) {
|
|
|
42
47
|
sx: {
|
|
43
48
|
fontSize: "12px"
|
|
44
49
|
}
|
|
45
|
-
}, subtitle))
|
|
50
|
+
}, subtitle)), action && /* @__PURE__ */React.createElement(Stack, {
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
ml: "auto",
|
|
53
|
+
alignItems: "flex-end"
|
|
54
|
+
}, action));
|
|
46
55
|
}
|
|
47
56
|
|
|
48
|
-
export {
|
|
57
|
+
export { PropertyCardFooter as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Stack from '@mui/material/Stack';
|
|
3
|
+
import { Heading, Text } from '@tenancy.nz/ui';
|
|
4
|
+
|
|
5
|
+
function PropertyCardHeader(_ref) {
|
|
6
|
+
var _ref$action = _ref.action,
|
|
7
|
+
action = _ref$action === void 0 ? void 0 : _ref$action,
|
|
8
|
+
_ref$title = _ref.title,
|
|
9
|
+
title = _ref$title === void 0 ? "" : _ref$title,
|
|
10
|
+
_ref$subtitle = _ref.subtitle,
|
|
11
|
+
subtitle = _ref$subtitle === void 0 ? "" : _ref$subtitle;
|
|
12
|
+
return /* @__PURE__ */React.createElement(Stack, {
|
|
13
|
+
direction: "row",
|
|
14
|
+
gap: 4,
|
|
15
|
+
alignItems: "center"
|
|
16
|
+
}, /* @__PURE__ */React.createElement(Stack, {
|
|
17
|
+
gap: 2,
|
|
18
|
+
flex: 1,
|
|
19
|
+
minWidth: 0
|
|
20
|
+
}, /* @__PURE__ */React.createElement(Heading, {
|
|
21
|
+
as: "h4",
|
|
22
|
+
color: "primary"
|
|
23
|
+
}, title), /* @__PURE__ */React.createElement(Text, {
|
|
24
|
+
sx: {
|
|
25
|
+
fontSize: "12px"
|
|
26
|
+
},
|
|
27
|
+
weight: "500",
|
|
28
|
+
color: "secondary"
|
|
29
|
+
}, subtitle)), action && /* @__PURE__ */React.createElement(Stack, {
|
|
30
|
+
flexShrink: 0,
|
|
31
|
+
ml: "auto",
|
|
32
|
+
alignItems: "flex-end"
|
|
33
|
+
}, action));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { PropertyCardHeader as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Media } from '@tenancy.nz/ui';
|
|
4
|
+
|
|
5
|
+
var _excluded = ["src"];
|
|
6
|
+
function PropertyCardImage(_ref) {
|
|
7
|
+
var _ref$src = _ref.src,
|
|
8
|
+
src = _ref$src === void 0 ? "" : _ref$src,
|
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
return /* @__PURE__ */React.createElement(Media, _objectSpread2(_objectSpread2({
|
|
11
|
+
as: "img"
|
|
12
|
+
}, rest), {}, {
|
|
13
|
+
src: src
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { PropertyCardImage as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
2
|
import { css } from '@emotion/react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
4
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
6
6
|
var verticalStyles = function verticalStyles() {
|
|
@@ -8,9 +8,13 @@ var verticalStyles = function verticalStyles() {
|
|
|
8
8
|
};
|
|
9
9
|
var horizontalStyles = function horizontalStyles(_ref) {
|
|
10
10
|
var theme = _ref.theme;
|
|
11
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", " {\n ", "\n }\n\n ", " {\n flex: 1;\n min-height:
|
|
11
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", " {\n ", "\n }\n\n ", " {\n flex: 1;\n min-height: 118px;\n width: 100%;\n max-width: 180px;\n\n > * {\n position: absolute;\n inset: 0;\n }\n }\n"])), theme.breakpoints.down("md"), verticalStyles(), theme.breakpoints.up("md"));
|
|
12
12
|
};
|
|
13
|
-
var StyledPropertyItemImgWrapper = styled
|
|
13
|
+
var StyledPropertyItemImgWrapper = styled("figure", {
|
|
14
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
15
|
+
return prop !== "orientation";
|
|
16
|
+
}
|
|
17
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
|
|
14
18
|
var orientation = _ref2.orientation,
|
|
15
19
|
theme = _ref2.theme;
|
|
16
20
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #ebebeb;\n background-image:\n linear-gradient(45deg, #fff 25%, transparent 25%),\n linear-gradient(-45deg, #fff 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, #fff 75%),\n linear-gradient(-45deg, transparent 75%, #fff 75%);\n background-size: 40px 40px;\n background-position:\n 0 0,\n 0 20px,\n 20px -20px,\n -20px 0px;\n margin: 0;\n padding: 0;\n overflow: hidden;\n position: relative;\n\n ", "\n ", "\n "])), orientation === "horizontal" && horizontalStyles({
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Stack from '@mui/material/Stack';
|
|
4
|
+
import { ClickBox, Paper, token } from '@tenancy.nz/ui';
|
|
5
|
+
import PropertyCardHeader from './PropertyCardHeader.js';
|
|
6
|
+
import PropertyCardImage from './PropertyCardImage.js';
|
|
7
|
+
import { StyledPropertyItemImgWrapper } from './PropertyCardImage.styled.js';
|
|
8
|
+
|
|
9
|
+
function PropertyOverviewCard(_ref) {
|
|
10
|
+
var _slots$image, _footerProps$sx;
|
|
11
|
+
var _ref$action = _ref.action,
|
|
12
|
+
action = _ref$action === void 0 ? void 0 : _ref$action,
|
|
13
|
+
_ref$addressPart = _ref.addressPart1,
|
|
14
|
+
addressPart1 = _ref$addressPart === void 0 ? "" : _ref$addressPart,
|
|
15
|
+
_ref$addressPart2 = _ref.addressPart2,
|
|
16
|
+
addressPart2 = _ref$addressPart2 === void 0 ? "" : _ref$addressPart2,
|
|
17
|
+
_ref$content = _ref.content,
|
|
18
|
+
content = _ref$content === void 0 ? void 0 : _ref$content,
|
|
19
|
+
_ref$fullHeight = _ref.fullHeight,
|
|
20
|
+
fullHeight = _ref$fullHeight === void 0 ? true : _ref$fullHeight,
|
|
21
|
+
_ref$onClick = _ref.onClick,
|
|
22
|
+
onClick = _ref$onClick === void 0 ? void 0 : _ref$onClick,
|
|
23
|
+
_ref$slots = _ref.slots,
|
|
24
|
+
slots = _ref$slots === void 0 ? {} : _ref$slots,
|
|
25
|
+
_ref$slotProps = _ref.slotProps,
|
|
26
|
+
slotProps = _ref$slotProps === void 0 ? {} : _ref$slotProps;
|
|
27
|
+
var Image = (_slots$image = slots.image) !== null && _slots$image !== void 0 ? _slots$image : PropertyCardImage;
|
|
28
|
+
var imageProps = slotProps.image;
|
|
29
|
+
var hasImage = Boolean(slots.image || (imageProps === null || imageProps === void 0 ? void 0 : imageProps.src));
|
|
30
|
+
var HeaderBanner = slots.headerBanner;
|
|
31
|
+
var headerBannerProps = slotProps.headerBanner;
|
|
32
|
+
var FooterBanner = slots.footerBanner;
|
|
33
|
+
var footerBannerProps = slotProps.footerBanner;
|
|
34
|
+
var Footer = slots.footer;
|
|
35
|
+
var footerProps = slotProps.footer;
|
|
36
|
+
var footerSx = (_footerProps$sx = footerProps === null || footerProps === void 0 ? void 0 : footerProps.sx) !== null && _footerProps$sx !== void 0 ? _footerProps$sx : {};
|
|
37
|
+
return /* @__PURE__ */React.createElement(ClickBox, {
|
|
38
|
+
onClick: onClick,
|
|
39
|
+
sx: _objectSpread2({}, fullHeight && {
|
|
40
|
+
height: "100%"
|
|
41
|
+
})
|
|
42
|
+
}, /* @__PURE__ */React.createElement(Paper, {
|
|
43
|
+
overflow: false,
|
|
44
|
+
fill: fullHeight,
|
|
45
|
+
outlined: true,
|
|
46
|
+
stack: true,
|
|
47
|
+
sx: {
|
|
48
|
+
flexDirection: {
|
|
49
|
+
xs: "column",
|
|
50
|
+
md: "row"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, /* @__PURE__ */React.createElement(Stack, {
|
|
54
|
+
sx: {
|
|
55
|
+
width: "100%",
|
|
56
|
+
maxWidth: {
|
|
57
|
+
md: "180px"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, HeaderBanner && /* @__PURE__ */React.createElement(HeaderBanner, _objectSpread2({}, headerBannerProps)), /* @__PURE__ */React.createElement(StyledPropertyItemImgWrapper, {
|
|
61
|
+
orientation: "horizontal"
|
|
62
|
+
}, hasImage && /* @__PURE__ */React.createElement(Image, _objectSpread2({}, imageProps))), FooterBanner && /* @__PURE__ */React.createElement(FooterBanner, _objectSpread2(_objectSpread2({}, footerBannerProps), {}, {
|
|
63
|
+
sx: {
|
|
64
|
+
borderTop: "1px solid ".concat(token("palette.semantic.border.subtleColor"))
|
|
65
|
+
}
|
|
66
|
+
}))), /* @__PURE__ */React.createElement(Stack, {
|
|
67
|
+
p: 4,
|
|
68
|
+
position: "relative",
|
|
69
|
+
gap: 4,
|
|
70
|
+
flex: 1
|
|
71
|
+
}, /* @__PURE__ */React.createElement(PropertyCardHeader, {
|
|
72
|
+
title: addressPart1,
|
|
73
|
+
subtitle: addressPart2,
|
|
74
|
+
action: action
|
|
75
|
+
}), content && /* @__PURE__ */React.createElement(Stack, {
|
|
76
|
+
alignItems: "flex-start"
|
|
77
|
+
}, content), Footer && /* @__PURE__ */React.createElement(Footer, _objectSpread2(_objectSpread2({}, footerProps), {}, {
|
|
78
|
+
sx: _objectSpread2({
|
|
79
|
+
mt: "auto"
|
|
80
|
+
}, footerSx)
|
|
81
|
+
})))));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { PropertyOverviewCard as default };
|
package/dist/esm/components/{property-horizontal-card-skeleton.js → PropertyOverviewCardSkeleton.js}
RENAMED
|
@@ -12,15 +12,15 @@ function PropertyHorizontalCardSkeleton(_ref) {
|
|
|
12
12
|
})
|
|
13
13
|
}, /* @__PURE__ */React.createElement(Paper, {
|
|
14
14
|
overflow: false,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
fill: fullHeight,
|
|
16
|
+
outlined: true,
|
|
17
|
+
stack: true,
|
|
18
|
+
sx: {
|
|
17
19
|
flexDirection: {
|
|
18
20
|
xs: "column",
|
|
19
21
|
md: "row"
|
|
20
22
|
}
|
|
21
|
-
}
|
|
22
|
-
height: "100%"
|
|
23
|
-
})
|
|
23
|
+
}
|
|
24
24
|
}, /* @__PURE__ */React.createElement(Stack, {
|
|
25
25
|
sx: {
|
|
26
26
|
width: "100%",
|
|
@@ -34,10 +34,10 @@ function PropertyHorizontalCardSkeleton(_ref) {
|
|
|
34
34
|
width: "100%",
|
|
35
35
|
height: {
|
|
36
36
|
xs: "220px",
|
|
37
|
-
md: "
|
|
37
|
+
md: "118px"
|
|
38
38
|
},
|
|
39
39
|
minHeight: {
|
|
40
|
-
md: "
|
|
40
|
+
md: "118px"
|
|
41
41
|
},
|
|
42
42
|
flex: {
|
|
43
43
|
md: 1
|
|
@@ -63,7 +63,7 @@ function PropertyHorizontalCardSkeleton(_ref) {
|
|
|
63
63
|
pt: 4
|
|
64
64
|
}, /* @__PURE__ */React.createElement(Skeleton, {
|
|
65
65
|
variant: "text",
|
|
66
|
-
width: "
|
|
66
|
+
width: "118px",
|
|
67
67
|
height: 40
|
|
68
68
|
})))));
|
|
69
69
|
}
|
|
@@ -2,7 +2,7 @@ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import DollarCircleIcon from '@tenancy.nz/icons/DollarCircle';
|
|
4
4
|
import { token } from '@tenancy.nz/ui';
|
|
5
|
-
import IconLabel from './
|
|
5
|
+
import IconLabel from './IconLabel.js';
|
|
6
6
|
|
|
7
7
|
var _excluded = ["text"];
|
|
8
8
|
function RentIconLabel(_ref) {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
1
|
+
export { default as IconLabel } from './components/IconLabel.js';
|
|
2
|
+
export { default as PropertyAttributes } from './components/PropertyAttributes.js';
|
|
3
|
+
export { default as PropertyCard } from './components/PropertyCard.js';
|
|
4
|
+
export { default as PropertyCardBanner } from './components/PropertyCardBanner.js';
|
|
5
|
+
export { default as PropertyCardFooter } from './components/PropertyCardFooter.js';
|
|
6
|
+
export { default as PropertyCardHeader } from './components/PropertyCardHeader.js';
|
|
7
|
+
export { default as PropertyCardImage } from './components/PropertyCardImage.js';
|
|
8
|
+
export { default as PropertyCardSkeleton } from './components/PropertyCardSkeleton.js';
|
|
9
|
+
export { default as PropertyHorizontalCard } from './components/PropertyOverviewCard.js';
|
|
10
|
+
export { default as PropertyHorizontalCardSkeleton } from './components/PropertyOverviewCardSkeleton.js';
|
|
11
|
+
export { default as RentIconLabel } from './components/RentIconLabel.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenancy.nz/tenant-ui",
|
|
3
3
|
"description": "React UI tenant components.",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.7",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/cjs/index.cjs",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"@mui/material": "^7.3.1",
|
|
17
17
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
18
18
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
19
|
-
"@tenancy.nz/
|
|
20
|
-
"@tenancy.nz/
|
|
19
|
+
"@tenancy.nz/icons": "1.10.7",
|
|
20
|
+
"@tenancy.nz/ui": "1.10.7"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@emotion/react": "^11.14.0",
|
|
24
24
|
"@emotion/styled": "^11.14.1",
|
|
25
25
|
"@mui/material": "^7.3.1",
|
|
26
|
-
"@tenancy.nz/icons": "1.10.
|
|
27
|
-
"@tenancy.nz/ui": "1.10.
|
|
26
|
+
"@tenancy.nz/icons": "1.10.7",
|
|
27
|
+
"@tenancy.nz/ui": "1.10.7"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"react-uid": "^2.4.0"
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var Stack = require('@mui/material/Stack');
|
|
8
|
-
var ui = require('@tenancy.nz/ui');
|
|
9
|
-
var propertyAttributes = require('./property-attributes.cjs');
|
|
10
|
-
var rentIconLabel = require('./rent-icon-label.cjs');
|
|
11
|
-
var propertyCard_styled = require('./property-card.styled.cjs');
|
|
12
|
-
|
|
13
|
-
function PropertyCard(_ref) {
|
|
14
|
-
var _ref$action = _ref.action,
|
|
15
|
-
action = _ref$action === void 0 ? void 0 : _ref$action,
|
|
16
|
-
_ref$addressPart = _ref.addressPart1,
|
|
17
|
-
addressPart1 = _ref$addressPart === void 0 ? "" : _ref$addressPart,
|
|
18
|
-
_ref$addressPart2 = _ref.addressPart2,
|
|
19
|
-
addressPart2 = _ref$addressPart2 === void 0 ? "" : _ref$addressPart2,
|
|
20
|
-
_ref$bedrooms = _ref.bedrooms,
|
|
21
|
-
bedrooms = _ref$bedrooms === void 0 ? void 0 : _ref$bedrooms,
|
|
22
|
-
_ref$bathrooms = _ref.bathrooms,
|
|
23
|
-
bathrooms = _ref$bathrooms === void 0 ? void 0 : _ref$bathrooms,
|
|
24
|
-
_ref$content = _ref.content,
|
|
25
|
-
content = _ref$content === void 0 ? void 0 : _ref$content,
|
|
26
|
-
_ref$footer = _ref.footer,
|
|
27
|
-
footer = _ref$footer === void 0 ? void 0 : _ref$footer,
|
|
28
|
-
_ref$fullHeight = _ref.fullHeight,
|
|
29
|
-
fullHeight = _ref$fullHeight === void 0 ? true : _ref$fullHeight,
|
|
30
|
-
_ref$onClick = _ref.onClick,
|
|
31
|
-
onClick = _ref$onClick === void 0 ? void 0 : _ref$onClick,
|
|
32
|
-
_ref$parkingSpaces = _ref.parkingSpaces,
|
|
33
|
-
parkingSpaces = _ref$parkingSpaces === void 0 ? void 0 : _ref$parkingSpaces,
|
|
34
|
-
_ref$header = _ref.header,
|
|
35
|
-
header = _ref$header === void 0 ? void 0 : _ref$header,
|
|
36
|
-
_ref$photoSrc = _ref.photoSrc,
|
|
37
|
-
photoSrc = _ref$photoSrc === void 0 ? "" : _ref$photoSrc,
|
|
38
|
-
_ref$rent = _ref.rent,
|
|
39
|
-
rent = _ref$rent === void 0 ? "" : _ref$rent;
|
|
40
|
-
return /* @__PURE__ */React.createElement(Stack, {
|
|
41
|
-
onClick: onClick,
|
|
42
|
-
sx: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
43
|
-
transition: "all 0.25s ease-out",
|
|
44
|
-
cursor: "default"
|
|
45
|
-
}, fullHeight && {
|
|
46
|
-
height: "100%"
|
|
47
|
-
}), typeof onClick === "function" && {
|
|
48
|
-
cursor: "pointer",
|
|
49
|
-
"&:hover": {
|
|
50
|
-
transform: "translateY(-6px)"
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
}, /* @__PURE__ */React.createElement(ui.Paper, {
|
|
54
|
-
overflow: false,
|
|
55
|
-
sx: _rollupPluginBabelHelpers.objectSpread2({
|
|
56
|
-
display: "flex",
|
|
57
|
-
flexDirection: "column"
|
|
58
|
-
}, fullHeight && {
|
|
59
|
-
height: "100%"
|
|
60
|
-
})
|
|
61
|
-
}, /* @__PURE__ */React.createElement(Stack, {
|
|
62
|
-
sx: {
|
|
63
|
-
width: "100%",
|
|
64
|
-
maxWidth: {
|
|
65
|
-
md: "100%"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}, header, /* @__PURE__ */React.createElement(propertyCard_styled.StyledPropertyItemImgWrapper, {
|
|
69
|
-
orientation: "vertical"
|
|
70
|
-
}, photoSrc && /* @__PURE__ */React.createElement(ui.Media, {
|
|
71
|
-
src: photoSrc,
|
|
72
|
-
title: addressPart1,
|
|
73
|
-
as: "img"
|
|
74
|
-
}))), /* @__PURE__ */React.createElement(Stack, {
|
|
75
|
-
p: 4,
|
|
76
|
-
position: "relative",
|
|
77
|
-
gap: 4,
|
|
78
|
-
flex: 1
|
|
79
|
-
}, /* @__PURE__ */React.createElement(Stack, {
|
|
80
|
-
gap: 2
|
|
81
|
-
}, /* @__PURE__ */React.createElement(ui.Heading, {
|
|
82
|
-
as: "h4",
|
|
83
|
-
color: "primary"
|
|
84
|
-
}, addressPart1), /* @__PURE__ */React.createElement(ui.Text, {
|
|
85
|
-
sx: {
|
|
86
|
-
fontSize: "12px"
|
|
87
|
-
},
|
|
88
|
-
weight: "500",
|
|
89
|
-
color: "secondary"
|
|
90
|
-
}, addressPart2)), rent && /* @__PURE__ */React.createElement(rentIconLabel.default, {
|
|
91
|
-
text: rent
|
|
92
|
-
}), /* @__PURE__ */React.createElement(propertyAttributes.default, {
|
|
93
|
-
noOfBedrooms: bedrooms,
|
|
94
|
-
noOfBathrooms: bathrooms,
|
|
95
|
-
noOfCarparks: parkingSpaces
|
|
96
|
-
}), (content || action) && /* @__PURE__ */React.createElement(Stack, {
|
|
97
|
-
direction: "row",
|
|
98
|
-
gap: 2,
|
|
99
|
-
alignItems: "center"
|
|
100
|
-
}, content && /* @__PURE__ */React.createElement(Stack, {
|
|
101
|
-
alignItems: "flex-start"
|
|
102
|
-
}, content), action && /* @__PURE__ */React.createElement(Stack, {
|
|
103
|
-
ml: "auto",
|
|
104
|
-
flexShrink: 0
|
|
105
|
-
}, action))), footer));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
exports.default = PropertyCard;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var Stack = require('@mui/material/Stack');
|
|
8
|
-
var ui = require('@tenancy.nz/ui');
|
|
9
|
-
var propertyCard_styled = require('./property-card.styled.cjs');
|
|
10
|
-
|
|
11
|
-
function PropertyHorizontalCard(_ref) {
|
|
12
|
-
var _ref$action = _ref.action,
|
|
13
|
-
action = _ref$action === void 0 ? void 0 : _ref$action,
|
|
14
|
-
_ref$addressPart = _ref.addressPart1,
|
|
15
|
-
addressPart1 = _ref$addressPart === void 0 ? "" : _ref$addressPart,
|
|
16
|
-
_ref$addressPart2 = _ref.addressPart2,
|
|
17
|
-
addressPart2 = _ref$addressPart2 === void 0 ? "" : _ref$addressPart2,
|
|
18
|
-
_ref$content = _ref.content,
|
|
19
|
-
content = _ref$content === void 0 ? void 0 : _ref$content,
|
|
20
|
-
_ref$footer = _ref.footer,
|
|
21
|
-
footer = _ref$footer === void 0 ? void 0 : _ref$footer,
|
|
22
|
-
_ref$fullHeight = _ref.fullHeight,
|
|
23
|
-
fullHeight = _ref$fullHeight === void 0 ? true : _ref$fullHeight,
|
|
24
|
-
_ref$onClick = _ref.onClick,
|
|
25
|
-
onClick = _ref$onClick === void 0 ? void 0 : _ref$onClick,
|
|
26
|
-
_ref$header = _ref.header,
|
|
27
|
-
header = _ref$header === void 0 ? void 0 : _ref$header,
|
|
28
|
-
_ref$photoSrc = _ref.photoSrc,
|
|
29
|
-
photoSrc = _ref$photoSrc === void 0 ? "" : _ref$photoSrc;
|
|
30
|
-
return /* @__PURE__ */React.createElement(Stack, {
|
|
31
|
-
onClick: onClick,
|
|
32
|
-
sx: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
33
|
-
transition: "all 0.25s ease-out",
|
|
34
|
-
cursor: "default"
|
|
35
|
-
}, fullHeight && {
|
|
36
|
-
height: "100%"
|
|
37
|
-
}), typeof onClick === "function" && {
|
|
38
|
-
cursor: "pointer",
|
|
39
|
-
"&:hover": {
|
|
40
|
-
transform: "translateY(-6px)"
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
}, /* @__PURE__ */React.createElement(ui.Paper, {
|
|
44
|
-
overflow: false,
|
|
45
|
-
sx: _rollupPluginBabelHelpers.objectSpread2({
|
|
46
|
-
display: "flex",
|
|
47
|
-
flexDirection: {
|
|
48
|
-
xs: "column",
|
|
49
|
-
md: "row"
|
|
50
|
-
}
|
|
51
|
-
}, fullHeight && {
|
|
52
|
-
height: "100%"
|
|
53
|
-
})
|
|
54
|
-
}, /* @__PURE__ */React.createElement(Stack, {
|
|
55
|
-
sx: {
|
|
56
|
-
width: "100%",
|
|
57
|
-
maxWidth: {
|
|
58
|
-
md: "180px"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, header, /* @__PURE__ */React.createElement(propertyCard_styled.StyledPropertyItemImgWrapper, {
|
|
62
|
-
orientation: "horizontal"
|
|
63
|
-
}, photoSrc && /* @__PURE__ */React.createElement(ui.Media, {
|
|
64
|
-
src: photoSrc,
|
|
65
|
-
title: addressPart1,
|
|
66
|
-
as: "img"
|
|
67
|
-
}))), /* @__PURE__ */React.createElement(Stack, {
|
|
68
|
-
p: 4,
|
|
69
|
-
position: "relative",
|
|
70
|
-
gap: 4,
|
|
71
|
-
flex: 1
|
|
72
|
-
}, /* @__PURE__ */React.createElement(Stack, {
|
|
73
|
-
gap: 2
|
|
74
|
-
}, /* @__PURE__ */React.createElement(ui.Heading, {
|
|
75
|
-
as: "h4",
|
|
76
|
-
color: "primary"
|
|
77
|
-
}, addressPart1), /* @__PURE__ */React.createElement(ui.Text, {
|
|
78
|
-
sx: {
|
|
79
|
-
fontSize: "12px"
|
|
80
|
-
},
|
|
81
|
-
weight: "500",
|
|
82
|
-
color: "secondary"
|
|
83
|
-
}, addressPart2)), content && /* @__PURE__ */React.createElement(Stack, {
|
|
84
|
-
alignItems: "flex-start"
|
|
85
|
-
}, content), (footer || action) && /* @__PURE__ */React.createElement(Stack, {
|
|
86
|
-
direction: "row",
|
|
87
|
-
gap: 2,
|
|
88
|
-
alignItems: "center",
|
|
89
|
-
mt: "auto"
|
|
90
|
-
}, footer, action && /* @__PURE__ */React.createElement(Stack, {
|
|
91
|
-
ml: "auto",
|
|
92
|
-
flexShrink: 0
|
|
93
|
-
}, action)))));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
exports.default = PropertyHorizontalCard;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Stack from '@mui/material/Stack';
|
|
4
|
-
import { Paper, Media, Heading, Text } from '@tenancy.nz/ui';
|
|
5
|
-
import PropertyAttributes from './property-attributes.js';
|
|
6
|
-
import RentIconLabel from './rent-icon-label.js';
|
|
7
|
-
import { StyledPropertyItemImgWrapper } from './property-card.styled.js';
|
|
8
|
-
|
|
9
|
-
function PropertyCard(_ref) {
|
|
10
|
-
var _ref$action = _ref.action,
|
|
11
|
-
action = _ref$action === void 0 ? void 0 : _ref$action,
|
|
12
|
-
_ref$addressPart = _ref.addressPart1,
|
|
13
|
-
addressPart1 = _ref$addressPart === void 0 ? "" : _ref$addressPart,
|
|
14
|
-
_ref$addressPart2 = _ref.addressPart2,
|
|
15
|
-
addressPart2 = _ref$addressPart2 === void 0 ? "" : _ref$addressPart2,
|
|
16
|
-
_ref$bedrooms = _ref.bedrooms,
|
|
17
|
-
bedrooms = _ref$bedrooms === void 0 ? void 0 : _ref$bedrooms,
|
|
18
|
-
_ref$bathrooms = _ref.bathrooms,
|
|
19
|
-
bathrooms = _ref$bathrooms === void 0 ? void 0 : _ref$bathrooms,
|
|
20
|
-
_ref$content = _ref.content,
|
|
21
|
-
content = _ref$content === void 0 ? void 0 : _ref$content,
|
|
22
|
-
_ref$footer = _ref.footer,
|
|
23
|
-
footer = _ref$footer === void 0 ? void 0 : _ref$footer,
|
|
24
|
-
_ref$fullHeight = _ref.fullHeight,
|
|
25
|
-
fullHeight = _ref$fullHeight === void 0 ? true : _ref$fullHeight,
|
|
26
|
-
_ref$onClick = _ref.onClick,
|
|
27
|
-
onClick = _ref$onClick === void 0 ? void 0 : _ref$onClick,
|
|
28
|
-
_ref$parkingSpaces = _ref.parkingSpaces,
|
|
29
|
-
parkingSpaces = _ref$parkingSpaces === void 0 ? void 0 : _ref$parkingSpaces,
|
|
30
|
-
_ref$header = _ref.header,
|
|
31
|
-
header = _ref$header === void 0 ? void 0 : _ref$header,
|
|
32
|
-
_ref$photoSrc = _ref.photoSrc,
|
|
33
|
-
photoSrc = _ref$photoSrc === void 0 ? "" : _ref$photoSrc,
|
|
34
|
-
_ref$rent = _ref.rent,
|
|
35
|
-
rent = _ref$rent === void 0 ? "" : _ref$rent;
|
|
36
|
-
return /* @__PURE__ */React.createElement(Stack, {
|
|
37
|
-
onClick: onClick,
|
|
38
|
-
sx: _objectSpread2(_objectSpread2({
|
|
39
|
-
transition: "all 0.25s ease-out",
|
|
40
|
-
cursor: "default"
|
|
41
|
-
}, fullHeight && {
|
|
42
|
-
height: "100%"
|
|
43
|
-
}), typeof onClick === "function" && {
|
|
44
|
-
cursor: "pointer",
|
|
45
|
-
"&:hover": {
|
|
46
|
-
transform: "translateY(-6px)"
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
}, /* @__PURE__ */React.createElement(Paper, {
|
|
50
|
-
overflow: false,
|
|
51
|
-
sx: _objectSpread2({
|
|
52
|
-
display: "flex",
|
|
53
|
-
flexDirection: "column"
|
|
54
|
-
}, fullHeight && {
|
|
55
|
-
height: "100%"
|
|
56
|
-
})
|
|
57
|
-
}, /* @__PURE__ */React.createElement(Stack, {
|
|
58
|
-
sx: {
|
|
59
|
-
width: "100%",
|
|
60
|
-
maxWidth: {
|
|
61
|
-
md: "100%"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}, header, /* @__PURE__ */React.createElement(StyledPropertyItemImgWrapper, {
|
|
65
|
-
orientation: "vertical"
|
|
66
|
-
}, photoSrc && /* @__PURE__ */React.createElement(Media, {
|
|
67
|
-
src: photoSrc,
|
|
68
|
-
title: addressPart1,
|
|
69
|
-
as: "img"
|
|
70
|
-
}))), /* @__PURE__ */React.createElement(Stack, {
|
|
71
|
-
p: 4,
|
|
72
|
-
position: "relative",
|
|
73
|
-
gap: 4,
|
|
74
|
-
flex: 1
|
|
75
|
-
}, /* @__PURE__ */React.createElement(Stack, {
|
|
76
|
-
gap: 2
|
|
77
|
-
}, /* @__PURE__ */React.createElement(Heading, {
|
|
78
|
-
as: "h4",
|
|
79
|
-
color: "primary"
|
|
80
|
-
}, addressPart1), /* @__PURE__ */React.createElement(Text, {
|
|
81
|
-
sx: {
|
|
82
|
-
fontSize: "12px"
|
|
83
|
-
},
|
|
84
|
-
weight: "500",
|
|
85
|
-
color: "secondary"
|
|
86
|
-
}, addressPart2)), rent && /* @__PURE__ */React.createElement(RentIconLabel, {
|
|
87
|
-
text: rent
|
|
88
|
-
}), /* @__PURE__ */React.createElement(PropertyAttributes, {
|
|
89
|
-
noOfBedrooms: bedrooms,
|
|
90
|
-
noOfBathrooms: bathrooms,
|
|
91
|
-
noOfCarparks: parkingSpaces
|
|
92
|
-
}), (content || action) && /* @__PURE__ */React.createElement(Stack, {
|
|
93
|
-
direction: "row",
|
|
94
|
-
gap: 2,
|
|
95
|
-
alignItems: "center"
|
|
96
|
-
}, content && /* @__PURE__ */React.createElement(Stack, {
|
|
97
|
-
alignItems: "flex-start"
|
|
98
|
-
}, content), action && /* @__PURE__ */React.createElement(Stack, {
|
|
99
|
-
ml: "auto",
|
|
100
|
-
flexShrink: 0
|
|
101
|
-
}, action))), footer));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export { PropertyCard as default };
|