@tenancy.nz/feature-ui 1.0.1 → 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.
Files changed (39) hide show
  1. package/dist/cjs/_virtual/_rollupPluginBabelHelpers.cjs +134 -0
  2. package/dist/cjs/components/AgentDetailsCard.cjs +80 -42
  3. package/dist/cjs/components/AnalyticsBox.cjs +46 -46
  4. package/dist/cjs/components/AnalyticsSection.cjs +148 -196
  5. package/dist/cjs/components/BookingChart.cjs +96 -94
  6. package/dist/cjs/components/BookingChart.styled.cjs +32 -86
  7. package/dist/cjs/components/BookingTable.cjs +39 -30
  8. package/dist/cjs/components/BookingTableRow.cjs +90 -46
  9. package/dist/cjs/components/BookingTableRow.styled.cjs +13 -34
  10. package/dist/cjs/components/BookingTableRowHeader.cjs +54 -15
  11. package/dist/cjs/components/BookingTableRowSkeleton.cjs +85 -18
  12. package/dist/cjs/components/CheckedIcon.cjs +11 -5
  13. package/dist/cjs/components/EnquiriesDoughnutChart.cjs +128 -151
  14. package/dist/cjs/components/GridList.cjs +59 -66
  15. package/dist/cjs/components/Hidden.cjs +4 -1
  16. package/dist/cjs/components/IconLabel.cjs +34 -26
  17. package/dist/cjs/components/NotesCard.cjs +48 -20
  18. package/dist/cjs/components/PropertyCard.cjs +130 -122
  19. package/dist/cjs/components/PropertyCard.styled.cjs +14 -66
  20. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +120 -0
  21. package/dist/esm/components/AgentDetailsCard.js +80 -42
  22. package/dist/esm/components/AnalyticsBox.js +46 -46
  23. package/dist/esm/components/AnalyticsSection.js +148 -196
  24. package/dist/esm/components/BookingChart.js +97 -95
  25. package/dist/esm/components/BookingChart.styled.js +32 -86
  26. package/dist/esm/components/BookingTable.js +39 -30
  27. package/dist/esm/components/BookingTableRow.js +90 -46
  28. package/dist/esm/components/BookingTableRow.styled.js +13 -34
  29. package/dist/esm/components/BookingTableRowHeader.js +54 -15
  30. package/dist/esm/components/BookingTableRowSkeleton.js +85 -18
  31. package/dist/esm/components/CheckedIcon.js +11 -5
  32. package/dist/esm/components/EnquiriesDoughnutChart.js +128 -151
  33. package/dist/esm/components/GridList.js +59 -66
  34. package/dist/esm/components/Hidden.js +4 -1
  35. package/dist/esm/components/IconLabel.js +34 -26
  36. package/dist/esm/components/NotesCard.js +48 -20
  37. package/dist/esm/components/PropertyCard.js +130 -122
  38. package/dist/esm/components/PropertyCard.styled.js +14 -66
  39. package/package.json +5 -5
@@ -3,135 +3,143 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var jsxRuntime = require('react/jsx-runtime');
7
- require('react');
6
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
7
+ var React = require('react');
8
8
  var ui = require('@tenancy.nz/ui');
9
9
  var icons = require('@tenancy.nz/icons');
10
10
  var IconLabel = require('./IconLabel.cjs');
11
11
  var PropertyCard_styled = require('./PropertyCard.styled.cjs');
12
12
 
