@tenancy.nz/feature-ui 1.10.9 → 1.10.10
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.
- package/dist/cjs/components/BackButton.cjs +6 -3
- package/dist/cjs/components/PersonDetailHeader.cjs +20 -16
- package/dist/cjs/index.cjs +0 -2
- package/dist/esm/components/BackButton.js +6 -3
- package/dist/esm/components/PersonDetailHeader.js +20 -16
- package/dist/esm/index.js +0 -1
- package/package.json +5 -5
- package/dist/cjs/components/SkeletonContent.cjs +0 -26
- package/dist/esm/components/SkeletonContent.js +0 -22
|
@@ -2,17 +2,20 @@
|
|
|
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 ArrowLeftOutlinedIcon = require('@tenancy.nz/icons/ArrowLeftOutlined');
|
|
7
8
|
var ui = require('@tenancy.nz/ui');
|
|
8
9
|
|
|
10
|
+
var _excluded = ["onClick"];
|
|
9
11
|
function BackButton(_ref) {
|
|
10
|
-
var onClick = _ref.onClick
|
|
11
|
-
|
|
12
|
+
var onClick = _ref.onClick,
|
|
13
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
return /* @__PURE__ */React.createElement(ui.Button, _rollupPluginBabelHelpers.objectSpread2({
|
|
12
15
|
startIcon: /* @__PURE__ */React.createElement(ArrowLeftOutlinedIcon, null),
|
|
13
16
|
variant: "outlined",
|
|
14
17
|
onClick: onClick
|
|
15
|
-
}, "Back");
|
|
18
|
+
}, rest), "Back");
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
exports.default = BackButton;
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var Stack = require('@mui/material/Stack');
|
|
8
8
|
var ui = require('@tenancy.nz/ui');
|
|
9
9
|
|
|
10
|
-
var _excluded = ["
|
|
10
|
+
var _excluded = ["badgeCount", "disabled", "email", "firstName", "lastName", "mobile", "slotProps", "sx"];
|
|
11
11
|
var Badge = ui.Badge;
|
|
12
12
|
var badgeSlotProps = {
|
|
13
13
|
badge: {
|
|
@@ -34,11 +34,7 @@ function isMultiple(badgeCount) {
|
|
|
34
34
|
return Number.isFinite(count) && count > 1;
|
|
35
35
|
}
|
|
36
36
|
function PersonDetailHeader(_ref) {
|
|
37
|
-
var _ref$
|
|
38
|
-
avatarColor = _ref$avatarColor === void 0 ? "grey" : _ref$avatarColor,
|
|
39
|
-
_ref$avatarUrl = _ref.avatarUrl,
|
|
40
|
-
avatarUrl = _ref$avatarUrl === void 0 ? void 0 : _ref$avatarUrl,
|
|
41
|
-
_ref$badgeCount = _ref.badgeCount,
|
|
37
|
+
var _ref$badgeCount = _ref.badgeCount,
|
|
42
38
|
badgeCount = _ref$badgeCount === void 0 ? void 0 : _ref$badgeCount,
|
|
43
39
|
_ref$disabled = _ref.disabled,
|
|
44
40
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -50,41 +46,49 @@ function PersonDetailHeader(_ref) {
|
|
|
50
46
|
lastName = _ref$lastName === void 0 ? void 0 : _ref$lastName,
|
|
51
47
|
_ref$mobile = _ref.mobile,
|
|
52
48
|
mobile = _ref$mobile === void 0 ? void 0 : _ref$mobile,
|
|
49
|
+
_ref$slotProps = _ref.slotProps,
|
|
50
|
+
slotProps = _ref$slotProps === void 0 ? {} : _ref$slotProps,
|
|
53
51
|
_ref$sx = _ref.sx,
|
|
54
52
|
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
55
53
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
56
54
|
var name = [firstName, lastName].filter(Boolean).join(" ");
|
|
57
55
|
var showBadge = isMultiple(badgeCount);
|
|
56
|
+
var _slotProps$avatar = slotProps.avatar,
|
|
57
|
+
avatarProps = _slotProps$avatar === void 0 ? {} : _slotProps$avatar,
|
|
58
|
+
_slotProps$title = slotProps.title,
|
|
59
|
+
titleProps = _slotProps$title === void 0 ? {} : _slotProps$title,
|
|
60
|
+
_slotProps$text = slotProps.text,
|
|
61
|
+
textProps = _slotProps$text === void 0 ? {} : _slotProps$text;
|
|
62
|
+
var _textProps$sx = textProps.sx,
|
|
63
|
+
textSx = _textProps$sx === void 0 ? {} : _textProps$sx;
|
|
58
64
|
return /* @__PURE__ */React.createElement(Stack, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
|
|
59
65
|
direction: "row",
|
|
60
66
|
alignItems: "center",
|
|
61
67
|
gap: 4
|
|
62
68
|
}, rest), {}, {
|
|
63
69
|
sx: sx
|
|
64
|
-
}), /* @__PURE__ */React.createElement(ui.Avatar, {
|
|
65
|
-
color: avatarColor,
|
|
66
|
-
src: avatarUrl,
|
|
70
|
+
}), /* @__PURE__ */React.createElement(ui.Avatar, _rollupPluginBabelHelpers.objectSpread2({
|
|
67
71
|
alt: name,
|
|
68
72
|
size: 64
|
|
69
|
-
}), /* @__PURE__ */React.createElement(Stack, {
|
|
73
|
+
}, avatarProps)), /* @__PURE__ */React.createElement(Stack, {
|
|
70
74
|
gap: 2
|
|
71
75
|
}, (name || showBadge) && /* @__PURE__ */React.createElement(Stack, {
|
|
72
76
|
direction: "row",
|
|
73
77
|
gap: 2,
|
|
74
78
|
alignItems: "center"
|
|
75
|
-
}, name && /* @__PURE__ */React.createElement(ui.Heading, {
|
|
79
|
+
}, name && /* @__PURE__ */React.createElement(ui.Heading, _rollupPluginBabelHelpers.objectSpread2({
|
|
76
80
|
as: "h5",
|
|
77
81
|
color: "inherit"
|
|
78
|
-
}, name), showBadge && /* @__PURE__ */React.createElement(Badge, {
|
|
82
|
+
}, titleProps), name), showBadge && /* @__PURE__ */React.createElement(Badge, {
|
|
79
83
|
badgeContent: badgeCount,
|
|
80
84
|
color: "primary",
|
|
81
85
|
slotProps: badgeSlotProps
|
|
82
|
-
})), (email || mobile) && /* @__PURE__ */React.createElement(Stack, {
|
|
83
|
-
sx: {
|
|
86
|
+
})), (email || mobile) && /* @__PURE__ */React.createElement(Stack, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, textProps), {}, {
|
|
87
|
+
sx: _rollupPluginBabelHelpers.objectSpread2({
|
|
84
88
|
color: disabled ? CONTACT_TEXT.disabled : CONTACT_TEXT.default,
|
|
85
89
|
fontSize: "12px"
|
|
86
|
-
}
|
|
87
|
-
}, email && /* @__PURE__ */React.createElement(ui.Text, {
|
|
90
|
+
}, textSx)
|
|
91
|
+
}), email && /* @__PURE__ */React.createElement(ui.Text, {
|
|
88
92
|
variant: "inherit",
|
|
89
93
|
weight: "500"
|
|
90
94
|
}, email), mobile && /* @__PURE__ */React.createElement(ui.Text, {
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -28,7 +28,6 @@ var PersonDetailHeader = require('./components/PersonDetailHeader.cjs');
|
|
|
28
28
|
var PropertyCard = require('./components/PropertyCard.cjs');
|
|
29
29
|
var ScrollTopButton = require('./components/ScrollTopButton.cjs');
|
|
30
30
|
var StatusButton = require('./components/StatusButton.cjs');
|
|
31
|
-
var SkeletonContent = require('./components/SkeletonContent.cjs');
|
|
32
31
|
var TenantAvatarGroup = require('./components/TenantAvatarGroup.cjs');
|
|
33
32
|
|
|
34
33
|
|
|
@@ -61,5 +60,4 @@ exports.PersonDetailHeader = PersonDetailHeader.default;
|
|
|
61
60
|
exports.PropertyCard = PropertyCard.default;
|
|
62
61
|
exports.ScrollTopButton = ScrollTopButton.default;
|
|
63
62
|
exports.StatusButton = StatusButton.default;
|
|
64
|
-
exports.SkeletonContent = SkeletonContent.default;
|
|
65
63
|
exports.TenantAvatarGroup = TenantAvatarGroup.default;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ArrowLeftOutlinedIcon from '@tenancy.nz/icons/ArrowLeftOutlined';
|
|
3
4
|
import { Button } from '@tenancy.nz/ui';
|
|
4
5
|
|
|
6
|
+
var _excluded = ["onClick"];
|
|
5
7
|
function BackButton(_ref) {
|
|
6
|
-
var onClick = _ref.onClick
|
|
7
|
-
|
|
8
|
+
var onClick = _ref.onClick,
|
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
return /* @__PURE__ */React.createElement(Button, _objectSpread2({
|
|
8
11
|
startIcon: /* @__PURE__ */React.createElement(ArrowLeftOutlinedIcon, null),
|
|
9
12
|
variant: "outlined",
|
|
10
13
|
onClick: onClick
|
|
11
|
-
}, "Back");
|
|
14
|
+
}, rest), "Back");
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
export { BackButton as default };
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import Stack from '@mui/material/Stack';
|
|
4
4
|
import { token, Avatar, Heading, Badge as Badge$1, Text } from '@tenancy.nz/ui';
|
|
5
5
|
|
|
6
|
-
var _excluded = ["
|
|
6
|
+
var _excluded = ["badgeCount", "disabled", "email", "firstName", "lastName", "mobile", "slotProps", "sx"];
|
|
7
7
|
var Badge = Badge$1;
|
|
8
8
|
var badgeSlotProps = {
|
|
9
9
|
badge: {
|
|
@@ -30,11 +30,7 @@ function isMultiple(badgeCount) {
|
|
|
30
30
|
return Number.isFinite(count) && count > 1;
|
|
31
31
|
}
|
|
32
32
|
function PersonDetailHeader(_ref) {
|
|
33
|
-
var _ref$
|
|
34
|
-
avatarColor = _ref$avatarColor === void 0 ? "grey" : _ref$avatarColor,
|
|
35
|
-
_ref$avatarUrl = _ref.avatarUrl,
|
|
36
|
-
avatarUrl = _ref$avatarUrl === void 0 ? void 0 : _ref$avatarUrl,
|
|
37
|
-
_ref$badgeCount = _ref.badgeCount,
|
|
33
|
+
var _ref$badgeCount = _ref.badgeCount,
|
|
38
34
|
badgeCount = _ref$badgeCount === void 0 ? void 0 : _ref$badgeCount,
|
|
39
35
|
_ref$disabled = _ref.disabled,
|
|
40
36
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -46,41 +42,49 @@ function PersonDetailHeader(_ref) {
|
|
|
46
42
|
lastName = _ref$lastName === void 0 ? void 0 : _ref$lastName,
|
|
47
43
|
_ref$mobile = _ref.mobile,
|
|
48
44
|
mobile = _ref$mobile === void 0 ? void 0 : _ref$mobile,
|
|
45
|
+
_ref$slotProps = _ref.slotProps,
|
|
46
|
+
slotProps = _ref$slotProps === void 0 ? {} : _ref$slotProps,
|
|
49
47
|
_ref$sx = _ref.sx,
|
|
50
48
|
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
51
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
52
50
|
var name = [firstName, lastName].filter(Boolean).join(" ");
|
|
53
51
|
var showBadge = isMultiple(badgeCount);
|
|
52
|
+
var _slotProps$avatar = slotProps.avatar,
|
|
53
|
+
avatarProps = _slotProps$avatar === void 0 ? {} : _slotProps$avatar,
|
|
54
|
+
_slotProps$title = slotProps.title,
|
|
55
|
+
titleProps = _slotProps$title === void 0 ? {} : _slotProps$title,
|
|
56
|
+
_slotProps$text = slotProps.text,
|
|
57
|
+
textProps = _slotProps$text === void 0 ? {} : _slotProps$text;
|
|
58
|
+
var _textProps$sx = textProps.sx,
|
|
59
|
+
textSx = _textProps$sx === void 0 ? {} : _textProps$sx;
|
|
54
60
|
return /* @__PURE__ */React.createElement(Stack, _objectSpread2(_objectSpread2({
|
|
55
61
|
direction: "row",
|
|
56
62
|
alignItems: "center",
|
|
57
63
|
gap: 4
|
|
58
64
|
}, rest), {}, {
|
|
59
65
|
sx: sx
|
|
60
|
-
}), /* @__PURE__ */React.createElement(Avatar, {
|
|
61
|
-
color: avatarColor,
|
|
62
|
-
src: avatarUrl,
|
|
66
|
+
}), /* @__PURE__ */React.createElement(Avatar, _objectSpread2({
|
|
63
67
|
alt: name,
|
|
64
68
|
size: 64
|
|
65
|
-
}), /* @__PURE__ */React.createElement(Stack, {
|
|
69
|
+
}, avatarProps)), /* @__PURE__ */React.createElement(Stack, {
|
|
66
70
|
gap: 2
|
|
67
71
|
}, (name || showBadge) && /* @__PURE__ */React.createElement(Stack, {
|
|
68
72
|
direction: "row",
|
|
69
73
|
gap: 2,
|
|
70
74
|
alignItems: "center"
|
|
71
|
-
}, name && /* @__PURE__ */React.createElement(Heading, {
|
|
75
|
+
}, name && /* @__PURE__ */React.createElement(Heading, _objectSpread2({
|
|
72
76
|
as: "h5",
|
|
73
77
|
color: "inherit"
|
|
74
|
-
}, name), showBadge && /* @__PURE__ */React.createElement(Badge, {
|
|
78
|
+
}, titleProps), name), showBadge && /* @__PURE__ */React.createElement(Badge, {
|
|
75
79
|
badgeContent: badgeCount,
|
|
76
80
|
color: "primary",
|
|
77
81
|
slotProps: badgeSlotProps
|
|
78
|
-
})), (email || mobile) && /* @__PURE__ */React.createElement(Stack, {
|
|
79
|
-
sx: {
|
|
82
|
+
})), (email || mobile) && /* @__PURE__ */React.createElement(Stack, _objectSpread2(_objectSpread2({}, textProps), {}, {
|
|
83
|
+
sx: _objectSpread2({
|
|
80
84
|
color: disabled ? CONTACT_TEXT.disabled : CONTACT_TEXT.default,
|
|
81
85
|
fontSize: "12px"
|
|
82
|
-
}
|
|
83
|
-
}, email && /* @__PURE__ */React.createElement(Text, {
|
|
86
|
+
}, textSx)
|
|
87
|
+
}), email && /* @__PURE__ */React.createElement(Text, {
|
|
84
88
|
variant: "inherit",
|
|
85
89
|
weight: "500"
|
|
86
90
|
}, email), mobile && /* @__PURE__ */React.createElement(Text, {
|
package/dist/esm/index.js
CHANGED
|
@@ -26,5 +26,4 @@ export { default as PersonDetailHeader } from './components/PersonDetailHeader.j
|
|
|
26
26
|
export { default as PropertyCard } from './components/PropertyCard.js';
|
|
27
27
|
export { default as ScrollTopButton } from './components/ScrollTopButton.js';
|
|
28
28
|
export { default as StatusButton } from './components/StatusButton.js';
|
|
29
|
-
export { default as SkeletonContent } from './components/SkeletonContent.js';
|
|
30
29
|
export { default as TenantAvatarGroup } from './components/TenantAvatarGroup.js';
|
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.10.
|
|
4
|
+
"version": "1.10.10",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/cjs/index.cjs",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"classnames": "^2.2.6",
|
|
18
18
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
19
19
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
20
|
-
"@tenancy.nz/icons": "1.10.
|
|
21
|
-
"@tenancy.nz/ui": "1.10.
|
|
20
|
+
"@tenancy.nz/icons": "1.10.10",
|
|
21
|
+
"@tenancy.nz/ui": "1.10.10"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@emotion/react": "^11.14.0",
|
|
25
25
|
"@emotion/styled": "^11.14.1",
|
|
26
26
|
"@mui/material": "^7.3.1",
|
|
27
|
-
"@tenancy.nz/icons": "1.10.
|
|
28
|
-
"@tenancy.nz/ui": "1.10.
|
|
27
|
+
"@tenancy.nz/icons": "1.10.10",
|
|
28
|
+
"@tenancy.nz/ui": "1.10.10"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-uid": "^2.4.0"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var ui = require('@tenancy.nz/ui');
|
|
8
|
-
|
|
9
|
-
var _excluded = ["children", "loading", "variant"];
|
|
10
|
-
function SkeletonContent(_ref) {
|
|
11
|
-
var _ref$children = _ref.children,
|
|
12
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
13
|
-
_ref$loading = _ref.loading,
|
|
14
|
-
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
15
|
-
_ref$variant = _ref.variant,
|
|
16
|
-
variant = _ref$variant === void 0 ? "text" : _ref$variant,
|
|
17
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
if (loading) {
|
|
19
|
-
return /* @__PURE__ */React.createElement(ui.Skeleton, _rollupPluginBabelHelpers.objectSpread2({
|
|
20
|
-
variant: variant
|
|
21
|
-
}, rest));
|
|
22
|
-
}
|
|
23
|
-
return children;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
exports.default = SkeletonContent;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Skeleton } from '@tenancy.nz/ui';
|
|
4
|
-
|
|
5
|
-
var _excluded = ["children", "loading", "variant"];
|
|
6
|
-
function SkeletonContent(_ref) {
|
|
7
|
-
var _ref$children = _ref.children,
|
|
8
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
9
|
-
_ref$loading = _ref.loading,
|
|
10
|
-
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
11
|
-
_ref$variant = _ref.variant,
|
|
12
|
-
variant = _ref$variant === void 0 ? "text" : _ref$variant,
|
|
13
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
if (loading) {
|
|
15
|
-
return /* @__PURE__ */React.createElement(Skeleton, _objectSpread2({
|
|
16
|
-
variant: variant
|
|
17
|
-
}, rest));
|
|
18
|
-
}
|
|
19
|
-
return children;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { SkeletonContent as default };
|