@tenancy.nz/tenant-ui 1.8.6 → 1.9.0
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.
|
@@ -33,12 +33,19 @@ function PropertyCard(_ref) {
|
|
|
33
33
|
orientation = _ref$orientation === void 0 ? "vertical" : _ref$orientation,
|
|
34
34
|
_ref$parkingSpaces = _ref.parkingSpaces,
|
|
35
35
|
parkingSpaces = _ref$parkingSpaces === void 0 ? void 0 : _ref$parkingSpaces,
|
|
36
|
-
_ref$
|
|
37
|
-
|
|
36
|
+
_ref$header = _ref.header,
|
|
37
|
+
header = _ref$header === void 0 ? void 0 : _ref$header,
|
|
38
38
|
_ref$photoSrc = _ref.photoSrc,
|
|
39
39
|
photoSrc = _ref$photoSrc === void 0 ? "" : _ref$photoSrc,
|
|
40
40
|
_ref$rent = _ref.rent,
|
|
41
41
|
rent = _ref$rent === void 0 ? "" : _ref$rent;
|
|
42
|
+
var footerSlot = footer && /* @__PURE__ */React.createElement(Stack, {
|
|
43
|
+
mt: "auto",
|
|
44
|
+
sx: {
|
|
45
|
+
borderTop: "1px solid",
|
|
46
|
+
borderTopColor: "grey.300"
|
|
47
|
+
}
|
|
48
|
+
}, footer);
|
|
42
49
|
return /* @__PURE__ */React.createElement(Stack, {
|
|
43
50
|
onClick: onClick,
|
|
44
51
|
sx: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
@@ -66,13 +73,20 @@ function PropertyCard(_ref) {
|
|
|
66
73
|
}), fullHeight && {
|
|
67
74
|
height: "100%"
|
|
68
75
|
})
|
|
69
|
-
}, /* @__PURE__ */React.createElement(
|
|
76
|
+
}, /* @__PURE__ */React.createElement(Stack, {
|
|
77
|
+
sx: {
|
|
78
|
+
width: "100%",
|
|
79
|
+
maxWidth: {
|
|
80
|
+
md: orientation === "horizontal" ? "308px" : "100%"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}, header, /* @__PURE__ */React.createElement(propertyCard_styled.StyledPropertyItemImgWrapper, {
|
|
70
84
|
orientation: orientation
|
|
71
|
-
},
|
|
85
|
+
}, photoSrc && /* @__PURE__ */React.createElement(ui.Media, {
|
|
72
86
|
src: photoSrc,
|
|
73
87
|
title: addressPart1,
|
|
74
88
|
as: "img"
|
|
75
|
-
})), /* @__PURE__ */React.createElement(Stack, {
|
|
89
|
+
})), orientation === "horizontal" && footerSlot), /* @__PURE__ */React.createElement(Stack, {
|
|
76
90
|
p: orientation === "vertical" ? 4 : {
|
|
77
91
|
xs: 4,
|
|
78
92
|
md: 8
|
|
@@ -108,18 +122,9 @@ function PropertyCard(_ref) {
|
|
|
108
122
|
}), rent && /* @__PURE__ */React.createElement(rentIconLabel.default, {
|
|
109
123
|
text: rent,
|
|
110
124
|
sx: {
|
|
111
|
-
ml:
|
|
112
|
-
xs: 2,
|
|
113
|
-
md: 4
|
|
114
|
-
}
|
|
125
|
+
ml: "auto"
|
|
115
126
|
}
|
|
116
|
-
}))),
|
|
117
|
-
sx: {
|
|
118
|
-
borderTop: "1px solid",
|
|
119
|
-
borderTopColor: "grey.300"
|
|
120
|
-
},
|
|
121
|
-
p: 4
|
|
122
|
-
}, footer)));
|
|
127
|
+
}))), orientation === "vertical" && footerSlot));
|
|
123
128
|
}
|
|
124
129
|
|
|
125
130
|
exports.default = PropertyCard;
|
|
@@ -10,7 +10,7 @@ var verticalStyles = function verticalStyles() {
|
|
|
10
10
|
};
|
|
11
11
|
var horizontalStyles = function horizontalStyles(_ref) {
|
|
12
12
|
var theme = _ref.theme;
|
|
13
|
-
return react.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", " {\n ", "\n }\n\n ", " {\n height: 220px;\n width: 100%;\n max-width:
|
|
13
|
+
return react.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", " {\n ", "\n }\n\n ", " {\n flex: 1;\n min-height: 220px;\n width: 100%;\n max-width: 308px;\n }\n"])), theme.breakpoints.down("md"), verticalStyles(), theme.breakpoints.up("md"));
|
|
14
14
|
};
|
|
15
15
|
var StyledPropertyItemImgWrapper = styled.figure(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
|
|
16
16
|
var orientation = _ref2.orientation,
|
|
@@ -29,12 +29,19 @@ function PropertyCard(_ref) {
|
|
|
29
29
|
orientation = _ref$orientation === void 0 ? "vertical" : _ref$orientation,
|
|
30
30
|
_ref$parkingSpaces = _ref.parkingSpaces,
|
|
31
31
|
parkingSpaces = _ref$parkingSpaces === void 0 ? void 0 : _ref$parkingSpaces,
|
|
32
|
-
_ref$
|
|
33
|
-
|
|
32
|
+
_ref$header = _ref.header,
|
|
33
|
+
header = _ref$header === void 0 ? void 0 : _ref$header,
|
|
34
34
|
_ref$photoSrc = _ref.photoSrc,
|
|
35
35
|
photoSrc = _ref$photoSrc === void 0 ? "" : _ref$photoSrc,
|
|
36
36
|
_ref$rent = _ref.rent,
|
|
37
37
|
rent = _ref$rent === void 0 ? "" : _ref$rent;
|
|
38
|
+
var footerSlot = footer && /* @__PURE__ */React.createElement(Stack, {
|
|
39
|
+
mt: "auto",
|
|
40
|
+
sx: {
|
|
41
|
+
borderTop: "1px solid",
|
|
42
|
+
borderTopColor: "grey.300"
|
|
43
|
+
}
|
|
44
|
+
}, footer);
|
|
38
45
|
return /* @__PURE__ */React.createElement(Stack, {
|
|
39
46
|
onClick: onClick,
|
|
40
47
|
sx: _objectSpread2(_objectSpread2({
|
|
@@ -62,13 +69,20 @@ function PropertyCard(_ref) {
|
|
|
62
69
|
}), fullHeight && {
|
|
63
70
|
height: "100%"
|
|
64
71
|
})
|
|
65
|
-
}, /* @__PURE__ */React.createElement(
|
|
72
|
+
}, /* @__PURE__ */React.createElement(Stack, {
|
|
73
|
+
sx: {
|
|
74
|
+
width: "100%",
|
|
75
|
+
maxWidth: {
|
|
76
|
+
md: orientation === "horizontal" ? "308px" : "100%"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, header, /* @__PURE__ */React.createElement(StyledPropertyItemImgWrapper, {
|
|
66
80
|
orientation: orientation
|
|
67
|
-
},
|
|
81
|
+
}, photoSrc && /* @__PURE__ */React.createElement(Media, {
|
|
68
82
|
src: photoSrc,
|
|
69
83
|
title: addressPart1,
|
|
70
84
|
as: "img"
|
|
71
|
-
})), /* @__PURE__ */React.createElement(Stack, {
|
|
85
|
+
})), orientation === "horizontal" && footerSlot), /* @__PURE__ */React.createElement(Stack, {
|
|
72
86
|
p: orientation === "vertical" ? 4 : {
|
|
73
87
|
xs: 4,
|
|
74
88
|
md: 8
|
|
@@ -104,18 +118,9 @@ function PropertyCard(_ref) {
|
|
|
104
118
|
}), rent && /* @__PURE__ */React.createElement(RentIconLabel, {
|
|
105
119
|
text: rent,
|
|
106
120
|
sx: {
|
|
107
|
-
ml:
|
|
108
|
-
xs: 2,
|
|
109
|
-
md: 4
|
|
110
|
-
}
|
|
121
|
+
ml: "auto"
|
|
111
122
|
}
|
|
112
|
-
}))),
|
|
113
|
-
sx: {
|
|
114
|
-
borderTop: "1px solid",
|
|
115
|
-
borderTopColor: "grey.300"
|
|
116
|
-
},
|
|
117
|
-
p: 4
|
|
118
|
-
}, footer)));
|
|
123
|
+
}))), orientation === "vertical" && footerSlot));
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
export { PropertyCard as default };
|
|
@@ -8,7 +8,7 @@ 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 height: 220px;\n width: 100%;\n max-width:
|
|
11
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", " {\n ", "\n }\n\n ", " {\n flex: 1;\n min-height: 220px;\n width: 100%;\n max-width: 308px;\n }\n"])), theme.breakpoints.down("md"), verticalStyles(), theme.breakpoints.up("md"));
|
|
12
12
|
};
|
|
13
13
|
var StyledPropertyItemImgWrapper = styled.figure(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
|
|
14
14
|
var orientation = _ref2.orientation,
|
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.
|
|
4
|
+
"version": "1.9.0",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/cjs/index.cjs",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@emotion/react": "^11.14.0",
|
|
15
15
|
"@emotion/styled": "^11.14.1",
|
|
16
|
-
"@mui/icons-material": "^7.2.0",
|
|
17
16
|
"@mui/material": "^7.3.1",
|
|
18
17
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
19
18
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
20
|
-
"@tenancy.nz/
|
|
19
|
+
"@tenancy.nz/icons": "1.9.0",
|
|
20
|
+
"@tenancy.nz/ui": "1.9.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@emotion/react": "^11.14.0",
|
|
24
24
|
"@emotion/styled": "^11.14.1",
|
|
25
|
-
"@mui/icons-material": "^7.2.0",
|
|
26
25
|
"@mui/material": "^7.3.1",
|
|
27
|
-
"@tenancy.nz/
|
|
26
|
+
"@tenancy.nz/icons": "1.9.0",
|
|
27
|
+
"@tenancy.nz/ui": "1.9.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"react-uid": "^2.4.0"
|