13
- function PropertyCard({
14
- address = void 0,
15
- compact = false,
16
- enquiriesCount = void 0,
17
- imgSrc,
18
- noOfBedrooms = void 0,
19
- noOfBathrooms = void 0,
20
- noOfCarparks = void 0,
21
- rent = void 0,
22
- viewingsCount = void 0,
23
- ...rest
24
- }) {
25
- return /* @__PURE__ */ jsxRuntime.jsxs(
26
- ui.Paper,
27
- {
28
- overflow: false,
29
- sx: {
30
- display: "flex",
31
- alignItems: "center"
13
+ var _excluded = ["address", "compact", "enquiriesCount", "imgSrc", "noOfBedrooms", "noOfBathrooms", "noOfCarparks", "rent", "viewingsCount"];
14
+ function PropertyCard(_ref) {
15
+ var _ref$address = _ref.address,
16
+ address = _ref$address === void 0 ? void 0 : _ref$address,
17
+ _ref$compact = _ref.compact,
18
+ compact = _ref$compact === void 0 ? false : _ref$compact,
19
+ _ref$enquiriesCount = _ref.enquiriesCount,
20
+ enquiriesCount = _ref$enquiriesCount === void 0 ? void 0 : _ref$enquiriesCount,
21
+ imgSrc = _ref.imgSrc,
22
+ _ref$noOfBedrooms = _ref.noOfBedrooms,
23
+ noOfBedrooms = _ref$noOfBedrooms === void 0 ? void 0 : _ref$noOfBedrooms,
24
+ _ref$noOfBathrooms = _ref.noOfBathrooms,
25
+ noOfBathrooms = _ref$noOfBathrooms === void 0 ? void 0 : _ref$noOfBathrooms,
26
+ _ref$noOfCarparks = _ref.noOfCarparks,
27
+ noOfCarparks = _ref$noOfCarparks === void 0 ? void 0 : _ref$noOfCarparks,
28
+ _ref$rent = _ref.rent,
29
+ rent = _ref$rent === void 0 ? void 0 : _ref$rent,
30
+ _ref$viewingsCount = _ref.viewingsCount,
31
+ viewingsCount = _ref$viewingsCount === void 0 ? void 0 : _ref$viewingsCount,
32
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
33
+ return /* @__PURE__ */React.createElement(ui.Paper, _rollupPluginBabelHelpers.objectSpread2({
34
+ overflow: false,
35
+ sx: {
36
+ display: "flex",
37
+ alignItems: "center"
38
+ }
39
+ }, rest), /* @__PURE__ */React.createElement(PropertyCard_styled.StyledPropertyImage, null, /* @__PURE__ */React.createElement(ui.Media, {
40
+ as: "img",
41
+ title: address,
42
+ src: imgSrc
43
+ })), /* @__PURE__ */React.createElement(PropertyCard_styled.StyledPropertyDetailsBox, null, /* @__PURE__ */React.createElement(ui.Box, null, /* @__PURE__ */React.createElement(ui.Heading, {
44
+ as: "h4",
45
+ weight: "700"
46
+ }, address)), /* @__PURE__ */React.createElement(ui.Box, {
47
+ sx: {
48
+ display: "flex",
49
+ alignItems: "center",
50
+ ml: {
51
+ sm: "auto"
52
+ },
53
+ mt: {
54
+ xs: "10px",
55
+ sm: 0
56
+ },
57
+ "@media print": {
58
+ ml: "auto"
59
+ }
60
+ }
61
+ }, /* @__PURE__ */React.createElement(PropertyCard_styled.StyledPropertyAmenitiesBox, null, rent && /* @__PURE__ */React.createElement(ui.Heading, {
62
+ as: "h4",
63
+ weight: "700"
64
+ }, rent), /* @__PURE__ */React.createElement(ui.Box, {
65
+ fontSize: "16px"
66
+ }, noOfBedrooms && /* @__PURE__ */React.createElement(IconLabel.default, {
67
+ color: "text.primary",
68
+ startIcon: /* @__PURE__ */React.createElement(icons.Icon, {
69
+ size: 21,
70
+ color: "inherit",
71
+ name: "bed"
72
+ })
73
+ }, /* @__PURE__ */React.createElement(ui.Text, {
74
+ as: "span",
75
+ variant: "inherit"
76
+ }, noOfBedrooms)), noOfBathrooms && /* @__PURE__ */React.createElement(IconLabel.default, {
77
+ color: "text.primary",
78
+ startIcon: /* @__PURE__ */React.createElement(icons.Icon, {
79
+ size: 21,
80
+ color: "inherit",
81
+ name: "bath"
82
+ }),
83
+ marginLeft: 3
84
+ }, /* @__PURE__ */React.createElement(ui.Text, {
85
+ as: "span",
86
+ variant: "inherit"
87
+ }, noOfBathrooms)), noOfCarparks && /* @__PURE__ */React.createElement(IconLabel.default, {
88
+ color: "text.primary",
89
+ startIcon: /* @__PURE__ */React.createElement(icons.Icon, {
90
+ size: 21,
91
+ color: "inherit",
92
+ name: "car"
93
+ }),
94
+ marginLeft: 3
95
+ }, /* @__PURE__ */React.createElement(ui.Text, {
96
+ as: "span",
97
+ variant: "inherit"
98
+ }, noOfCarparks)))), !compact && /* @__PURE__ */React.createElement(ui.Box, {
99
+ paddingLeft: "25px",
100
+ borderLeft: "1px solid #00000040",
101
+ display: "flex",
102
+ direction: "column",
103
+ sx: {
104
+ gap: {
105
+ xs: "18px",
106
+ lg: "10px",
107
+ xl: 0
32
108
  },
33
- ...rest,
34
- children: [
35
- /* @__PURE__ */ jsxRuntime.jsx(PropertyCard_styled.StyledPropertyImage, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Media, { as: "img", title: address, src: imgSrc }) }),
36
- /* @__PURE__ */ jsxRuntime.jsxs(PropertyCard_styled.StyledPropertyDetailsBox, { children: [
37
- /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { as: "h4", weight: "700", children: address }) }),
38
- /* @__PURE__ */ jsxRuntime.jsxs(
39
- ui.Box,
40
- {
41
- sx: {
42
- display: "flex",
43
- alignItems: "center",
44
- ml: { sm: "auto" },
45
- mt: { xs: "10px", sm: 0 },
46
- "@media print": {
47
- ml: "auto"
48
- }
49
- },
50
- children: [
51
- /* @__PURE__ */ jsxRuntime.jsxs(PropertyCard_styled.StyledPropertyAmenitiesBox, { children: [
52
- rent && /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { as: "h4", weight: "700", children: rent }),
53
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { fontSize: "16px", children: [
54
- noOfBedrooms && /* @__PURE__ */ jsxRuntime.jsx(
55
- IconLabel.default,
56
- {
57
- color: "text.primary",
58
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Icon, { size: 21, color: "inherit", name: "bed" }),
59
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "span", variant: "inherit", children: noOfBedrooms })
60
- }
61
- ),
62
- noOfBathrooms && /* @__PURE__ */ jsxRuntime.jsx(
63
- IconLabel.default,
64
- {
65
- color: "text.primary",
66
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Icon, { size: 21, color: "inherit", name: "bath" }),
67
- marginLeft: 3,
68
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "span", variant: "inherit", children: noOfBathrooms })
69
- }
70
- ),
71
- noOfCarparks && /* @__PURE__ */ jsxRuntime.jsx(
72
- IconLabel.default,
73
- {
74
- color: "text.primary",
75
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Icon, { size: 21, color: "inherit", name: "car" }),
76
- marginLeft: 3,
77
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "span", variant: "inherit", children: noOfCarparks })
78
- }
79
- )
80
- ] })
81
- ] }),
82
- !compact && /* @__PURE__ */ jsxRuntime.jsxs(
83
- ui.Box,
84
- {
85
- paddingLeft: "25px",
86
- borderLeft: "1px solid #00000040",
87
- display: "flex",
88
- direction: "column",
89
- sx: {
90
- gap: { xs: "18px", lg: "10px", xl: 0 },
91
- justifyContent: "space-between"
92
- },
93
- children: [
94
- viewingsCount && /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { display: "flex", align: "center", gap: "12px", children: [
95
- /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { minWidth: "87px", children: /* @__PURE__ */ jsxRuntime.jsx(
96
- ui.Text,
97
- {
98
- transform: "uppercase",
99
- color: "textPrimary",
100
- as: "span",
101
- weight: "600",
102
- align: "right",
103
- lineHeight: "15px",
104
- children: "Viewings"
105
- }
106
- ) }),
107
- /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { as: "h2", children: viewingsCount })
108
- ] }),
109
- enquiriesCount && /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { display: "flex", align: "center", gap: "12px", children: [
110
- /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { minWidth: "87px", children: /* @__PURE__ */ jsxRuntime.jsx(
111
- ui.Text,
112
- {
113
- transform: "uppercase",
114
- color: "textPrimary",
115
- as: "span",
116
- weight: "600",
117
- minWidth: "87px",
118
- align: "right",
119
- lineHeight: "15px",
120
- children: "Enquiries"
121
- }
122
- ) }),
123
- /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { as: "h2", children: enquiriesCount })
124
- ] })
125
- ]
126
- }
127
- )
128
- ]
129
- }
130
- )
131
- ] })
132
- ]
109
+ justifyContent: "space-between"
133
110
  }
