@tenancy.nz/feature-ui 1.0.1 → 1.0.7

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
@@ -1,97 +1,43 @@
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 StyledBookingChartStack = styled.div`
8
- display: flex;
9
- flex-wrap: wrap;
10
- gap: 8px;
11
- padding: 0;
12
- margin: 0;
13
- list-style: none;
14
- font-size: 12px;
15
- justify-content: center;
16
- color: #000;
17
- width: 100%;
18
- `;
19
- const StyledBookingChartLegend = styled("span", {
20
- shouldForwardProp: (prop) => !["color"].includes(prop)
21
- })`
22
- font-weight: 500;
23
- display: flex;
24
- align-items: center;
25
- gap: 6px;
26
-
27
- &::before {
28
- content: '';
29
- display: inline-flex;
30
- width: 32px;
31
- height: 18px;
32
- background-color: ${(props) => props.color};
33
- border-radius: 4px;
34
- }
35
- `;
36
- const StyledBookingChartButton = styled("button", {
37
- shouldForwardProp: (prop) => !["color"].includes(prop)
38
- })`
39
- font-weight: 500;
40
- display: flex;
41
- align-items: center;
42
- padding: 6px 10px;
43
- font-size: 14px;
44
- border-radius: 4px;
45
- font-family: inherit;
46
- border: 1px solid ${({ theme }) => theme.palette.primary.main};
47
- box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
48
- background-color: ${({ active, theme }) => active ? "#CEF3ED" : theme.palette.background.paper};
49
- cursor: pointer;
50
-
51
- &:hover {
52
- background-color: ${({ active, theme }) => !active ? theme.palette.grey[100] : null};
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
9
+ var StyledBookingChartStack = styled.div(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: 12px;\n justify-content: center;\n color: #000;\n width: 100%;\n"])));
10
+ var StyledBookingChartLegend = styled("span", {
11
+ shouldForwardProp: function shouldForwardProp(prop) {
12
+ return !["color"].includes(prop);
53
13
  }
54
- `;
55
- const StyledPropertyDetailsBox = styled.div`
56
- display: flex;
57
- width: 100%;
58
- align-items: flex-start;
59
- padding: 16px 24px 16px 20px;
60
- flex-direction: column;
61
-
62
- ${({ theme }) => react.css`
63
- ${theme.breakpoints.up("sm")} {
64
- flex-direction: row;
65
- align-items: center;
66
- }
67
- `}
68
-
69
- @media print {
70
- flex-direction: row;
71
- align-items: center;
72
- }
73
- `;
74
- const StyledPropertyAmenitiesBox = styled.div`
75
- padding-right: 25px;
76
- display: flex;
77
- flex-direction: column;
78
- margin-top: 5px;
79
-
80
- gap: 18px;
81
- min-width: 170px;
82
- height: 100%;
83
- justify-content: space-between;
84
-
85
- ${({ theme }) => `
86
- @media (min-width: ${theme.breakpoints.values.md}px) {
87
- align-items: flex-end;
88
- }
89
- `}
90
-
91
- @media print {
92
- align-items: flex-end;
14
+ })(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n\n &::before {\n content: '';\n display: inline-flex;\n width: 32px;\n height: 18px;\n background-color: ", ";\n border-radius: 4px;\n }\n"])), function (props) {
15
+ return props.color;
16
+ });
17
+ var StyledBookingChartButton = styled("button", {
18
+ shouldForwardProp: function shouldForwardProp(prop) {
19
+ return !["color"].includes(prop);
93
20
  }
94
- `;
21
+ })(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n font-weight: 500;\n display: flex;\n align-items: center;\n padding: 6px 10px;\n font-size: 14px;\n border-radius: 4px;\n font-family: inherit;\n border: 1px solid ", ";\n box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);\n background-color: ", ";\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), function (_ref) {
22
+ var theme = _ref.theme;
23
+ return theme.palette.primary.main;
24
+ }, function (_ref2) {
25
+ var active = _ref2.active,
26
+ theme = _ref2.theme;
27
+ return active ? "#CEF3ED" : theme.palette.background.paper;
28
+ }, function (_ref3) {
29
+ var active = _ref3.active,
30
+ theme = _ref3.theme;
31
+ return !active ? theme.palette.grey[100] : null;
32
+ });
33
+ var StyledPropertyDetailsBox = styled.div(_templateObject4 || (_templateObject4 = _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 (_ref4) {
34
+ var theme = _ref4.theme;
35
+ return react.css(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", " {\n flex-direction: row;\n align-items: center;\n }\n "])), theme.breakpoints.up("sm"));
36
+ });
37
+ var StyledPropertyAmenitiesBox = styled.div(_templateObject6 || (_templateObject6 = _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\n @media print {\n align-items: flex-end;\n }\n"])), function (_ref5) {
38
+ var theme = _ref5.theme;
39
+ return "\n @media (min-width: ".concat(theme.breakpoints.values.md, "px) {\n align-items: flex-end;\n }\n ");
40
+ });
95
41
 
96
42
  exports.StyledBookingChartButton = StyledBookingChartButton;
97
43
  exports.StyledBookingChartLegend = StyledBookingChartLegend;
@@ -3,42 +3,51 @@
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 reactUid = require('react-uid');
9
8
  var ui = require('@tenancy.nz/ui');
10
9
  var BookingTableRowHeader = require('./BookingTableRowHeader.cjs');
11
10
  var BookingTableRow = require('./BookingTableRow.cjs');
12
11
  var BookingTableRowSkeleton = require('./BookingTableRowSkeleton.cjs');
13
12
 
14
- function BookingTable({ data, loading = false }) {
15
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { sx: { overflowX: "auto", scrollBehavior: "smooth" }, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { sx: { minWidth: "1024px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Paper, { outlined: true, overflow: false, children: [
16
- /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { bgcolor: "grey.50", children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRowHeader.default, {}) }),
17
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { children: [
18
- !loading && data.map((booking, index) => /* @__PURE__ */ jsxRuntime.jsx(
19
- BookingTableRow.default,
20
- {
21
- firstName: booking.firstName,
22
- lastName: booking.lastName,
23
- notes: booking.notes,
24
- tenantNotes: booking.tenantNotes,
25
- status: booking.status,
26
- attended: booking.attended,
27
- suitable: booking.suitable,
28
- applicationSent: booking.applicationSent,
29
- applicationReceived: booking.applicationReceived
30
- },
31
- reactUid.uid(booking, index)
32
- )),
33
- loading && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
34
- /* @__PURE__ */ jsxRuntime.jsx(BookingTableRowSkeleton.default, {}),
35
- /* @__PURE__ */ jsxRuntime.jsx(BookingTableRowSkeleton.default, {}),
36
- /* @__PURE__ */ jsxRuntime.jsx(BookingTableRowSkeleton.default, {}),
37
- /* @__PURE__ */ jsxRuntime.jsx(BookingTableRowSkeleton.default, {})
38
- ] }),
39
- !loading && data.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { as: "h4", align: "center", sx: { margin: "16px 0" }, children: "No bookings" })
40
- ] })
41
- ] }) }) });
13
+ function BookingTable(_ref) {
14
+ var data = _ref.data,
15
+ _ref$loading = _ref.loading,
16
+ loading = _ref$loading === void 0 ? false : _ref$loading;
17
+ return /* @__PURE__ */React.createElement(ui.Box, {
18
+ sx: {
19
+ overflowX: "auto",
20
+ scrollBehavior: "smooth"
21
+ }
22
+ }, /* @__PURE__ */React.createElement(ui.Box, {
23
+ sx: {
24
+ minWidth: "1024px"
25
+ }
26
+ }, /* @__PURE__ */React.createElement(ui.Paper, {
27
+ outlined: true,
28
+ overflow: false
29
+ }, /* @__PURE__ */React.createElement(ui.Box, {
30
+ bgcolor: "grey.50"
31
+ }, /* @__PURE__ */React.createElement(BookingTableRowHeader.default, null)), /* @__PURE__ */React.createElement(ui.Box, null, !loading && data.map(function (booking, index) {
32
+ return /* @__PURE__ */React.createElement(BookingTableRow.default, {
33
+ key: reactUid.uid(booking, index),
34
+ firstName: booking.firstName,
35
+ lastName: booking.lastName,
36
+ notes: booking.notes,
37
+ tenantNotes: booking.tenantNotes,
38
+ status: booking.status,
39
+ attended: booking.attended,
40
+ suitable: booking.suitable,
41
+ applicationSent: booking.applicationSent,
42
+ applicationReceived: booking.applicationReceived
43
+ });
44
+ }), loading && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(BookingTableRowSkeleton.default, null), /* @__PURE__ */React.createElement(BookingTableRowSkeleton.default, null), /* @__PURE__ */React.createElement(BookingTableRowSkeleton.default, null), /* @__PURE__ */React.createElement(BookingTableRowSkeleton.default, null)), !loading && data.length === 0 && /* @__PURE__ */React.createElement(ui.Heading, {
45
+ as: "h4",
46
+ align: "center",
47
+ sx: {
48
+ margin: "16px 0"
49
+ }
50
+ }, "No bookings")))));
42
51
  }
