@tenancy.nz/tenant-ui 1.8.7 → 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.
|
@@ -39,6 +39,13 @@ function PropertyCard(_ref) {
|
|
|
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({
|
|
@@ -68,7 +75,10 @@ function PropertyCard(_ref) {
|
|
|
68
75
|
})
|
|
69
76
|
}, /* @__PURE__ */React.createElement(Stack, {
|
|
70
77
|
sx: {
|
|
71
|
-
|
|
78
|
+
width: "100%",
|
|
79
|
+
maxWidth: {
|
|
80
|
+
md: orientation === "horizontal" ? "308px" : "100%"
|
|
81
|
+
}
|
|
72
82
|
}
|
|
73
83
|
}, header, /* @__PURE__ */React.createElement(propertyCard_styled.StyledPropertyItemImgWrapper, {
|
|
74
84
|
orientation: orientation
|
|
@@ -76,7 +86,7 @@ function PropertyCard(_ref) {
|
|
|
76
86
|
src: photoSrc,
|
|
77
87
|
title: addressPart1,
|
|
78
88
|
as: "img"
|
|
79
|
-
}))), /* @__PURE__ */React.createElement(Stack, {
|
|
89
|
+
})), orientation === "horizontal" && footerSlot), /* @__PURE__ */React.createElement(Stack, {
|
|
80
90
|
p: orientation === "vertical" ? 4 : {
|
|
81
91
|
xs: 4,
|
|
82
92
|
md: 8
|
|
@@ -112,18 +122,9 @@ function PropertyCard(_ref) {
|
|
|
112
122
|
}), rent && /* @__PURE__ */React.createElement(rentIconLabel.default, {
|
|
113
123
|
text: rent,
|
|
114
124
|
sx: {
|
|
115
|
-
ml:
|
|
116
|
-
xs: 2,
|
|
117
|
-
md: 4
|
|
118
|
-
}
|
|
125
|
+
ml: "auto"
|
|
119
126
|
}
|
|
120
|
-
}))),
|
|
121
|
-
sx: {
|
|
122
|
-
borderTop: "1px solid",
|
|
123
|
-
borderTopColor: "grey.300"
|
|
124
|
-
},
|
|
125
|
-
p: 4
|
|
126
|
-
}, footer)));
|
|
127
|
+
}))), orientation === "vertical" && footerSlot));
|
|
127
128
|
}
|
|
128
129
|
|
|
129
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,
|
|
@@ -35,6 +35,13 @@ function PropertyCard(_ref) {
|
|
|
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({
|
|
@@ -64,7 +71,10 @@ function PropertyCard(_ref) {
|
|
|
64
71
|
})
|
|
65
72
|
}, /* @__PURE__ */React.createElement(Stack, {
|
|
66
73
|
sx: {
|
|
67
|
-
|
|
74
|
+
width: "100%",
|
|
75
|
+
maxWidth: {
|
|
76
|
+
md: orientation === "horizontal" ? "308px" : "100%"
|
|
77
|
+
}
|
|
68
78
|
}
|
|
69
79
|
}, header, /* @__PURE__ */React.createElement(StyledPropertyItemImgWrapper, {
|
|
70
80
|
orientation: orientation
|
|
@@ -72,7 +82,7 @@ function PropertyCard(_ref) {
|
|
|
72
82
|
src: photoSrc,
|
|
73
83
|
title: addressPart1,
|
|
74
84
|
as: "img"
|
|
75
|
-
}))), /* @__PURE__ */React.createElement(Stack, {
|
|
85
|
+
})), orientation === "horizontal" && footerSlot), /* @__PURE__ */React.createElement(Stack, {
|
|
76
86
|
p: orientation === "vertical" ? 4 : {
|
|
77
87
|
xs: 4,
|
|
78
88
|
md: 8
|
|
@@ -108,18 +118,9 @@ function PropertyCard(_ref) {
|
|
|
108
118
|
}), rent && /* @__PURE__ */React.createElement(RentIconLabel, {
|
|
109
119
|
text: rent,
|
|
110
120
|
sx: {
|
|
111
|
-
ml:
|
|
112
|
-
xs: 2,
|
|
113
|
-
md: 4
|
|
114
|
-
}
|
|
121
|
+
ml: "auto"
|
|
115
122
|
}
|
|
116
|
-
}))),
|
|
117
|
-
sx: {
|
|
118
|
-
borderTop: "1px solid",
|
|
119
|
-
borderTopColor: "grey.300"
|
|
120
|
-
},
|
|
121
|
-
p: 4
|
|
122
|
-
}, footer)));
|
|
123
|
+
}))), orientation === "vertical" && footerSlot));
|
|
123
124
|
}
|
|
124
125
|
|
|
125
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"
|