134
- );
111
+ }, viewingsCount && /* @__PURE__ */React.createElement(ui.Box, {
112
+ display: "flex",
113
+ align: "center",
114
+ gap: "12px"
115
+ }, /* @__PURE__ */React.createElement(ui.Box, {
116
+ minWidth: "87px"
117
+ }, /* @__PURE__ */React.createElement(ui.Text, {
118
+ transform: "uppercase",
119
+ color: "textPrimary",
120
+ as: "span",
121
+ weight: "600",
122
+ align: "right",
123
+ lineHeight: "15px"
124
+ }, "Viewings")), /* @__PURE__ */React.createElement(ui.Heading, {
125
+ as: "h2"
126
+ }, viewingsCount)), enquiriesCount && /* @__PURE__ */React.createElement(ui.Box, {
127
+ display: "flex",
128
+ align: "center",
129
+ gap: "12px"
130
+ }, /* @__PURE__ */React.createElement(ui.Box, {
131
+ minWidth: "87px"
132
+ }, /* @__PURE__ */React.createElement(ui.Text, {
133
+ transform: "uppercase",
134
+ color: "textPrimary",
135
+ as: "span",
136
+ weight: "600",
137
+ minWidth: "87px",
138
+ align: "right",
139
+ lineHeight: "15px"
140
+ }, "Enquiries")), /* @__PURE__ */React.createElement(ui.Heading, {
141
+ as: "h2"
142
+ }, enquiriesCount))))));
135
143
  }