43
52
 
44
53
  exports.default = BookingTable;
@@ -3,61 +3,105 @@
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 CheckedIcon = require('./CheckedIcon.cjs');
10
9
  var BookingTableRow_styled = require('./BookingTableRow.styled.cjs');
11
10
 
12
- const tagMap = (status) => {
11
+ var tagMap = function tagMap(status) {
13
12
  if (status === "confirmed") {
14
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Tag, { color: "success", label: "Confirmed" });
13
+ return /* @__PURE__ */React.createElement(ui.Tag, {
14
+ color: "success",
15
+ label: "Confirmed"
16
+ });
15
17
  }
16
18
  if (status === "cancelled") {
17
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Tag, { color: "error", label: "Cancelled" });
19
+ return /* @__PURE__ */React.createElement(ui.Tag, {
20
+ color: "error",
21
+ label: "Cancelled"
22
+ });
18
23
  }
19
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Tag, { color: "info", label: "Registered" });
24
+ return /* @__PURE__ */React.createElement(ui.Tag, {
25
+ color: "info",
26
+ label: "Registered"
27
+ });
20
28
  };
21
- function BookingTableRow({
22
- applicationReceived = false,
23
- applicationSent = false,
24
- attended = false,
25
- firstName,
26
- lastName,
27
- notes = void 0,
28
- status,
29
- suitable = false,
30
- tenantNotes = void 0
31
- }) {
32
- return /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { container: true, spacing: 0, children: [
33
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { item: true, container: true, xs: 6, children: [
34
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, md: 3, children: /* @__PURE__ */ jsxRuntime.jsxs(BookingTableRow_styled.StyledBookingTableRowCell, { children: [
35
- firstName,
36
- " ",
37
- lastName
38
- ] }) }),
39
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 6, md: 7, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Text, { as: "div", variant: "body2", children: [
40
- notes && /* @__PURE__ */ jsxRuntime.jsxs(ui.Text, { variant: "inherit", paragraph: !!tenantNotes, children: [
41
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Property Manager Note" }),
42
- " ",
43
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
44
- notes
45
- ] }),
46
- tenantNotes && /* @__PURE__ */ jsxRuntime.jsxs(ui.Text, { variant: "inherit", children: [
47
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Tenant Feedback" }),
48
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
49
- tenantNotes
50
- ] })
51
- ] }) }) }),
52
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, md: 2, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: tagMap(status) }) }) })
53
- ] }),
54
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { item: true, container: true, xs: 6, children: [
55
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CheckedIcon.default, { value: attended }) }) }),
56
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CheckedIcon.default, { value: suitable }) }) }),
57
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CheckedIcon.default, { value: applicationSent }) }) }),
58
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CheckedIcon.default, { value: applicationReceived }) }) })
59
- ] })
60
- ] });
29
+ function BookingTableRow(_ref) {
30
+ var _ref$applicationRecei = _ref.applicationReceived,
31
+ applicationReceived = _ref$applicationRecei === void 0 ? false : _ref$applicationRecei,
32
+ _ref$applicationSent = _ref.applicationSent,
33
+ applicationSent = _ref$applicationSent === void 0 ? false : _ref$applicationSent,
34
+ _ref$attended = _ref.attended,
35
+ attended = _ref$attended === void 0 ? false : _ref$attended,
36
+ firstName = _ref.firstName,
37
+ lastName = _ref.lastName,
38
+ _ref$notes = _ref.notes,
39
+ notes = _ref$notes === void 0 ? void 0 : _ref$notes,
40
+ status = _ref.status,
41
+ _ref$suitable = _ref.suitable,
42
+ suitable = _ref$suitable === void 0 ? false : _ref$suitable,
43
+ _ref$tenantNotes = _ref.tenantNotes,
44
+ tenantNotes = _ref$tenantNotes === void 0 ? void 0 : _ref$tenantNotes;
45
+ return /* @__PURE__ */React.createElement(ui.Grid, {
46
+ container: true,
47
+ spacing: 0
48
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
49
+ item: true,
50
+ container: true,
51
+ xs: 6
52
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
53
+ item: true,
54
+ xs: 3,
55
+ md: 3
56
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, null, firstName, " ", lastName)), /* @__PURE__ */React.createElement(ui.Grid, {
57
+ item: true,
58
+ xs: 6,
59
+ md: 7
60
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, null, /* @__PURE__ */React.createElement(ui.Text, {
61
+ as: "div",
62
+ variant: "body2"
63
+ }, notes && /* @__PURE__ */React.createElement(ui.Text, {
64
+ variant: "inherit",
65
+ paragraph: !!tenantNotes
66
+ }, /* @__PURE__ */React.createElement("strong", null, "Property Manager Note"), " ", /* @__PURE__ */React.createElement("br", null), notes), tenantNotes && /* @__PURE__ */React.createElement(ui.Text, {
67
+ variant: "inherit"
68
+ }, /* @__PURE__ */React.createElement("strong", null, "Tenant Feedback"), /* @__PURE__ */React.createElement("br", null), tenantNotes)))), /* @__PURE__ */React.createElement(ui.Grid, {
69
+ item: true,
70
+ xs: 3,
71
+ md: 2
72
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, null, /* @__PURE__ */React.createElement("span", null, tagMap(status))))), /* @__PURE__ */React.createElement(ui.Grid, {
73
+ item: true,
74
+ container: true,
75
+ xs: 6
76
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
77
+ item: true,
78
+ xs: 3
79
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
80
+ align: "center"
81
+ }, /* @__PURE__ */React.createElement(CheckedIcon.default, {
82
+ value: attended
83
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
84
+ item: true,
85
+ xs: 3
86
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
87
+ align: "center"
88
+ }, /* @__PURE__ */React.createElement(CheckedIcon.default, {
89
+ value: suitable
90
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
91
+ item: true,
92
+ xs: 3
93
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
94
+ align: "center"
95
+ }, /* @__PURE__ */React.createElement(CheckedIcon.default, {
96
+ value: applicationSent
97
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
98
+ item: true,
99
+ xs: 3
100
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
101
+ align: "center"
102
+ }, /* @__PURE__ */React.createElement(CheckedIcon.default, {
103
+ value: applicationReceived
104
+ })))));
61
105
  }
