@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
@@ -0,0 +1,134 @@
1
+ 'use strict';
2
+
3
+ function _arrayLikeToArray(r, a) {
4
+ (null == a || a > r.length) && (a = r.length);
5
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6
+ return n;
7
+ }
8
+ function _arrayWithHoles(r) {
9
+ if (Array.isArray(r)) return r;
10
+ }
11
+ function _defineProperty(e, r, t) {
12
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
13
+ value: t,
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true
17
+ }) : e[r] = t, e;
18
+ }
19
+ function _iterableToArrayLimit(r, l) {
20
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
21
+ if (null != t) {
22
+ var e,
23
+ n,
24
+ i,
25
+ u,
26
+ a = [],
27
+ f = true,
28
+ o = false;
29
+ try {
30
+ if (i = (t = t.call(r)).next, 0 === l) {
31
+ if (Object(t) !== t) return;
32
+ f = !1;
33
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
34
+ } catch (r) {
35
+ o = true, n = r;
36
+ } finally {
37
+ try {
38
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
39
+ } finally {
40
+ if (o) throw n;
41
+ }
42
+ }
43
+ return a;
44
+ }
45
+ }
46
+ function _nonIterableRest() {
47
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
48
+ }
49
+ function ownKeys(e, r) {
50
+ var t = Object.keys(e);
51
+ if (Object.getOwnPropertySymbols) {
52
+ var o = Object.getOwnPropertySymbols(e);
53
+ r && (o = o.filter(function (r) {
54
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
55
+ })), t.push.apply(t, o);
56
+ }
57
+ return t;
58
+ }
59
+ function _objectSpread2(e) {
60
+ for (var r = 1; r < arguments.length; r++) {
61
+ var t = null != arguments[r] ? arguments[r] : {};
62
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
63
+ _defineProperty(e, r, t[r]);
64
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
65
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
66
+ });
67
+ }
68
+ return e;
69
+ }
70
+ function _objectWithoutProperties(e, t) {
71
+ if (null == e) return {};
72
+ var o,
73
+ r,
74
+ i = _objectWithoutPropertiesLoose(e, t);
75
+ if (Object.getOwnPropertySymbols) {
76
+ var n = Object.getOwnPropertySymbols(e);
77
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
78
+ }
79
+ return i;
80
+ }
81
+ function _objectWithoutPropertiesLoose(r, e) {
82
+ if (null == r) return {};
83
+ var t = {};
84
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
85
+ if (-1 !== e.indexOf(n)) continue;
86
+ t[n] = r[n];
87
+ }
88
+ return t;
89
+ }
90
+ function _slicedToArray(r, e) {
91
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
92
+ }
93
+ function _taggedTemplateLiteral(e, t) {
94
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
95
+ raw: {
96
+ value: Object.freeze(t)
97
+ }
98
+ }));
99
+ }
100
+ function _toPrimitive(t, r) {
101
+ if ("object" != typeof t || !t) return t;
102
+ var e = t[Symbol.toPrimitive];
103
+ if (void 0 !== e) {
104
+ var i = e.call(t, r);
105
+ if ("object" != typeof i) return i;
106
+ throw new TypeError("@@toPrimitive must return a primitive value.");
107
+ }
108
+ return ("string" === r ? String : Number)(t);
109
+ }
110
+ function _toPropertyKey(t) {
111
+ var i = _toPrimitive(t, "string");
112
+ return "symbol" == typeof i ? i : i + "";
113
+ }
114
+ function _unsupportedIterableToArray(r, a) {
115
+ if (r) {
116
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
117
+ var t = {}.toString.call(r).slice(8, -1);
118
+ 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;
119
+ }
120
+ }
121
+
122
+ exports.arrayLikeToArray = _arrayLikeToArray;
123
+ exports.arrayWithHoles = _arrayWithHoles;
124
+ exports.defineProperty = _defineProperty;
125
+ exports.iterableToArrayLimit = _iterableToArrayLimit;
126
+ exports.nonIterableRest = _nonIterableRest;
127
+ exports.objectSpread2 = _objectSpread2;
128
+ exports.objectWithoutProperties = _objectWithoutProperties;
129
+ exports.objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
130
+ exports.slicedToArray = _slicedToArray;
131
+ exports.taggedTemplateLiteral = _taggedTemplateLiteral;
132
+ exports.toPrimitive = _toPrimitive;
133
+ exports.toPropertyKey = _toPropertyKey;
134
+ exports.unsupportedIterableToArray = _unsupportedIterableToArray;
@@ -3,53 +3,91 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var jsxRuntime = require('react/jsx-runtime');
7
- require('react');
6
+ var React = require('react');
8
7
  var ui = require('@tenancy.nz/ui');