136
144
 
137
145
  exports.default = PropertyCard;
@@ -1,75 +1,23 @@
1
1
  "use strict";
2
2
  'use strict';
3
3
 
4
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
4
5
  var react = require('@emotion/react');
5
6
  var styled = require('@emotion/styled');
6
7
 
7
- const StyledPropertyImage = styled.figure`
8
- padding: 0;
9
- margin: 0;
10
- width: 120px;
11
- height: 95px;
12
- flex: 0 0 95px;
13
- overflow: hidden;
14
-
15
- ${({ theme }) => react.css`
16
- ${theme.breakpoints.down("sm")} {
17
- display: none;
18
- }
19
-
20
- ${theme.breakpoints.up("sm")} {
21
- width: 150px;
22
- height: 135px;
23
- flex: 0 0 150px;
24
- }
25
-
26
- @media print {
27
- width: 150px;
28
- height: 135px;
29
- flex: 0 0 150px;
30
- display: block;
31
- }
32
- `}
33
- `;
34
- const StyledPropertyDetailsBox = styled.div`
35
- display: flex;
36
- width: 100%;
37
- align-items: flex-start;
38
- padding: 16px 24px 16px 20px;
39
- flex-direction: column;
40
-
41
- ${({ theme }) => react.css`
42
- ${theme.breakpoints.up("sm")} {
43
- flex-direction: row;
44
- align-items: center;
45
- }
46
- `}
47
-
48
- @media print {
49
- flex-direction: row;
50
- align-items: center;
51
- }
52
- `;
53
- const StyledPropertyAmenitiesBox = styled.div`
54
- padding-right: 25px;
55
- display: flex;
56
- flex-direction: column;
57
- margin-top: 5px;
58
-
59
- gap: 18px;
60
- min-width: 170px;
61
- height: 100%;
62
- justify-content: space-between;
63
-
64
- ${({ theme }) => `
65
- @media (min-width: ${theme.breakpoints.values.md}px) {
66
- align-items: flex-end;
67
- }
68
- `}
69
- @media print {
70
- align-items: flex-end;
71
- }
72
- `;
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
9
+ var StyledPropertyImage = styled.figure(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n width: 120px;\n height: 95px;\n flex: 0 0 95px;\n overflow: hidden;\n\n ", "\n"])), function (_ref) {
10
+ var theme = _ref.theme;
11
+ return react.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", " {\n display: none;\n }\n\n ", " {\n width: 150px;\n height: 135px;\n flex: 0 0 150px;\n }\n\n @media print {\n width: 150px;\n height: 135px;\n flex: 0 0 150px;\n display: block;\n }\n "])), theme.breakpoints.down("sm"), theme.breakpoints.up("sm"));
12
+ });
13
+ var StyledPropertyDetailsBox = styled.div(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n align-items: flex-start;\n padding: 16px 24px 16px 20px;\n flex-direction: column;\n\n ", "\n\n @media print {\n flex-direction: row;\n align-items: center;\n }\n"])), function (_ref2) {
14
+ var theme = _ref2.theme;
15
+ return react.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", " {\n flex-direction: row;\n align-items: center;\n }\n "])), theme.breakpoints.up("sm"));
16
+ });
17
+ var StyledPropertyAmenitiesBox = styled.div(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n padding-right: 25px;\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n\n gap: 18px;\n min-width: 170px;\n height: 100%;\n justify-content: space-between;\n\n ", "\n @media print {\n align-items: flex-end;\n }\n"])), function (_ref3) {
18
+ var theme = _ref3.theme;
19
+ return "\n @media (min-width: ".concat(theme.breakpoints.values.md, "px) {\n align-items: flex-end;\n }\n ");
20
+ });
73
21
 