62
106
 
63
107
  exports.default = BookingTableRow;
@@ -1,42 +1,21 @@
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 StyledBookingTableRowCell = styled("div", {
8
- shouldForwardProp: (prop) => prop !== "align"
9
- })`
10
- ${({ align = "left", header, theme }) => react.css`
11
- display: flex;
12
- flex-direction: column;
13
- justify-content: ${header ? "center" : "flex-start"};
14
- padding: 6px 12px;
15
- font-size: ${header ? "12px" : "14px"};
16
- color: #717680;
17
- height: 100%;
18
-
19
- ${align === "left" && `
20
- align-items: flex-start;
21
- `}
22
-
23
- ${align === "center" && `
24
- align-items: center;
25
- text-align: center;
26
- `}
27
-
28
- ${align === "right" && `
29
- align-items: flex-end;
30
- `}
31
-
32
- ${theme.breakpoints.up("md")} {
33
- padding: 12px 24px;
34
- }
35
-
36
- @media print {
37
- padding: 12px 24px;
38
- }
39
- `}
40
- `;
8
+ var _templateObject, _templateObject2;
9
+ var StyledBookingTableRowCell = styled("div", {
10
+ shouldForwardProp: function shouldForwardProp(prop) {
11
+ return prop !== "align";
12
+ }
13
+ })(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
14
+ var _ref$align = _ref.align,
15
+ align = _ref$align === void 0 ? "left" : _ref$align,
16
+ header = _ref.header,
17
+ theme = _ref.theme;
18
+ return react.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: ", ";\n padding: 6px 12px;\n font-size: ", ";\n color: #717680;\n height: 100%;\n\n ", "\n\n ", "\n\n ", "\n\n ", " {\n padding: 12px 24px;\n }\n\n @media print {\n padding: 12px 24px;\n }\n "])), header ? "center" : "flex-start", header ? "12px" : "14px", align === "left" && "\n align-items: flex-start;\n ", align === "center" && "\n align-items: center;\n text-align: center;\n ", align === "right" && "\n align-items: flex-end;\n ", theme.breakpoints.up("md"));
19
+ });
41
20
 
