@justins-home/web-domain 0.1.0
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/.turbo/turbo-build.log +14 -0
- package/CHANGELOG.md +24 -0
- package/dist/index.js +41 -0
- package/dist/index.mjs +15 -0
- package/package.json +24 -0
- package/src/index.ts +38 -0
- package/src/inspection/inspection-status-badge.tsx +18 -0
- package/src/notifications/notification-bell.tsx +18 -0
- package/src/property/property-card.tsx +30 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
WARN Issue while reading "/home/runner/work/justins-home-platform-ui/justins-home-platform-ui/.npmrc". Failed to replace env in config: ${NODE_AUTH_TOKEN}
|
|
2
|
+
|
|
3
|
+
> @justins-home/web-domain@0.1.0 build /home/runner/work/justins-home-platform-ui/justins-home-platform-ui/packages/web-domain
|
|
4
|
+
> tsup src/index.ts --format esm,cjs
|
|
5
|
+
|
|
6
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Target: node16
|
|
9
|
+
[34mESM[39m Build start
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m2.03 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 29ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.01 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 30ms
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @justins-home/web-domain
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- aced108: added minor pumb
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [aced108]
|
|
12
|
+
- Updated dependencies [26690e2]
|
|
13
|
+
- @justins-home/factories@0.1.0
|
|
14
|
+
- @justins-home/web-ui@1.0.0
|
|
15
|
+
- @justins-home/enums@0.1.0
|
|
16
|
+
- @justins-home/types@1.0.0
|
|
17
|
+
|
|
18
|
+
## 0.0.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [3f39ece]
|
|
23
|
+
- @justins-home/types@0.0.2
|
|
24
|
+
- @justins-home/factories@0.0.1
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/index.ts
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
|
+
PropertyCard: () => PropertyCard
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(index_exports);
|
|
25
|
+
|
|
26
|
+
// src/property/property-card.tsx
|
|
27
|
+
var import_web_ui = require("@justins-home/web-ui");
|
|
28
|
+
function PropertyCard({ listing }) {
|
|
29
|
+
var _a, _b, _c, _d;
|
|
30
|
+
return /* @__PURE__ */ React.createElement(import_web_ui.Card, { className: "p-4 space-y-3 bg-red-400" }, /* @__PURE__ */ React.createElement(
|
|
31
|
+
"img",
|
|
32
|
+
{
|
|
33
|
+
src: (_a = listing.media) == null ? void 0 : _a.cover,
|
|
34
|
+
className: "h-48 w-full rounded-md object-cover"
|
|
35
|
+
}
|
|
36
|
+
), /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement("h3", { className: "font-semibold text-lg" }, (_b = listing.summary) == null ? void 0 : _b.property_type), /* @__PURE__ */ React.createElement(import_web_ui.Badge, null, listing.state)), /* @__PURE__ */ React.createElement("div", { className: "text-sm text-muted-foreground" }, (_c = listing.summary) == null ? void 0 : _c.city), /* @__PURE__ */ React.createElement("div", { className: "text-lg font-bold" }, "\xA3", (_d = listing.price) == null ? void 0 : _d.amount));
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
PropertyCard
|
|
41
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/property/property-card.tsx
|
|
2
|
+
import { Card, Badge } from "@justins-home/web-ui";
|
|
3
|
+
function PropertyCard({ listing }) {
|
|
4
|
+
var _a, _b, _c, _d;
|
|
5
|
+
return /* @__PURE__ */ React.createElement(Card, { className: "p-4 space-y-3 bg-red-400" }, /* @__PURE__ */ React.createElement(
|
|
6
|
+
"img",
|
|
7
|
+
{
|
|
8
|
+
src: (_a = listing.media) == null ? void 0 : _a.cover,
|
|
9
|
+
className: "h-48 w-full rounded-md object-cover"
|
|
10
|
+
}
|
|
11
|
+
), /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React.createElement("h3", { className: "font-semibold text-lg" }, (_b = listing.summary) == null ? void 0 : _b.property_type), /* @__PURE__ */ React.createElement(Badge, null, listing.state)), /* @__PURE__ */ React.createElement("div", { className: "text-sm text-muted-foreground" }, (_c = listing.summary) == null ? void 0 : _c.city), /* @__PURE__ */ React.createElement("div", { className: "text-lg font-bold" }, "\xA3", (_d = listing.price) == null ? void 0 : _d.amount));
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
PropertyCard
|
|
15
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justins-home/web-domain",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "src/index.ts",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@justins-home/web-ui": "1.0.0",
|
|
8
|
+
"@justins-home/types": "1.0.0",
|
|
9
|
+
"@justins-home/enums": "0.1.0",
|
|
10
|
+
"@justins-home/factories": "0.1.0"
|
|
11
|
+
},
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"react": "^18 || ^19"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"lint": "eslint src",
|
|
20
|
+
"check-types": "tsc --noEmit -p ../../tsconfig.base.json",
|
|
21
|
+
"build": "tsup src/index.ts --format esm,cjs",
|
|
22
|
+
"test": "vitest"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * from './property/property-card';
|
|
2
|
+
// export * from './property/property-gallery';
|
|
3
|
+
// export * from './property/property-summary-card';
|
|
4
|
+
// export * from './property/property-features-list';
|
|
5
|
+
// export * from './property/property-overview-panel';
|
|
6
|
+
// export * from './property/property-map-view';
|
|
7
|
+
|
|
8
|
+
// export * from './tenancy/tenancy-summary-card';
|
|
9
|
+
// export * from './tenancy/tenancy-timeline';
|
|
10
|
+
// export * from './tenancy/tenancy-lifecycle-stepper';
|
|
11
|
+
// export * from './tenancy/tenancy-health-indicator';
|
|
12
|
+
|
|
13
|
+
// export * from './inspection/inspection-summary-card';
|
|
14
|
+
// export * from './inspection/inspection-timeline';
|
|
15
|
+
// export * from './inspection/inspection-status-badge';
|
|
16
|
+
// export * from './inspection/inspection-checklist';
|
|
17
|
+
|
|
18
|
+
// export * from './maintenance/maintenance-request-card';
|
|
19
|
+
// export * from './maintenance/repair-timeline';
|
|
20
|
+
// export * from './maintenance/repair-progress-tracker';
|
|
21
|
+
// export * from './maintenance/maintenance-attachment-viewer';
|
|
22
|
+
|
|
23
|
+
// export * from './payments/rent-ledger-table';
|
|
24
|
+
// export * from './payments/payment-summary-card';
|
|
25
|
+
// export * from './payments/payment-status-badge';
|
|
26
|
+
|
|
27
|
+
// export * from './notifications/notification-bell';
|
|
28
|
+
// export * from './notifications/notification-list';
|
|
29
|
+
// export * from './notifications/notification-item';
|
|
30
|
+
// export * from './notifications/notification-center-panel';
|
|
31
|
+
|
|
32
|
+
// export * from './users/user-avatar';
|
|
33
|
+
// export * from './users/user-badge';
|
|
34
|
+
// export * from './users/user-profile-card';
|
|
35
|
+
|
|
36
|
+
// export * from './compliance/compliance-status-badge';
|
|
37
|
+
// export * from './compliance/compliance-overview-card';
|
|
38
|
+
// export * from './compliance/compliance-timeline';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Badge } from '@justins-home/web-ui';
|
|
2
|
+
import { InspectionStatus } from '@justins-home/enums';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
status: InspectionStatus;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const STATUS_COLORS: Record<InspectionStatus, string> = {
|
|
9
|
+
scheduled: 'bg-blue-100 text-blue-700',
|
|
10
|
+
completed: 'bg-green-100 text-green-700',
|
|
11
|
+
cancelled: 'bg-gray-200 text-gray-700',
|
|
12
|
+
overdue: 'bg-red-100 text-red-700',
|
|
13
|
+
rescheduled: 'bg-yellow-100 text-yellow-700',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function InspectionStatusBadge({ status }: Props) {
|
|
17
|
+
return <Badge className={STATUS_COLORS[status]}>{status}</Badge>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Bell } from 'lucide-react';
|
|
2
|
+
import { Badge } from '@justins-home/web-ui';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
unread: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function NotificationBell({ unread }: Props) {
|
|
9
|
+
return (
|
|
10
|
+
<div className="relative">
|
|
11
|
+
<Bell className="h-5 w-5" />
|
|
12
|
+
|
|
13
|
+
{unread > 0 && (
|
|
14
|
+
<Badge className="absolute -top-2 -right-2">{unread}</Badge>
|
|
15
|
+
)}
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Card, Badge } from '@justins-home/web-ui';
|
|
2
|
+
import type { PropertyListingResource } from '@justins-home/types';
|
|
3
|
+
|
|
4
|
+
interface PropertyCardProps {
|
|
5
|
+
listing: PropertyListingResource;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function PropertyCard({ listing }: PropertyCardProps) {
|
|
9
|
+
return (
|
|
10
|
+
<Card className="p-4 space-y-3 bg-red-400">
|
|
11
|
+
<img
|
|
12
|
+
src={listing.media?.cover as string}
|
|
13
|
+
className="h-48 w-full rounded-md object-cover"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<div className="flex items-center justify-between">
|
|
17
|
+
<h3 className="font-semibold text-lg">
|
|
18
|
+
{listing.summary?.property_type}
|
|
19
|
+
</h3>
|
|
20
|
+
<Badge>{listing.state}</Badge>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div className="text-sm text-muted-foreground">
|
|
24
|
+
{listing.summary?.city}
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div className="text-lg font-bold">£{listing.price?.amount}</div>
|
|
28
|
+
</Card>
|
|
29
|
+
);
|
|
30
|
+
}
|