@tenancy.nz/feature-ui 1.5.8 → 1.5.9

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.
@@ -21,15 +21,34 @@ function ChartLegend(_ref) {
21
21
  gap: 1.5,
22
22
  sx: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, sx), {}, {
23
23
  userSelect: "none",
24
- fontSize: "12px"
24
+ fontSize: {
25
+ xs: "8px",
26
+ md: "12px"
27
+ }
25
28
  })
26
29
  }, /* @__PURE__ */React.createElement(ui.Box, {
27
- borderRadius: "4px",
28
- width: "32px",
29
- height: "18px",
30
- bgcolor: color || "#D9D9D9"
30
+ bgcolor: color || "#D9D9D9",
31
+ sx: {
32
+ width: {
33
+ xs: "20px",
34
+ md: "32px"
35
+ },
36
+ height: {
37
+ xs: "12px",
38
+ md: "18px"
39
+ },
40
+ borderRadius: {
41
+ xs: "2px",
42
+ md: "4px"
43
+ }
44
+ }
31
45
  }), /* @__PURE__ */React.createElement(ui.Box, {
32
- minWidth: "24px"
46
+ xs: {
47
+ minWidth: {
48
+ xs: "20px",
49
+ md: "24px"
50
+ }
51
+ }
33
52
  }, count !== void 0 && count >= 0 && /* @__PURE__ */React.createElement(ui.Text, {
34
53
  align: "center",
35
54
  weight: "700",
@@ -2,11 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
5
6
  var React = require('react');
6
7
  var doughnutChart = require('./doughnut-chart.cjs');
7
8
  var partnerLogo = require('./partner-logo.cjs');
8
9
  var general = require('../utils/helpers/general.cjs');
9
10
 
11
+ var _excluded = ["allhouseCount", "bookMeCount", "oneRoofCount", "realEstateCount", "tradeMeCount", "manualCount", "heading"];
10
12
  function AnalyticsDoughnutChart(_ref) {
11
13
  var _ref$allhouseCount = _ref.allhouseCount,
12
14
  allhouseCount = _ref$allhouseCount === void 0 ? 0 : _ref$allhouseCount,
@@ -21,7 +23,8 @@ function AnalyticsDoughnutChart(_ref) {
21
23
  _ref$manualCount = _ref.manualCount,
22
24
  manualCount = _ref$manualCount === void 0 ? 0 : _ref$manualCount,
23
25
  _ref$heading = _ref.heading,
24
- heading = _ref$heading === void 0 ? void 0 : _ref$heading;
26
+ heading = _ref$heading === void 0 ? void 0 : _ref$heading,
27
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
25
28
  var data = [{
26
29
  color: "#0CC1A3",
27
30
  count: general.parseChartCount(bookMeCount),
@@ -34,8 +37,14 @@ function AnalyticsDoughnutChart(_ref) {
34
37
  title: "Allhouse",
35
38
  logo: /* @__PURE__ */React.createElement(partnerLogo.default, {
36
39
  name: "allhouse",
37
- width: "59px",
38
- height: "14px"
40
+ width: {
41
+ xs: "48px",
42
+ md: "59px"
43
+ },
44
+ height: {
45
+ xs: "12px",
46
+ md: "14px"
47
+ }
39
48
  })
40
49
  }, {
41
50
  color: "#FF8500",
@@ -44,8 +53,14 @@ function AnalyticsDoughnutChart(_ref) {
44
53
  title: "OneRoof",
45
54
  logo: /* @__PURE__ */React.createElement(partnerLogo.default, {
46
55
  name: "oneroof",
47
- width: "66px",
48
- height: "12px"
56
+ width: {
57
+ xs: "52px",
58
+ md: "66px"
59
+ },
60
+ height: {
61
+ xs: "",
62
+ md: "12px"
63
+ }
49
64
  })
50
65
  }, {
51
66
  color: "#0098FF",
@@ -54,8 +69,14 @@ function AnalyticsDoughnutChart(_ref) {
54
69
  title: "realestate.co.nz",
55
70
  logo: /* @__PURE__ */React.createElement(partnerLogo.default, {
56
71
  name: "realestate",
57
- width: "92px",
58
- height: "14px"
72
+ width: {
73
+ xs: "72px",
74
+ md: "92px"
75
+ },
76
+ height: {
77
+ xs: "12px",
78
+ md: "14px"
79
+ }
59
80
  })
60
81
  }, {
61
82
  color: "#4854D3",
@@ -64,8 +85,14 @@ function AnalyticsDoughnutChart(_ref) {
64
85
  title: "Trade Me",
65
86
  logo: /* @__PURE__ */React.createElement(partnerLogo.default, {
66
87
  name: "trademe",
67
- width: "90px",
68
- height: "12px"
88
+ width: {
89
+ xs: "64px",
90
+ md: "90px"
91
+ },
92
+ height: {
93
+ xs: "12px",
94
+ md: "12px"
95
+ }
69
96
  })
70
97
  }, {
71
98
  color: "#D9D9D9",
@@ -73,10 +100,14 @@ function AnalyticsDoughnutChart(_ref) {
73
100
  slug: "manual",
74
101
  title: "Manually Generated"
75
102
  }];
76
- return /* @__PURE__ */React.createElement(doughnutChart.default, {
103
+ return /* @__PURE__ */React.createElement(doughnutChart.default, _rollupPluginBabelHelpers.objectSpread2({
77
104
  data: data,
78
- heading: heading
79
- });
105
+ heading: heading,
106
+ size: {
107
+ xs: "100px",
108
+ md: "165px"
109
+ }
110
+ }, rest));
80
111
  }
81
112
 
82
113
  exports.default = AnalyticsDoughnutChart;
@@ -40,18 +40,19 @@ function DoughnutChart(_ref) {
40
40
  as: "h4",
41
41
  color: "primary"
42
42
  }, heading), /* @__PURE__ */React.createElement(Stack, {
43
- flexDirection: {
44
- sm: "row"
43
+ flexDirection: "row",
44
+ gap: {
45
+ xs: 4,
46
+ md: 12
45
47
  },
46
- gap: 12,
47
48
  alignItems: "center"
48
49
  }, /* @__PURE__ */React.createElement(ui.Box, {
49
- width: size,
50
- height: size,
51
50
  overflow: "hidden",
52
51
  position: "relative",
53
52
  maxWidth: "100%",
54
53
  sx: {
54
+ width: size,
55
+ height: size,
55
56
  "&& > canvas": {
56
57
  width: "100%",
57
58
  height: "100%"
@@ -88,10 +88,10 @@ function PartnerLogo(_ref) {
88
88
  height = _ref.height,
89
89
  width = _ref.width;
90
90
  return /* @__PURE__ */React.createElement(ui.Box, {
91
- width: width,
92
- height: height,
93
91
  display: "inline-flex",
94
92
  sx: {
93
+ width: width,
94
+ height: height,
95
95
  "> svg": {
96
96
  width: "inherit",
97
97
  height: "inherit",
@@ -76,7 +76,7 @@ function PDFAnalyticsSection(_ref) {
76
76
  container: true,
77
77
  item: true,
78
78
  spacing: 6,
79
- xs: 9
79
+ xs: 12
80
80
  }, /* @__PURE__ */React.createElement(ui.Grid, {
81
81
  item: true,
82
82
  xs: 6
@@ -112,11 +112,11 @@ function PDFAnalyticsSection(_ref) {
112
112
  })))), /* @__PURE__ */React.createElement(ui.Grid, {
113
113
  item: true,
114
114
  container: true,
115
- xs: 3,
115
+ xs: 12,
116
116
  spacing: 6
117
117
  }, /* @__PURE__ */React.createElement(ui.Grid, {
118
118
  item: true,
119
- xs: 12
119
+ xs: 6
120
120
  }, /* @__PURE__ */React.createElement(AnalyticsBox.default, {
121
121
  outlined: true,
122
122
  label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
@@ -129,7 +129,7 @@ function PDFAnalyticsSection(_ref) {
129
129
  }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement("strong", null, filterDaysCount), " days where an agreement has been ", /* @__PURE__ */React.createElement("strong", null, "created"))
130
130
  })), /* @__PURE__ */React.createElement(ui.Grid, {
131
131
  item: true,
132
- xs: 12,
132
+ xs: 6,
133
133
  sx: {
134
134
  display: "flex",
135
135
  alignItems: "flex-end"
@@ -17,15 +17,34 @@ function ChartLegend(_ref) {
17
17
  gap: 1.5,
18
18
  sx: _objectSpread2(_objectSpread2({}, sx), {}, {
19
19
  userSelect: "none",
20
- fontSize: "12px"
20
+ fontSize: {
21
+ xs: "8px",
22
+ md: "12px"
23
+ }
21
24
  })
22
25
  }, /* @__PURE__ */React.createElement(Box, {
23
- borderRadius: "4px",
24
- width: "32px",
25
- height: "18px",
26
- bgcolor: color || "#D9D9D9"
26
+ bgcolor: color || "#D9D9D9",
27
+ sx: {
28
+ width: {
29
+ xs: "20px",
30
+ md: "32px"
31
+ },
32
+ height: {
33
+ xs: "12px",
34
+ md: "18px"
35
+ },
36
+ borderRadius: {
37
+ xs: "2px",
38
+ md: "4px"
39
+ }
40
+ }
27
41
  }), /* @__PURE__ */React.createElement(Box, {
28
- minWidth: "24px"
42
+ xs: {
43
+ minWidth: {
44
+ xs: "20px",
45
+ md: "24px"
46
+ }
47
+ }
29
48
  }, count !== void 0 && count >= 0 && /* @__PURE__ */React.createElement(Text, {
30
49
  align: "center",
31
50
  weight: "700",
@@ -1,8 +1,10 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
1
2
  import React from 'react';
2
3
  import DoughnutChart from './doughnut-chart.js';
3
4
  import PartnerLogo from './partner-logo.js';
4
5
  import { parseChartCount } from '../utils/helpers/general.js';
5
6
 
7
+ var _excluded = ["allhouseCount", "bookMeCount", "oneRoofCount", "realEstateCount", "tradeMeCount", "manualCount", "heading"];
6
8
  function AnalyticsDoughnutChart(_ref) {
7
9
  var _ref$allhouseCount = _ref.allhouseCount,
8
10
  allhouseCount = _ref$allhouseCount === void 0 ? 0 : _ref$allhouseCount,
@@ -17,7 +19,8 @@ function AnalyticsDoughnutChart(_ref) {
17
19
  _ref$manualCount = _ref.manualCount,
18
20
  manualCount = _ref$manualCount === void 0 ? 0 : _ref$manualCount,
19
21
  _ref$heading = _ref.heading,
20
- heading = _ref$heading === void 0 ? void 0 : _ref$heading;
22
+ heading = _ref$heading === void 0 ? void 0 : _ref$heading,
23
+ rest = _objectWithoutProperties(_ref, _excluded);
21
24
  var data = [{
22
25
  color: "#0CC1A3",
23
26
  count: parseChartCount(bookMeCount),
@@ -30,8 +33,14 @@ function AnalyticsDoughnutChart(_ref) {
30
33
  title: "Allhouse",
31
34
  logo: /* @__PURE__ */React.createElement(PartnerLogo, {
32
35
  name: "allhouse",
33
- width: "59px",
34
- height: "14px"
36
+ width: {
37
+ xs: "48px",
38
+ md: "59px"
39
+ },
40
+ height: {
41
+ xs: "12px",
42
+ md: "14px"
43
+ }
35
44
  })
36
45
  }, {
37
46
  color: "#FF8500",
@@ -40,8 +49,14 @@ function AnalyticsDoughnutChart(_ref) {
40
49
  title: "OneRoof",
41
50
  logo: /* @__PURE__ */React.createElement(PartnerLogo, {
42
51
  name: "oneroof",
43
- width: "66px",
44
- height: "12px"
52
+ width: {
53
+ xs: "52px",
54
+ md: "66px"
55
+ },
56
+ height: {
57
+ xs: "",
58
+ md: "12px"
59
+ }
45
60
  })
46
61
  }, {
47
62
  color: "#0098FF",
@@ -50,8 +65,14 @@ function AnalyticsDoughnutChart(_ref) {
50
65
  title: "realestate.co.nz",
51
66
  logo: /* @__PURE__ */React.createElement(PartnerLogo, {
52
67
  name: "realestate",
53
- width: "92px",
54
- height: "14px"
68
+ width: {
69
+ xs: "72px",
70
+ md: "92px"
71
+ },
72
+ height: {
73
+ xs: "12px",
74
+ md: "14px"
75
+ }
55
76
  })
56
77
  }, {
57
78
  color: "#4854D3",
@@ -60,8 +81,14 @@ function AnalyticsDoughnutChart(_ref) {
60
81
  title: "Trade Me",
61
82
  logo: /* @__PURE__ */React.createElement(PartnerLogo, {
62
83
  name: "trademe",
63
- width: "90px",
64
- height: "12px"
84
+ width: {
85
+ xs: "64px",
86
+ md: "90px"
87
+ },
88
+ height: {
89
+ xs: "12px",
90
+ md: "12px"
91
+ }
65
92
  })
66
93
  }, {
67
94
  color: "#D9D9D9",
@@ -69,10 +96,14 @@ function AnalyticsDoughnutChart(_ref) {
69
96
  slug: "manual",
70
97
  title: "Manually Generated"
71
98
  }];
72
- return /* @__PURE__ */React.createElement(DoughnutChart, {
99
+ return /* @__PURE__ */React.createElement(DoughnutChart, _objectSpread2({
73
100
  data: data,
74
- heading: heading
75
- });
101
+ heading: heading,
102
+ size: {
103
+ xs: "100px",
104
+ md: "165px"
105
+ }
106
+ }, rest));
76
107
  }
77
108
 
78
109
  export { AnalyticsDoughnutChart as default };
@@ -36,18 +36,19 @@ function DoughnutChart(_ref) {
36
36
  as: "h4",
37
37
  color: "primary"
38
38
  }, heading), /* @__PURE__ */React.createElement(Stack, {
39
- flexDirection: {
40
- sm: "row"
39
+ flexDirection: "row",
40
+ gap: {
41
+ xs: 4,
42
+ md: 12
41
43
  },
42
- gap: 12,
43
44
  alignItems: "center"
44
45
  }, /* @__PURE__ */React.createElement(Box, {
45
- width: size,
46
- height: size,
47
46
  overflow: "hidden",
48
47
  position: "relative",
49
48
  maxWidth: "100%",
50
49
  sx: {
50
+ width: size,
51
+ height: size,
51
52
  "&& > canvas": {
52
53
  width: "100%",
53
54
  height: "100%"
@@ -84,10 +84,10 @@ function PartnerLogo(_ref) {
84
84
  height = _ref.height,
85
85
  width = _ref.width;
86
86
  return /* @__PURE__ */React.createElement(Box, {
87
- width: width,
88
- height: height,
89
87
  display: "inline-flex",
90
88
  sx: {
89
+ width: width,
90
+ height: height,
91
91
  "> svg": {
92
92
  width: "inherit",
93
93
  height: "inherit",
@@ -72,7 +72,7 @@ function PDFAnalyticsSection(_ref) {
72
72
  container: true,
73
73
  item: true,
74
74
  spacing: 6,
75
- xs: 9
75
+ xs: 12
76
76
  }, /* @__PURE__ */React.createElement(Grid, {
77
77
  item: true,
78
78
  xs: 6
@@ -108,11 +108,11 @@ function PDFAnalyticsSection(_ref) {
108
108
  })))), /* @__PURE__ */React.createElement(Grid, {
109
109
  item: true,
110
110
  container: true,
111
- xs: 3,
111
+ xs: 12,
112
112
  spacing: 6
113
113
  }, /* @__PURE__ */React.createElement(Grid, {
114
114
  item: true,
115
- xs: 12
115
+ xs: 6
116
116
  }, /* @__PURE__ */React.createElement(AnalyticsBox, {
117
117
  outlined: true,
118
118
  label: /* @__PURE__ */React.createElement("strong", null, "Converted Properties"),
@@ -125,7 +125,7 @@ function PDFAnalyticsSection(_ref) {
125
125
  }, "Properties that have had a viewing in the last", " ", /* @__PURE__ */React.createElement("strong", null, filterDaysCount), " days where an agreement has been ", /* @__PURE__ */React.createElement("strong", null, "created"))
126
126
  })), /* @__PURE__ */React.createElement(Grid, {
127
127
  item: true,
128
- xs: 12,
128
+ xs: 6,
129
129
  sx: {
130
130
  display: "flex",
131
131
  alignItems: "flex-end"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tenancy.nz/feature-ui",
3
3
  "description": "React UI feature components.",
4
- "version": "1.5.8",
4
+ "version": "1.5.9",
5
5
  "author": "TPS <https://www.tenancy.co.nz>",
6
6
  "type": "module",
7
7
  "main": "dist/cjs/index.cjs",
@@ -20,14 +20,14 @@
20
20
  "primereact": "3.1.3",
21
21
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
22
22
  "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
23
- "@tenancy.nz/ui": "1.5.8"
23
+ "@tenancy.nz/ui": "1.5.9"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@emotion/react": "^11.14.0",
27
27
  "@emotion/styled": "^11.14.1",
28
28
  "@mui/icons-material": "^7.2.0",
29
29
  "@mui/material": "^7.3.1",
30
- "@tenancy.nz/ui": "1.5.8"
30
+ "@tenancy.nz/ui": "1.5.9"
31
31
  },
32
32
  "dependencies": {
33
33
  "react-uid": "^2.4.0"