@tenancy.nz/feature-ui 1.0.0 → 1.0.1

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.
Files changed (39) hide show
  1. package/dist/cjs/components/AgentDetailsCard.cjs +55 -0
  2. package/dist/cjs/components/AnalyticsBox.cjs +58 -0
  3. package/dist/cjs/components/AnalyticsSection.cjs +209 -0
  4. package/dist/cjs/components/BookingChart.cjs +124 -0
  5. package/dist/cjs/components/BookingChart.styled.cjs +100 -0
  6. package/dist/cjs/components/BookingTable.cjs +44 -0
  7. package/dist/cjs/components/BookingTableRow.cjs +63 -0
  8. package/dist/cjs/components/BookingTableRow.styled.cjs +42 -0
  9. package/dist/cjs/components/BookingTableRowHeader.cjs +27 -0
  10. package/dist/cjs/components/BookingTableRowSkeleton.cjs +30 -0
  11. package/dist/cjs/components/CheckedIcon.cjs +17 -0
  12. package/dist/cjs/components/EnquiriesDoughnutChart.cjs +167 -0
  13. package/dist/cjs/components/GridList.cjs +87 -0
  14. package/dist/cjs/components/Hidden.cjs +15 -0
  15. package/dist/cjs/components/IconLabel.cjs +36 -0
  16. package/dist/cjs/components/NotesCard.cjs +39 -0
  17. package/dist/cjs/components/PropertyCard.cjs +137 -0
  18. package/dist/cjs/components/PropertyCard.styled.cjs +76 -0
  19. package/dist/cjs/index.cjs +36 -0
  20. package/dist/esm/components/AgentDetailsCard.js +51 -0
  21. package/dist/esm/components/AnalyticsBox.js +54 -0
  22. package/dist/esm/components/AnalyticsSection.js +205 -0
  23. package/dist/esm/components/BookingChart.js +120 -0
  24. package/dist/esm/components/BookingChart.styled.js +94 -0
  25. package/dist/esm/components/BookingTable.js +40 -0
  26. package/dist/esm/components/BookingTableRow.js +59 -0
  27. package/dist/esm/components/BookingTableRow.styled.js +40 -0
  28. package/dist/esm/components/BookingTableRowHeader.js +23 -0
  29. package/dist/esm/components/BookingTableRowSkeleton.js +26 -0
  30. package/dist/esm/components/CheckedIcon.js +13 -0
  31. package/dist/esm/components/EnquiriesDoughnutChart.js +163 -0
  32. package/dist/esm/components/GridList.js +83 -0
  33. package/dist/esm/components/Hidden.js +11 -0
  34. package/dist/esm/components/IconLabel.js +32 -0
  35. package/dist/esm/components/NotesCard.js +35 -0
  36. package/dist/esm/components/PropertyCard.js +133 -0
  37. package/dist/esm/components/PropertyCard.styled.js +72 -0
  38. package/dist/esm/index.js +16 -0
  39. package/package.json +5 -5
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ import { css } from '@emotion/react';
3
+ import styled from '@emotion/styled';
4
+
5
+ const StyledBookingTableRowCell = styled("div", {
6
+ shouldForwardProp: (prop) => prop !== "align"
7
+ })`
8
+ ${({ align = "left", header, theme }) => css`
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: ${header ? "center" : "flex-start"};
12
+ padding: 6px 12px;
13
+ font-size: ${header ? "12px" : "14px"};
14
+ color: #717680;
15
+ height: 100%;
16
+
17
+ ${align === "left" && `
18
+ align-items: flex-start;
19
+ `}
20
+
21
+ ${align === "center" && `
22
+ align-items: center;
23
+ text-align: center;
24
+ `}
25
+
26
+ ${align === "right" && `
27
+ align-items: flex-end;
28
+ `}
29
+
30
+ ${theme.breakpoints.up("md")} {
31
+ padding: 12px 24px;
32
+ }
33
+
34
+ @media print {
35
+ padding: 12px 24px;
36
+ }
37
+ `}
38
+ `;
39
+
40
+ export { StyledBookingTableRowCell };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Grid } from '@tenancy.nz/ui';
5
+ import { StyledBookingTableRowCell } from './BookingTableRow.styled.js';
6
+
7
+ function BookingTableRowHeader() {
8
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 0, children: [
9
+ /* @__PURE__ */ jsxs(Grid, { item: true, container: true, xs: 6, children: [
10
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { header: true, children: "Name" }) }),
11
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 6, md: 7, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { header: true, children: "Comments" }) }),
12
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, md: 2, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { header: true, children: "Status" }) })
13
+ ] }),
14
+ /* @__PURE__ */ jsxs(Grid, { item: true, container: true, xs: 6, children: [
15
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", header: true, children: "Attendend" }) }),
16
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", header: true, children: "Suitable" }) }),
17
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", header: true, children: "Application Sent" }) }),
18
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", header: true, children: "Application Received" }) })
19
+ ] })
20
+ ] });
21
+ }
22
+
23
+ export { BookingTableRowHeader as default };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Grid, Skeleton } from '@tenancy.nz/ui';
5
+ import { StyledBookingTableRowCell } from './BookingTableRow.styled.js';
6
+
7
+ function BookingTableRowSkeleton() {
8
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 0, children: [
9
+ /* @__PURE__ */ jsxs(Grid, { item: true, container: true, xs: 12, sm: 6, children: [
10
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { children: /* @__PURE__ */ jsx(Skeleton, { width: "85%", height: "20px", variant: "text" }) }) }),
11
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 6, md: 7, children: /* @__PURE__ */ jsxs(StyledBookingTableRowCell, { children: [
12
+ /* @__PURE__ */ jsx(Skeleton, { width: "95%", height: "20px", variant: "text" }),
13
+ /* @__PURE__ */ jsx(Skeleton, { width: "80%", height: "20px", variant: "text" })
14
+ ] }) }),
15
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 3, md: 2, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { children: /* @__PURE__ */ jsx(Skeleton, { width: "90px", height: "30px", variant: "text" }) }) })
16
+ ] }),
17
+ /* @__PURE__ */ jsxs(Grid, { item: true, container: true, xs: 12, sm: 6, children: [
18
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsx(Skeleton, { width: "40px", height: "20px", variant: "text" }) }) }),
19
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsx(Skeleton, { width: "40px", height: "20px", variant: "text" }) }) }),
20
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsx(Skeleton, { width: "40px", height: "20px", variant: "text" }) }) }),
21
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsx(StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsx(Skeleton, { width: "40px", height: "20px", variant: "text" }) }) })
22
+ ] })
23
+ ] });
24
+ }
25
+
26
+ export { BookingTableRowSkeleton as default };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { CircleCheckIcon, CircleTimesIcon } from '@tenancy.nz/icons';
5
+
6
+ function CheckedIcon({ value }) {
7
+ if (value === true) {
8
+ return /* @__PURE__ */ jsx(CircleCheckIcon, { color: "success.main", size: "20px" });
9
+ }
10
+ return /* @__PURE__ */ jsx(CircleTimesIcon, { color: "error.main", size: "20px" });
11
+ }
12
+
13
+ export { CheckedIcon as default };
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Box, Text } from '@tenancy.nz/ui';
5
+ import { Chart } from 'primereact/chart';
6
+
7
+ function EnquiriesDoughnutChart({
8
+ tradeMeEnquiriesCount = 0,
9
+ bookMeEnquiriesCount = 0,
10
+ manualEnquiryCount = 0
11
+ }) {
12
+ const colors = {
13
+ tradeMe: "#6FD3C0",
14
+ bookMe: "#00C0F3",
15
+ manual: "#394869"
16
+ };
17
+ const chartColors = [colors.tradeMe, colors.bookMe, colors.manual];
18
+ return /* @__PURE__ */ jsxs(Box, { position: "relative", display: "flex", height: "100%", align: "center", children: [
19
+ /* @__PURE__ */ jsx(
20
+ Text,
21
+ {
22
+ transform: "uppercase",
23
+ sx: { position: "absolute", left: 20, top: -10 },
24
+ fontSize: 13,
25
+ color: "textPrimary",
26
+ weight: "700",
27
+ children: "Number of enquiries"
28
+ }
29
+ ),
30
+ /* @__PURE__ */ jsx(Box, { width: "100%", overflow: "hidden", children: /* @__PURE__ */ jsx(
31
+ Chart,
32
+ {
33
+ type: "doughnut",
34
+ data: {
35
+ labels: ["TradeMe", "BookMe", "Manual"],
36
+ datasets: [
37
+ {
38
+ data: [
39
+ Math.max(tradeMeEnquiriesCount, 1e-3),
40
+ Math.max(bookMeEnquiriesCount, 1e-3),
41
+ Math.max(manualEnquiryCount, 1e-3)
42
+ ],
43
+ backgroundColor: chartColors,
44
+ hoverBackgroundColor: chartColors
45
+ }
46
+ ]
47
+ },
48
+ options: {
49
+ legend: {
50
+ display: false
51
+ },
52
+ animation: {
53
+ duration: 0
54
+ }
55
+ },
56
+ style: {
57
+ width: "100%",
58
+ position: "absolute",
59
+ top: "18%",
60
+ left: "-75px"
61
+ }
62
+ }
63
+ ) }),
64
+ /* @__PURE__ */ jsxs(
65
+ Box,
66
+ {
67
+ maxWidth: { xs: "160px", xl: "180px" },
68
+ width: "100%",
69
+ padding: "10px 20px",
70
+ mt: -4,
71
+ children: [
72
+ /* @__PURE__ */ jsxs(Box, { width: "100%", children: [
73
+ /* @__PURE__ */ jsx(Box, { height: "10px", backgroundColor: colors.tradeMe, width: "100%" }),
74
+ /* @__PURE__ */ jsxs(
75
+ Box,
76
+ {
77
+ display: "flex",
78
+ justify: "space-between",
79
+ width: "100%",
80
+ align: "flex-start",
81
+ mt: 2,
82
+ children: [
83
+ /* @__PURE__ */ jsx(Text, { transform: "uppercase", fontSize: 12, weight: "600", children: "TradeMe" }),
84
+ /* @__PURE__ */ jsx(
85
+ Text,
86
+ {
87
+ transform: "uppercase",
88
+ fontSize: 32,
89
+ weight: "700",
90
+ mt: -3,
91
+ color: "textPrimary",
92
+ children: tradeMeEnquiriesCount
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ )
98
+ ] }),
99
+ /* @__PURE__ */ jsxs(Box, { width: "100%", mt: "30px", children: [
100
+ /* @__PURE__ */ jsx(Box, { height: "10px", backgroundColor: colors.bookMe, width: "100%" }),
101
+ /* @__PURE__ */ jsxs(
102
+ Box,
103
+ {
104
+ display: "flex",
105
+ justify: "space-between",
106
+ width: "100%",
107
+ align: "flex-start",
108
+ mt: 2,
109
+ children: [
110
+ /* @__PURE__ */ jsx(Text, { transform: "uppercase", fontSize: 12, weight: "600", children: "Bookme" }),
111
+ /* @__PURE__ */ jsx(
112
+ Text,
113
+ {
114
+ transform: "uppercase",
115
+ fontSize: 32,
116
+ weight: "700",
117
+ mt: -3,
118
+ color: "textPrimary",
119
+ children: bookMeEnquiriesCount
120
+ }
121
+ )
122
+ ]
123
+ }
124
+ )
125
+ ] }),
126
+ /* @__PURE__ */ jsxs(Box, { width: "100%", mt: "30px", children: [
127
+ /* @__PURE__ */ jsx(Box, { height: "10px", backgroundColor: colors.manual, width: "100%" }),
128
+ /* @__PURE__ */ jsxs(
129
+ Box,
130
+ {
131
+ display: "flex",
132
+ justify: "space-between",
133
+ width: "100%",
134
+ align: "flex-start",
135
+ mt: 2,
136
+ children: [
137
+ /* @__PURE__ */ jsxs(Text, { transform: "uppercase", fontSize: 12, weight: "600", children: [
138
+ "Manually",
139
+ /* @__PURE__ */ jsx("br", {}),
140
+ "Generated"
141
+ ] }),
142
+ /* @__PURE__ */ jsx(
143
+ Text,
144
+ {
145
+ transform: "uppercase",
146
+ fontSize: 32,
147
+ weight: "700",
148
+ color: "textPrimary",
149
+ mt: -3,
150
+ children: manualEnquiryCount
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ )
156
+ ] })
157
+ ]
158
+ }
159
+ )
160
+ ] });
161
+ }
162
+
163
+ export { EnquiriesDoughnutChart as default };
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import { Grid, Box, Pagination, Select } from '@tenancy.nz/ui';
5
+ import Hidden from './Hidden.js';
6
+
7
+ function GridList({
8
+ items,
9
+ children,
10
+ renderItem,
11
+ headerComponent,
12
+ footerComponent,
13
+ spacing,
14
+ loading,
15
+ loadingComponent,
16
+ emptyComponent,
17
+ currentPage,
18
+ totalPages,
19
+ onChangePage,
20
+ showHeaderComponent,
21
+ resultsPerPage,
22
+ onChangeResultsPerPage,
23
+ perPage,
24
+ scrollTopOnChangePage,
25
+ ...rest
26
+ }) {
27
+ const gridContainerRef = React.useRef(null);
28
+ const childLen = React.Children.count(children);
29
+ const isChildren = childLen > 0;
30
+ let listLength = 0;
31
+ if (!isChildren) {
32
+ listLength = Array.isArray(items) ? items.length : 0;
33
+ } else {
34
+ listLength = childLen;
35
+ }
36
+ const isEmpty = listLength === 0;
37
+ React.useEffect(() => {
38
+ if (scrollTopOnChangePage && currentPage > 1 && !loading && gridContainerRef && gridContainerRef.current) {
39
+ gridContainerRef.current.scrollIntoView();
40
+ }
41
+ }, [currentPage, loading, gridContainerRef, scrollTopOnChangePage]);
42
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ showHeaderComponent && headerComponent,
44
+ loading && /* @__PURE__ */ jsx(Fragment, { children: loadingComponent }),
45
+ !loading && isEmpty && /* @__PURE__ */ jsx(Fragment, { children: emptyComponent }),
46
+ !loading && !isEmpty && /* @__PURE__ */ jsx("div", { ref: gridContainerRef, style: { width: "100%" }, children: /* @__PURE__ */ jsx(Grid, { container: true, ...rest, spacing, children: isChildren ? children : items.map(renderItem) }) }),
47
+ typeof onChangePage === "function" && /* @__PURE__ */ jsx(Hidden, { hide: isEmpty, children: /* @__PURE__ */ jsxs(
48
+ Box,
49
+ {
50
+ display: "flex",
51
+ justify: "center",
52
+ align: "center",
53
+ direction: "column",
54
+ marginTop: 12,
55
+ children: [
56
+ /* @__PURE__ */ jsx(
57
+ Pagination,
58
+ {
59
+ page: currentPage,
60
+ count: totalPages,
61
+ color: "textPrimary",
62
+ shape: "round",
63
+ size: "large",
64
+ onChange: onChangePage
65
+ }
66
+ ),
67
+ typeof onChangeResultsPerPage === "function" && /* @__PURE__ */ jsx(Box, { mt: 4, children: /* @__PURE__ */ jsx(
68
+ Select,
69
+ {
70
+ name: "gridListSelect",
71
+ value: perPage,
72
+ options: resultsPerPage,
73
+ onChange: onChangeResultsPerPage
74
+ }
75
+ ) })
76
+ ]
77
+ }
78
+ ) }),
79
+ footerComponent
80
+ ] });
81
+ }
82
+
83
+ export { GridList as default };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ import 'react';
3
+
4
+ function Hidden({ hide = false, children }) {
5
+ if (hide) {
6
+ return null;
7
+ }
8
+ return children;
9
+ }
10
+
11
+ export { Hidden as default };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Box } from '@tenancy.nz/ui';
5
+
6
+ function IconLabel({
7
+ children,
8
+ endIcon = void 0,
9
+ startIcon = void 0,
10
+ onClick = void 0,
11
+ ...rest
12
+ }) {
13
+ const iconLabel = /* @__PURE__ */ jsxs(Box, { align: "center", display: "inline-flex", ...rest, children: [
14
+ startIcon && /* @__PURE__ */ jsx(Box, { display: "inline-flex", color: "inherit", fontSize: "inherit", children: startIcon }),
15
+ children && /* @__PURE__ */ jsx(
16
+ Box,
17
+ {
18
+ display: "inline-flex",
19
+ color: "inherit",
20
+ fontSize: "inherit",
21
+ marginLeft: startIcon ? 1 : 0,
22
+ marginRight: endIcon ? 1 : 0,
23
+ fontWeight: "inherit",
24
+ children
25
+ }
26
+ ),
27
+ endIcon && /* @__PURE__ */ jsx(Box, { display: "inline-flex", color: "text.muted", marginLeft: 1, children: endIcon })
28
+ ] });
29
+ return /* @__PURE__ */ jsx(Fragment, { children: typeof onClick === "function" ? /* @__PURE__ */ jsx(Box, { onClick, children: iconLabel }) : iconLabel });
30
+ }
31
+
32
+ export { IconLabel as default };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Paper, Box, Skeleton, Text, Tag } from '@tenancy.nz/ui';
5
+
6
+ const tagMap = (name) => {
7
+ if (typeof name !== "string") {
8
+ return name;
9
+ }
10
+ if (name === "feedback") {
11
+ return /* @__PURE__ */ jsx(Tag, { color: "info", label: "Feedback" });
12
+ }
13
+ if (name === "maintenance") {
14
+ return /* @__PURE__ */ jsx(Tag, { color: "orange", label: "Maintenance" });
15
+ }
16
+ return name;
17
+ };
18
+ function NotesCard({
19
+ loading = false,
20
+ tag = void 0,
21
+ text = void 0,
22
+ ...rest
23
+ }) {
24
+ return /* @__PURE__ */ jsxs(Paper, { inset: "medium", sx: { minHeight: "100%" }, ...rest, children: [
25
+ /* @__PURE__ */ jsx(Box, { mb: "8px", mt: loading ? "-5px" : "0px", children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "114px", height: "30px", variant: "text" }) : tagMap(tag) }),
26
+ loading && /* @__PURE__ */ jsxs(Fragment, { children: [
27
+ /* @__PURE__ */ jsx(Skeleton, { width: "90%", height: "20px", variant: "text" }),
28
+ /* @__PURE__ */ jsx(Skeleton, { width: "80%", height: "20px", variant: "text" }),
29
+ /* @__PURE__ */ jsx(Skeleton, { width: "70%", height: "20px", variant: "text" })
30
+ ] }),
31
+ !loading && /* @__PURE__ */ jsx(Text, { variant: "body2", weight: "400", children: text })
32
+ ] });
33
+ }
34
+
35
+ export { NotesCard as default };
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import { Paper, Media, Box, Heading, Text } from '@tenancy.nz/ui';
5
+ import { Icon } from '@tenancy.nz/icons';
6
+ import IconLabel from './IconLabel.js';
7
+ import { StyledPropertyImage, StyledPropertyDetailsBox, StyledPropertyAmenitiesBox } from './PropertyCard.styled.js';
8
+
9
+ function PropertyCard({
10
+ address = void 0,
11
+ compact = false,
12
+ enquiriesCount = void 0,
13
+ imgSrc,
14
+ noOfBedrooms = void 0,
15
+ noOfBathrooms = void 0,
16
+ noOfCarparks = void 0,
17
+ rent = void 0,
18
+ viewingsCount = void 0,
19
+ ...rest
20
+ }) {
21
+ return /* @__PURE__ */ jsxs(
22
+ Paper,
23
+ {
24
+ overflow: false,
25
+ sx: {
26
+ display: "flex",
27
+ alignItems: "center"
28
+ },
29
+ ...rest,
30
+ children: [
31
+ /* @__PURE__ */ jsx(StyledPropertyImage, { children: /* @__PURE__ */ jsx(Media, { as: "img", title: address, src: imgSrc }) }),
32
+ /* @__PURE__ */ jsxs(StyledPropertyDetailsBox, { children: [
33
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Heading, { as: "h4", weight: "700", children: address }) }),
34
+ /* @__PURE__ */ jsxs(
35
+ Box,
36
+ {
37
+ sx: {
38
+ display: "flex",
39
+ alignItems: "center",
40
+ ml: { sm: "auto" },
41
+ mt: { xs: "10px", sm: 0 },
42
+ "@media print": {
43
+ ml: "auto"
44
+ }
45
+ },
46
+ children: [
47
+ /* @__PURE__ */ jsxs(StyledPropertyAmenitiesBox, { children: [
48
+ rent && /* @__PURE__ */ jsx(Heading, { as: "h4", weight: "700", children: rent }),
49
+ /* @__PURE__ */ jsxs(Box, { fontSize: "16px", children: [
50
+ noOfBedrooms && /* @__PURE__ */ jsx(
51
+ IconLabel,
52
+ {
53
+ color: "text.primary",
54
+ startIcon: /* @__PURE__ */ jsx(Icon, { size: 21, color: "inherit", name: "bed" }),
55
+ children: /* @__PURE__ */ jsx(Text, { as: "span", variant: "inherit", children: noOfBedrooms })
56
+ }
57
+ ),
58
+ noOfBathrooms && /* @__PURE__ */ jsx(
59
+ IconLabel,
60
+ {
61
+ color: "text.primary",
62
+ startIcon: /* @__PURE__ */ jsx(Icon, { size: 21, color: "inherit", name: "bath" }),
63
+ marginLeft: 3,
64
+ children: /* @__PURE__ */ jsx(Text, { as: "span", variant: "inherit", children: noOfBathrooms })
65
+ }
66
+ ),
67
+ noOfCarparks && /* @__PURE__ */ jsx(
68
+ IconLabel,
69
+ {
70
+ color: "text.primary",
71
+ startIcon: /* @__PURE__ */ jsx(Icon, { size: 21, color: "inherit", name: "car" }),
72
+ marginLeft: 3,
73
+ children: /* @__PURE__ */ jsx(Text, { as: "span", variant: "inherit", children: noOfCarparks })
74
+ }
75
+ )
76
+ ] })
77
+ ] }),
78
+ !compact && /* @__PURE__ */ jsxs(
79
+ Box,
80
+ {
81
+ paddingLeft: "25px",
82
+ borderLeft: "1px solid #00000040",
83
+ display: "flex",
84
+ direction: "column",
85
+ sx: {
86
+ gap: { xs: "18px", lg: "10px", xl: 0 },
87
+ justifyContent: "space-between"
88
+ },
89
+ children: [
90
+ viewingsCount && /* @__PURE__ */ jsxs(Box, { display: "flex", align: "center", gap: "12px", children: [
91
+ /* @__PURE__ */ jsx(Box, { minWidth: "87px", children: /* @__PURE__ */ jsx(
92
+ Text,
93
+ {
94
+ transform: "uppercase",
95
+ color: "textPrimary",
96
+ as: "span",
97
+ weight: "600",
98
+ align: "right",
99
+ lineHeight: "15px",
100
+ children: "Viewings"
101
+ }
102
+ ) }),
103
+ /* @__PURE__ */ jsx(Heading, { as: "h2", children: viewingsCount })
104
+ ] }),
105
+ enquiriesCount && /* @__PURE__ */ jsxs(Box, { display: "flex", align: "center", gap: "12px", children: [
106
+ /* @__PURE__ */ jsx(Box, { minWidth: "87px", children: /* @__PURE__ */ jsx(
107
+ Text,
108
+ {
109
+ transform: "uppercase",
110
+ color: "textPrimary",
111
+ as: "span",
112
+ weight: "600",
113
+ minWidth: "87px",
114
+ align: "right",
115
+ lineHeight: "15px",
116
+ children: "Enquiries"
117
+ }
118
+ ) }),
119
+ /* @__PURE__ */ jsx(Heading, { as: "h2", children: enquiriesCount })
120
+ ] })
121
+ ]
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ )
127
+ ] })
128
+ ]
129
+ }
130
+ );
131
+ }
132
+
133
+ export { PropertyCard as default };
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ import { css } from '@emotion/react';
3
+ import styled from '@emotion/styled';
4
+
5
+ const StyledPropertyImage = styled.figure`
6
+ padding: 0;
7
+ margin: 0;
8
+ width: 120px;
9
+ height: 95px;
10
+ flex: 0 0 95px;
11
+ overflow: hidden;
12
+
13
+ ${({ theme }) => css`
14
+ ${theme.breakpoints.down("sm")} {
15
+ display: none;
16
+ }
17
+
18
+ ${theme.breakpoints.up("sm")} {
19
+ width: 150px;
20
+ height: 135px;
21
+ flex: 0 0 150px;
22
+ }
23
+
24
+ @media print {
25
+ width: 150px;
26
+ height: 135px;
27
+ flex: 0 0 150px;
28
+ display: block;
29
+ }
30
+ `}
31
+ `;
32
+ const StyledPropertyDetailsBox = styled.div`
33
+ display: flex;
34
+ width: 100%;
35
+ align-items: flex-start;
36
+ padding: 16px 24px 16px 20px;
37
+ flex-direction: column;
38
+
39
+ ${({ theme }) => css`
40
+ ${theme.breakpoints.up("sm")} {
41
+ flex-direction: row;
42
+ align-items: center;
43
+ }
44
+ `}
45
+
46
+ @media print {
47
+ flex-direction: row;
48
+ align-items: center;
49
+ }
50
+ `;
51
+ const StyledPropertyAmenitiesBox = styled.div`
52
+ padding-right: 25px;
53
+ display: flex;
54
+ flex-direction: column;
55
+ margin-top: 5px;
56
+
57
+ gap: 18px;
58
+ min-width: 170px;
59
+ height: 100%;
60
+ justify-content: space-between;
61
+
62
+ ${({ theme }) => `
63
+ @media (min-width: ${theme.breakpoints.values.md}px) {
64
+ align-items: flex-end;
65
+ }
66
+ `}
67
+ @media print {
68
+ align-items: flex-end;
69
+ }
70
+ `;
71
+
72
+ export { StyledPropertyAmenitiesBox, StyledPropertyDetailsBox, StyledPropertyImage };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ export { default as AgentDetailsCard } from './components/AgentDetailsCard.js';
3
+ export { default as AnalyticsBox } from './components/AnalyticsBox.js';
4
+ export { default as AnalyticsSection } from './components/AnalyticsSection.js';
5
+ export { default as BookingChart } from './components/BookingChart.js';
6
+ export { default as BookingTable } from './components/BookingTable.js';
7
+ export { default as BookingTableRow } from './components/BookingTableRow.js';
8
+ export { default as BookingTableRowHeader } from './components/BookingTableRowHeader.js';
9
+ export { default as BookingTableRowSkeleton } from './components/BookingTableRowSkeleton.js';
10
+ export { default as CheckedIcon } from './components/CheckedIcon.js';
11
+ export { default as EnquiriesDoughnutChart } from './components/EnquiriesDoughnutChart.js';
12
+ export { default as GridList } from './components/GridList.js';
13
+ export { default as Hidden } from './components/Hidden.js';
14
+ export { default as IconLabel } from './components/IconLabel.js';
15
+ export { default as NotesCard } from './components/NotesCard.js';
16
+ export { default as PropertyCard } from './components/PropertyCard.js';