9
8
  var icons = require('@tenancy.nz/icons');
10
9
  var IconLabel = require('./IconLabel.cjs');
11
10
 
12
- function AgentDetailsCard({
13
- email = void 0,
14
- loading = false,
15
- logo = void 0,
16
- name = void 0,
17
- phone = void 0
18
- }) {
19
- return /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { display: "flex", gap: "8px", align: "flex-start", children: [
20
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { display: "flex", gap: "8px", direction: "column", width: "100%", children: [
21
- loading ? /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "75%", height: "22px", variant: "text" }) : /* @__PURE__ */ jsxRuntime.jsx(IconLabel.default, { color: "tertiary.main", startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.UserIcon, { size: "24px" }), children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { as: "h5", weight: "700", children: name }) }),
22
- loading ? /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "55%", height: "18px", variant: "text" }) : /* @__PURE__ */ jsxRuntime.jsx(
23
- IconLabel.default,
24
- {
25
- color: "tertiary.main",
26
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.PhoneIcon, { size: "24px" }),
27
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "span", color: "text.primary", variant: "body1", weight: "400", children: phone })
28
- }
29
- ),
30
- loading ? /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "55%", height: "18px", variant: "text" }) : /* @__PURE__ */ jsxRuntime.jsx(
31
- IconLabel.default,
32
- {
33
- color: "tertiary.main",
34
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.EnvelopeIcon, { size: "24px" }),
35
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "span", color: "text.primary", variant: "body1", weight: "400", children: email })
36
- }
37
- )
38
- ] }),
39
- loading && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { flex: "0 0 40px", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "40px", height: "40px", variant: "rectangular" }) }),
40
- logo && !loading && /* @__PURE__ */ jsxRuntime.jsx(
41
- ui.Box,
42
- {
43
- width: "40px",
44
- height: "40px",
45
- sx: {
46
- flex: "0 0 40px",
47
- "> img": { maxWidth: "100%", maxHeight: "100%" }
48
- },
49
- children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "Agency Logo" })
11
+ function AgentDetailsCard(_ref) {
12
+ var _ref$email = _ref.email,
13
+ email = _ref$email === void 0 ? void 0 : _ref$email,
14
+ _ref$loading = _ref.loading,
15
+ loading = _ref$loading === void 0 ? false : _ref$loading,
16
+ _ref$logo = _ref.logo,
17
+ logo = _ref$logo === void 0 ? void 0 : _ref$logo,
18
+ _ref$name = _ref.name,
19
+ name = _ref$name === void 0 ? void 0 : _ref$name,
20
+ _ref$phone = _ref.phone,
21
+ phone = _ref$phone === void 0 ? void 0 : _ref$phone;
22
+ return /* @__PURE__ */React.createElement(ui.Box, {
23
+ display: "flex",
24
+ gap: "8px",
25
+ align: "flex-start"
26
+ }, /* @__PURE__ */React.createElement(ui.Box, {
27
+ display: "flex",
28
+ gap: "8px",
29
+ direction: "column",
30
+ width: "100%"
31
+ }, loading ? /* @__PURE__ */React.createElement(ui.Skeleton, {
32
+ width: "75%",
33
+ height: "22px",
34
+ variant: "text"
35
+ }) : /* @__PURE__ */React.createElement(IconLabel.default, {
36
+ color: "tertiary.main",
37
+ startIcon: /* @__PURE__ */React.createElement(icons.UserIcon, {
38
+ size: "24px"
39
+ })
40
+ }, /* @__PURE__ */React.createElement(ui.Heading, {
41
+ as: "h5",
42
+ weight: "700"
43
+ }, name)), loading ? /* @__PURE__ */React.createElement(ui.Skeleton, {
44
+ width: "55%",
45
+ height: "18px",
46
+ variant: "text"
47
+ }) : /* @__PURE__ */React.createElement(IconLabel.default, {
48
+ color: "tertiary.main",
49
+ startIcon: /* @__PURE__ */React.createElement(icons.PhoneIcon, {
50
+ size: "24px"
51
+ })
52
+ }, /* @__PURE__ */React.createElement(ui.Text, {
53
+ as: "span",
54
+ color: "text.primary",
55
+ variant: "body1",
56
+ weight: "400"
57
+ }, phone)), loading ? /* @__PURE__ */React.createElement(ui.Skeleton, {
58
+ width: "55%",
59
+ height: "18px",
60
+ variant: "text"
61
+ }) : /* @__PURE__ */React.createElement(IconLabel.default, {
62
+ color: "tertiary.main",
63
+ startIcon: /* @__PURE__ */React.createElement(icons.EnvelopeIcon, {
64
+ size: "24px"
65
+ })
66
+ }, /* @__PURE__ */React.createElement(ui.Text, {
67
+ as: "span",
68
+ color: "text.primary",
69
+ variant: "body1",
70
+ weight: "400"
71
+ }, email))), loading && /* @__PURE__ */React.createElement(ui.Box, {
72
+ flex: "0 0 40px"
73
+ }, /* @__PURE__ */React.createElement(ui.Skeleton, {
74
+ width: "40px",
75
+ height: "40px",
76
+ variant: "rectangular"
77
+ })), logo && !loading && /* @__PURE__ */React.createElement(ui.Box, {
78
+ width: "40px",
79
+ height: "40px",
80
+ sx: {
81
+ flex: "0 0 40px",
82
+ "> img": {
83
+ maxWidth: "100%",
84
+ maxHeight: "100%"
50
85
  }
51
- )
52
- ] });
86
+ }
87
+ }, /* @__PURE__ */React.createElement("img", {
88
+ src: logo,
89
+ alt: "Agency Logo"
90
+ })));
53
91
  }