42
21
  exports.StyledBookingTableRowCell = StyledBookingTableRowCell;
@@ -3,25 +3,64 @@
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 BookingTableRow_styled = require('./BookingTableRow.styled.cjs');
10
9
 
11
10
  function BookingTableRowHeader() {
12
- return /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { container: true, spacing: 0, children: [
13
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { item: true, container: true, xs: 6, children: [
14
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { header: true, children: "Name" }) }),
15
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 6, md: 7, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { header: true, children: "Comments" }) }),
16
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, md: 2, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { header: true, children: "Status" }) })
17
- ] }),
18
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { item: true, container: true, xs: 6, children: [
19
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", header: true, children: "Attendend" }) }),
20
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", header: true, children: "Suitable" }) }),
21
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", header: true, children: "Application Sent" }) }),
22
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", header: true, children: "Application Received" }) })
23
- ] })
24
- ] });
11
+ return /* @__PURE__ */React.createElement(ui.Grid, {
12
+ container: true,
13
+ spacing: 0
14
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
15
+ item: true,
16
+ container: true,
17
+ xs: 6
18
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
19
+ item: true,
20
+ xs: 3
21
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
22
+ header: true
23
+ }, "Name")), /* @__PURE__ */React.createElement(ui.Grid, {
24
+ item: true,
25
+ xs: 6,
26
+ md: 7
27
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
28
+ header: true
29
+ }, "Comments")), /* @__PURE__ */React.createElement(ui.Grid, {
30
+ item: true,
31
+ xs: 3,
32
+ md: 2
33
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
34
+ header: true
35
+ }, "Status"))), /* @__PURE__ */React.createElement(ui.Grid, {
36
+ item: true,
37
+ container: true,
38
+ xs: 6
39
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
40
+ item: true,
41
+ xs: 3
42
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
43
+ align: "center",
44
+ header: true
45
+ }, "Attendend")), /* @__PURE__ */React.createElement(ui.Grid, {
46
+ item: true,
47
+ xs: 3
48
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
49
+ align: "center",
50
+ header: true
51
+ }, "Suitable")), /* @__PURE__ */React.createElement(ui.Grid, {
52
+ item: true,
53
+ xs: 3
54
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
55
+ align: "center",
56
+ header: true
57
+ }, "Application Sent")), /* @__PURE__ */React.createElement(ui.Grid, {
58
+ item: true,
59
+ xs: 3
60
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
61
+ align: "center",
62
+ header: true
63
+ }, "Application Received"))));
25
64
  }