74
22
  exports.StyledPropertyAmenitiesBox = StyledPropertyAmenitiesBox;
75
23
  exports.StyledPropertyDetailsBox = StyledPropertyDetailsBox;
@@ -0,0 +1,120 @@
1
+ function _arrayLikeToArray(r, a) {
2
+ (null == a || a > r.length) && (a = r.length);
3
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
4
+ return n;
5
+ }
6
+ function _arrayWithHoles(r) {
7
+ if (Array.isArray(r)) return r;
8
+ }
9
+ function _defineProperty(e, r, t) {
10
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
11
+ value: t,
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true
15
+ }) : e[r] = t, e;
16
+ }
17
+ function _iterableToArrayLimit(r, l) {
18
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
19
+ if (null != t) {
20
+ var e,
21
+ n,
22
+ i,
23
+ u,
24
+ a = [],
25
+ f = true,
26
+ o = false;
27
+ try {
28
+ if (i = (t = t.call(r)).next, 0 === l) {
29
+ if (Object(t) !== t) return;
30
+ f = !1;
31
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
32
+ } catch (r) {
33
+ o = true, n = r;
34
+ } finally {
35
+ try {
36
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
37
+ } finally {
38
+ if (o) throw n;
39
+ }
40
+ }
41
+ return a;
42
+ }
43
+ }
44
+ function _nonIterableRest() {
45
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
46
+ }
47
+ function ownKeys(e, r) {
48
+ var t = Object.keys(e);
49
+ if (Object.getOwnPropertySymbols) {
50
+ var o = Object.getOwnPropertySymbols(e);
51
+ r && (o = o.filter(function (r) {
52
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
53
+ })), t.push.apply(t, o);
54
+ }
55
+ return t;
56
+ }
57
+ function _objectSpread2(e) {
58
+ for (var r = 1; r < arguments.length; r++) {
59
+ var t = null != arguments[r] ? arguments[r] : {};
60
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
61
+ _defineProperty(e, r, t[r]);
62
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
63
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
64
+ });
65
+ }
66
+ return e;
67
+ }
68
+ function _objectWithoutProperties(e, t) {
69
+ if (null == e) return {};
70
+ var o,
71
+ r,
72
+ i = _objectWithoutPropertiesLoose(e, t);
73
+ if (Object.getOwnPropertySymbols) {
74
+ var n = Object.getOwnPropertySymbols(e);
75
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
76
+ }
77
+ return i;
78
+ }
79
+ function _objectWithoutPropertiesLoose(r, e) {
80
+ if (null == r) return {};
81
+ var t = {};
82
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
83
+ if (-1 !== e.indexOf(n)) continue;
84
+ t[n] = r[n];
85
+ }
86
+ return t;
87
+ }
88
+ function _slicedToArray(r, e) {
89
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
90
+ }
91
+ function _taggedTemplateLiteral(e, t) {
92
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
93
+ raw: {
94
+ value: Object.freeze(t)
95
+ }
96
+ }));
97
+ }
98
+ function _toPrimitive(t, r) {
99
+ if ("object" != typeof t || !t) return t;
100
+ var e = t[Symbol.toPrimitive];
101
+ if (void 0 !== e) {
102
+ var i = e.call(t, r);
103
+ if ("object" != typeof i) return i;
104
+ throw new TypeError("@@toPrimitive must return a primitive value.");
105
+ }
106
+ return ("string" === r ? String : Number)(t);
107
+ }
108
+ function _toPropertyKey(t) {
109
+ var i = _toPrimitive(t, "string");
110
+ return "symbol" == typeof i ? i : i + "";
111
+ }
112
+ function _unsupportedIterableToArray(r, a) {
113
+ if (r) {
114
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
115
+ var t = {}.toString.call(r).slice(8, -1);
116
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
117
+ }
118
+ }
119
+
120
+ export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _taggedTemplateLiteral as taggedTemplateLiteral, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };
@@ -1,51 +1,89 @@
1
1
  "use strict";
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import 'react';
2
+ import React from 'react';
4
3
  import { Box, Skeleton, Heading, Text } from '@tenancy.nz/ui';