54
92
 
55
93
  exports.default = AgentDetailsCard;
@@ -3,56 +3,56 @@
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
 
10
- function AnalyticsBox({
11
- width,
12
- minWidth,
13
- maxWidth,
14
- height,
15
- border,
16
- label,
17
- amount,
18
- text,
19
- ...rest
20
- }) {
21
- return /* @__PURE__ */ jsxRuntime.jsx(
22
- ui.Paper,
23
- {
24
- ...rest,
25
- sx: {
26
- maxWidth,
27
- width,
28
- minWidth,
29
- border,
30
- height: height || "100%",
31
- display: "flex",
32
- alignItems: "center",
33
- justifyContent: "center",
34
- padding: "16px"
10
+ var _excluded = ["width", "minWidth", "maxWidth", "height", "border", "label", "amount", "text"];
11
+ function AnalyticsBox(_ref) {
12
+ var width = _ref.width,
13
+ minWidth = _ref.minWidth,
14
+ maxWidth = _ref.maxWidth,
15
+ height = _ref.height,
16
+ border = _ref.border,
17
+ label = _ref.label,
18
+ amount = _ref.amount,
19
+ text = _ref.text,
20
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
21
+ return /* @__PURE__ */React.createElement(ui.Paper, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rest), {}, {
22
+ sx: {
23
+ maxWidth: maxWidth,
24
+ width: width,
25
+ minWidth: minWidth,
26
+ border: border,
27
+ height: height || "100%",
28
+ display: "flex",
29
+ alignItems: "center",
30
+ justifyContent: "center",
31
+ padding: "16px"
32
+ }
33
+ }), /* @__PURE__ */React.createElement(ui.Box, null, /* @__PURE__ */React.createElement(ui.Heading, {
34
+ align: "center",
35
+ weight: "700",
36
+ as: "h3",
37
+ gutterBottom: true
38
+ }, amount), /* @__PURE__ */React.createElement(ui.Text, {
39
+ align: "center",
40
+ weight: "400",
41
+ variant: "body2"
42
+ }, label), text && /* @__PURE__ */React.createElement(ui.Text, {
43
+ align: "center",
44
+ weight: "400",
45
+ sx: {
46
+ fontSize: {
47
+ xs: 8,
48
+ sm: 10,
49
+ xl: 14
35
50
  },
36
- children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { children: [
37
- /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { align: "center", weight: "700", as: "h3", gutterBottom: true, children: amount }),
38
- /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { align: "center", weight: "400", variant: "body2", children: label }),
39
- text && /* @__PURE__ */ jsxRuntime.jsx(
40
- ui.Text,
41
- {
42
- align: "center",
43
- weight: "400",
44
- sx: {
45
- fontSize: { xs: 8, sm: 10, xl: 14 },
46
- lineHeight: "15.6px",
47
- maxWidth: "366px",
48
- mt: "8px"
49
- },
50
- children: text
51
- }
52
- )
53
- ] })
51
+ lineHeight: "15.6px",
52
+ maxWidth: "366px",
53
+ mt: "8px"
54
54
  }
55
- );
55
+ }, text)));
56
56
  }
57
57
 
58
58
  exports.default = AnalyticsBox;