26
65
 
27
66
  exports.default = BookingTableRowHeader;
@@ -3,28 +3,95 @@
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 BookingTableRow_styled = require('./BookingTableRow.styled.cjs');
10
9
 
11
10
  function BookingTableRowSkeleton() {
12
- return /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { container: true, spacing: 0, children: [
13
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { item: true, container: true, xs: 12, sm: 6, children: [
14
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "85%", height: "20px", variant: "text" }) }) }),
15
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 6, md: 7, children: /* @__PURE__ */ jsxRuntime.jsxs(BookingTableRow_styled.StyledBookingTableRowCell, { children: [
16
- /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "95%", height: "20px", variant: "text" }),
17
- /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "80%", height: "20px", variant: "text" })
18
- ] }) }),
19
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 3, md: 2, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "90px", height: "30px", variant: "text" }) }) })
20
- ] }),
21
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Grid, { item: true, container: true, xs: 12, sm: 6, children: [
22
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "40px", height: "20px", variant: "text" }) }) }),
23
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "40px", height: "20px", variant: "text" }) }) }),
24
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "40px", height: "20px", variant: "text" }) }) }),
25
- /* @__PURE__ */ jsxRuntime.jsx(ui.Grid, { item: true, xs: 12, sm: 3, children: /* @__PURE__ */ jsxRuntime.jsx(BookingTableRow_styled.StyledBookingTableRowCell, { align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { width: "40px", height: "20px", variant: "text" }) }) })
26
- ] })
27
- ] });
11
+ return /* @__PURE__ */React.createElement(ui.Grid, {
12
+ container: true,
13
+ spacing: 0
14
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
15
+ item: true,
16
+ container: true,
17
+ xs: 12,
18
+ sm: 6
19
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
20
+ item: true,
21
+ xs: 12,
22
+ sm: 3
23
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, null, /* @__PURE__ */React.createElement(ui.Skeleton, {
24
+ width: "85%",
25
+ height: "20px",
26
+ variant: "text"
27
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
28
+ item: true,
29
+ xs: 12,
30
+ sm: 6,
31
+ md: 7
32
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, null, /* @__PURE__ */React.createElement(ui.Skeleton, {
33
+ width: "95%",
34
+ height: "20px",
35
+ variant: "text"
36
+ }), /* @__PURE__ */React.createElement(ui.Skeleton, {
37
+ width: "80%",
38
+ height: "20px",
39
+ variant: "text"
40
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
41
+ item: true,
42
+ xs: 12,
43
+ sm: 3,
44
+ md: 2
45
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, null, /* @__PURE__ */React.createElement(ui.Skeleton, {
46
+ width: "90px",
47
+ height: "30px",
48
+ variant: "text"
49
+ })))), /* @__PURE__ */React.createElement(ui.Grid, {
50
+ item: true,
51
+ container: true,
52
+ xs: 12,
53
+ sm: 6
54
+ }, /* @__PURE__ */React.createElement(ui.Grid, {
55
+ item: true,
56
+ xs: 12,
57
+ sm: 3
58
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
59
+ align: "center"
60
+ }, /* @__PURE__ */React.createElement(ui.Skeleton, {
61
+ width: "40px",
62
+ height: "20px",
63
+ variant: "text"
64
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
65
+ item: true,
66
+ xs: 12,
67
+ sm: 3
68
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
69
+ align: "center"
70
+ }, /* @__PURE__ */React.createElement(ui.Skeleton, {
71
+ width: "40px",
72
+ height: "20px",
73
+ variant: "text"
74
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
75
+ item: true,
76
+ xs: 12,
77
+ sm: 3
78
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
79
+ align: "center"
80
+ }, /* @__PURE__ */React.createElement(ui.Skeleton, {
81
+ width: "40px",
82
+ height: "20px",
83
+ variant: "text"
84
+ }))), /* @__PURE__ */React.createElement(ui.Grid, {
85
+ item: true,
86
+ xs: 12,
87
+ sm: 3
88
+ }, /* @__PURE__ */React.createElement(BookingTableRow_styled.StyledBookingTableRowCell, {
89
+ align: "center"
90
+ }, /* @__PURE__ */React.createElement(ui.Skeleton, {
91
+ width: "40px",
92
+ height: "20px",
93
+ variant: "text"
94
+ })))));
28
95
  }
29
96
 
30
97
  exports.default = BookingTableRowSkeleton;