5
4
  import { UserIcon, PhoneIcon, EnvelopeIcon } from '@tenancy.nz/icons';
6
5
  import IconLabel from './IconLabel.js';
7
6
 
8
- function AgentDetailsCard({
9
- email = void 0,
10
- loading = false,
11
- logo = void 0,
12
- name = void 0,
13
- phone = void 0
14
- }) {
15
- return /* @__PURE__ */ jsxs(Box, { display: "flex", gap: "8px", align: "flex-start", children: [
16
- /* @__PURE__ */ jsxs(Box, { display: "flex", gap: "8px", direction: "column", width: "100%", children: [
17
- loading ? /* @__PURE__ */ jsx(Skeleton, { width: "75%", height: "22px", variant: "text" }) : /* @__PURE__ */ jsx(IconLabel, { color: "tertiary.main", startIcon: /* @__PURE__ */ jsx(UserIcon, { size: "24px" }), children: /* @__PURE__ */ jsx(Heading, { as: "h5", weight: "700", children: name }) }),
18
- loading ? /* @__PURE__ */ jsx(Skeleton, { width: "55%", height: "18px", variant: "text" }) : /* @__PURE__ */ jsx(
19
- IconLabel,
20
- {
21
- color: "tertiary.main",
22
- startIcon: /* @__PURE__ */ jsx(PhoneIcon, { size: "24px" }),
23
- children: /* @__PURE__ */ jsx(Text, { as: "span", color: "text.primary", variant: "body1", weight: "400", children: phone })
24
- }
25
- ),
26
- loading ? /* @__PURE__ */ jsx(Skeleton, { width: "55%", height: "18px", variant: "text" }) : /* @__PURE__ */ jsx(
27
- IconLabel,
28
- {
29
- color: "tertiary.main",
30
- startIcon: /* @__PURE__ */ jsx(EnvelopeIcon, { size: "24px" }),
31
- children: /* @__PURE__ */ jsx(Text, { as: "span", color: "text.primary", variant: "body1", weight: "400", children: email })
32
- }
33
- )
34
- ] }),
35
- loading && /* @__PURE__ */ jsx(Box, { flex: "0 0 40px", children: /* @__PURE__ */ jsx(Skeleton, { width: "40px", height: "40px", variant: "rectangular" }) }),
36
- logo && !loading && /* @__PURE__ */ jsx(
37
- Box,
38
- {
39
- width: "40px",
40
- height: "40px",
41
- sx: {
42
- flex: "0 0 40px",
43
- "> img": { maxWidth: "100%", maxHeight: "100%" }
44
- },
45
- children: /* @__PURE__ */ jsx("img", { src: logo, alt: "Agency Logo" })
7
+ function AgentDetailsCard(_ref) {
8
+ var _ref$email = _ref.email,
9
+ email = _ref$email === void 0 ? void 0 : _ref$email,
10
+ _ref$loading = _ref.loading,
11
+ loading = _ref$loading === void 0 ? false : _ref$loading,
12
+ _ref$logo = _ref.logo,
13
+ logo = _ref$logo === void 0 ? void 0 : _ref$logo,
14
+ _ref$name = _ref.name,
15
+ name = _ref$name === void 0 ? void 0 : _ref$name,
16
+ _ref$phone = _ref.phone,
17
+ phone = _ref$phone === void 0 ? void 0 : _ref$phone;
18
+ return /* @__PURE__ */React.createElement(Box, {
19
+ display: "flex",
20
+ gap: "8px",
21
+ align: "flex-start"
22
+ }, /* @__PURE__ */React.createElement(Box, {
23
+ display: "flex",
24
+ gap: "8px",
25
+ direction: "column",
26
+ width: "100%"
27
+ }, loading ? /* @__PURE__ */React.createElement(Skeleton, {
28
+ width: "75%",
29
+ height: "22px",
30
+ variant: "text"
31
+ }) : /* @__PURE__ */React.createElement(IconLabel, {
32
+ color: "tertiary.main",
33
+ startIcon: /* @__PURE__ */React.createElement(UserIcon, {
34
+ size: "24px"
35
+ })
36
+ }, /* @__PURE__ */React.createElement(Heading, {
37
+ as: "h5",
38
+ weight: "700"
39
+ }, name)), loading ? /* @__PURE__ */React.createElement(Skeleton, {
40
+ width: "55%",
41
+ height: "18px",
42
+ variant: "text"
43
+ }) : /* @__PURE__ */React.createElement(IconLabel, {
44
+ color: "tertiary.main",
45
+ startIcon: /* @__PURE__ */React.createElement(PhoneIcon, {
46
+ size: "24px"
47
+ })
48
+ }, /* @__PURE__ */React.createElement(Text, {
49
+ as: "span",
50
+ color: "text.primary",
51
+ variant: "body1",
52
+ weight: "400"
53
+ }, phone)), loading ? /* @__PURE__ */React.createElement(Skeleton, {
54
+ width: "55%",
55
+ height: "18px",
56
+ variant: "text"
57
+ }) : /* @__PURE__ */React.createElement(IconLabel, {
58
+ color: "tertiary.main",
59
+ startIcon: /* @__PURE__ */React.createElement(EnvelopeIcon, {
60
+ size: "24px"
61
+ })
62
+ }, /* @__PURE__ */React.createElement(Text, {
63
+ as: "span",
64
+ color: "text.primary",
65
+ variant: "body1",
66
+ weight: "400"
67
+ }, email))), loading && /* @__PURE__ */React.createElement(Box, {
68
+ flex: "0 0 40px"
69
+ }, /* @__PURE__ */React.createElement(Skeleton, {
70
+ width: "40px",
71
+ height: "40px",
72
+ variant: "rectangular"
73
+ })), logo && !loading && /* @__PURE__ */React.createElement(Box, {
74
+ width: "40px",
75
+ height: "40px",
76
+ sx: {
77
+ flex: "0 0 40px",
78
+ "> img": {
79
+ maxWidth: "100%",
80
+ maxHeight: "100%"
46
81
  }
47
- )
48
- ] });
82
+ }
83
+ }, /* @__PURE__ */React.createElement("img", {
84
+ src: logo,
85
+ alt: "Agency Logo"
86
+ })));
49
87
  }
50
88
 
51
89
  export { AgentDetailsCard as default };