@burdenoff/microfe-movethewheels 2026.510.105
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/README.md +82 -0
- package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
- package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
- package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
- package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
- package/dist/CustomersPage-CDjjeCEL.js +119 -0
- package/dist/DashboardPage-8iTPXRAG.js +374 -0
- package/dist/DataTable-CRIKfdIN.js +239 -0
- package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
- package/dist/DriversPage-16O8fVmf.js +127 -0
- package/dist/FinancePage-BYUxK5dR.js +154 -0
- package/dist/FleetPage-CHYETCWT.js +293 -0
- package/dist/ImportExportPage-C3MKKxfc.js +232 -0
- package/dist/InventoryPage--822AxZM.js +223 -0
- package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
- package/dist/MarketplacePage-DjEqudfM.js +192 -0
- package/dist/MetricCard-GTbxAk1a.js +135 -0
- package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
- package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
- package/dist/PageLayout-B7b0vl0R.js +1894 -0
- package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
- package/dist/ProductsPage-CUj9JpnW.js +131 -0
- package/dist/ReportsPage-DblO5CdJ.js +227 -0
- package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
- package/dist/RoutesPage-8hrv6RWT.js +116 -0
- package/dist/SettingsPage-BJ5BQeqn.js +247 -0
- package/dist/StatusBadge-BrrwraIA.js +206 -0
- package/dist/TrackingPage-BGqHDh-w.js +322 -0
- package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
- package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
- package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
- package/dist/WarehousesPage-QTiuDuXy.js +121 -0
- package/dist/arrow-left-6CiLhqVp.js +11 -0
- package/dist/box-BunB_4UH.js +18 -0
- package/dist/chart-column-DWwVEVQ-.js +22 -0
- package/dist/chevron-right-DhZVf20o.js +8 -0
- package/dist/circle-alert-D5f6RZxt.js +26 -0
- package/dist/circle-check-big-D-JMHcTe.js +11 -0
- package/dist/clock-CvwBKbQP.js +13 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dollar-sign-CP9qeU5d.js +14 -0
- package/dist/download-CIuG04pJ.js +21 -0
- package/dist/file-text-Dd_thxkn.js +26 -0
- package/dist/filter-DyRMX9CU.js +8 -0
- package/dist/formatters-_vJlC-47.js +50 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-types.d.ts +20715 -0
- package/dist/generated/wspace-operations.d.ts +3704 -0
- package/dist/generated/wspace-types.d.ts +53362 -0
- package/dist/graphqlClient-CdJyR_ed.js +55 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +772 -0
- package/dist/map-BqH1cBJi.js +18 -0
- package/dist/map-pin-CFBOmh-A.js +13 -0
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
- package/dist/movethewheels/components/DataTable.d.ts +32 -0
- package/dist/movethewheels/components/MetricCard.d.ts +43 -0
- package/dist/movethewheels/components/PageLayout.d.ts +68 -0
- package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
- package/dist/movethewheels/components/index.d.ts +10 -0
- package/dist/movethewheels/components/ui.d.ts +22 -0
- package/dist/movethewheels/constants/index.d.ts +24 -0
- package/dist/movethewheels/constants/mockData.d.ts +33 -0
- package/dist/movethewheels/hooks/index.d.ts +12 -0
- package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
- package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
- package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
- package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
- package/dist/movethewheels/index.d.ts +30 -0
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
- package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
- package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
- package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
- package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
- package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
- package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
- package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
- package/dist/movethewheels/types/index.d.ts +655 -0
- package/dist/movethewheels/utils/cn.d.ts +6 -0
- package/dist/movethewheels/utils/formatters.d.ts +60 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
- package/dist/movethewheels/utils/index.d.ts +7 -0
- package/dist/movethewheels/utils/navigation.d.ts +23 -0
- package/dist/navigation-BgnOfsVd.js +6 -0
- package/dist/navigation-C2fY_aS9.js +8 -0
- package/dist/package-DVZbDRcV.js +22 -0
- package/dist/phone-KdwpVmC4.js +18 -0
- package/dist/plus-Bl7uX6Ji.js +11 -0
- package/dist/refresh-cw-BYjl3K-8.js +22 -0
- package/dist/route-Ce_poKFi.js +51 -0
- package/dist/save-C-qDVat-.js +18 -0
- package/dist/search-5pdn5eOO.js +13 -0
- package/dist/settings-C4kIDsYg.js +28 -0
- package/dist/square-pen-BwQ67vLE.js +11 -0
- package/dist/star-BlVsC3Ad.js +8 -0
- package/dist/store-DTmQT5M0.js +26 -0
- package/dist/trending-up-C1faflCI.js +11 -0
- package/dist/triangle-alert-CUoVAA4L.js +18 -0
- package/dist/truck-BmDAzu05.js +30 -0
- package/dist/useAnalytics-ph7eTIK6.js +297 -0
- package/dist/useCustomers-bS3a4ytk.js +186 -0
- package/dist/useFleet-BdETplNE.js +398 -0
- package/dist/useInventory-Dwn18FPz.js +323 -0
- package/dist/useOrders-D_3_hGMp.js +324 -0
- package/dist/useRoutes-v4aBaS-E.js +224 -0
- package/dist/useTracking-De2KIUNu.js +261 -0
- package/dist/user-BplzDrLP.js +13 -0
- package/dist/users-i-igmsP4.js +24 -0
- package/dist/warehouse-DewG0PXh.js +25 -0
- package/dist/wrench-CoSDEIC7.js +31 -0
- package/package.json +107 -0
- package/src/dev/main.tsx +110 -0
- package/src/dev/styles.css +139 -0
- package/src/generated/global-operations.ts +2 -0
- package/src/generated/global-types.ts +24048 -0
- package/src/generated/wspace-operations.ts +3734 -0
- package/src/generated/wspace-types.ts +60715 -0
- package/src/index.ts +4 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
- package/src/movethewheels/components/DataTable.tsx +367 -0
- package/src/movethewheels/components/MetricCard.tsx +180 -0
- package/src/movethewheels/components/PageLayout.tsx +234 -0
- package/src/movethewheels/components/StatusBadge.tsx +243 -0
- package/src/movethewheels/components/index.ts +26 -0
- package/src/movethewheels/components/ui.tsx +124 -0
- package/src/movethewheels/constants/index.ts +65 -0
- package/src/movethewheels/constants/mockData.ts +1342 -0
- package/src/movethewheels/hooks/index.ts +55 -0
- package/src/movethewheels/hooks/useAnalytics.ts +476 -0
- package/src/movethewheels/hooks/useCustomers.ts +359 -0
- package/src/movethewheels/hooks/useFleet.ts +778 -0
- package/src/movethewheels/hooks/useInventory.ts +632 -0
- package/src/movethewheels/hooks/useOrders.ts +703 -0
- package/src/movethewheels/hooks/useRoutes.ts +453 -0
- package/src/movethewheels/hooks/useTracking.ts +505 -0
- package/src/movethewheels/index.ts +68 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
- package/src/movethewheels/pages/CustomersPage.tsx +115 -0
- package/src/movethewheels/pages/DashboardPage.tsx +414 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
- package/src/movethewheels/pages/DriversPage.tsx +118 -0
- package/src/movethewheels/pages/FinancePage.tsx +141 -0
- package/src/movethewheels/pages/FleetPage.tsx +289 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
- package/src/movethewheels/pages/InventoryPage.tsx +212 -0
- package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
- package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
- package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
- package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
- package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
- package/src/movethewheels/pages/ProductsPage.tsx +124 -0
- package/src/movethewheels/pages/ReportsPage.tsx +164 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
- package/src/movethewheels/pages/RoutesPage.tsx +104 -0
- package/src/movethewheels/pages/SettingsPage.tsx +242 -0
- package/src/movethewheels/pages/TrackingPage.tsx +419 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
- package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
- package/src/movethewheels/store/movethewheelsStore.ts +136 -0
- package/src/movethewheels/types/index.ts +744 -0
- package/src/movethewheels/utils/cn.ts +9 -0
- package/src/movethewheels/utils/formatters.ts +215 -0
- package/src/movethewheels/utils/graphqlClient.ts +63 -0
- package/src/movethewheels/utils/index.ts +8 -0
- package/src/movethewheels/utils/navigation.ts +70 -0
- package/src/operations/global/.gitkeep +0 -0
- package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
- package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
- package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
- package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
- package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
- package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
- package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
- package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
- package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { A as e, d as t, f as n, g as r, h as i, i as a, l as o, u as s } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as c } from "./clock-CvwBKbQP.js";
|
|
3
|
+
import { t as l } from "./filter-DyRMX9CU.js";
|
|
4
|
+
import { t as u } from "./map-pin-CFBOmh-A.js";
|
|
5
|
+
import { t as d } from "./search-5pdn5eOO.js";
|
|
6
|
+
import { t as f } from "./star-BlVsC3Ad.js";
|
|
7
|
+
import { t as p } from "./store-DTmQT5M0.js";
|
|
8
|
+
import { r as m, t as h } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { n as g } from "./formatters-_vJlC-47.js";
|
|
10
|
+
import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
|
|
11
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
12
|
+
//#region src/movethewheels/pages/MarketplacePage.tsx
|
|
13
|
+
var C = "\n query ListServiceProviders($filter: ServiceProviderFilterInput, $pagination: PaginationInput) {\n serviceProviders(filter: $filter, pagination: $pagination) {\n id\n name\n type\n description\n rating\n isVerified\n isActive\n services\n contactInfo\n }\n }\n", w = "\n query ListServiceOfferings($filter: ServiceOfferingFilterInput, $pagination: PaginationInput) {\n serviceOfferings(filter: $filter, pagination: $pagination) {\n id\n providerId\n name\n description\n category\n price\n currency\n availability\n provider {\n id\n name\n type\n rating\n }\n }\n }\n";
|
|
14
|
+
function T() {
|
|
15
|
+
let { apiGatewayUrl: T, authToken: E, workspaceToken: D, workspaceId: O, tenantId: k, currentUser: A } = m(), [j, M] = b([]), [N, P] = b([]), [F, I] = b(""), L = y(() => ({
|
|
16
|
+
apiGatewayUrl: T,
|
|
17
|
+
authToken: E,
|
|
18
|
+
workspaceToken: D,
|
|
19
|
+
workspaceId: O,
|
|
20
|
+
tenantId: k,
|
|
21
|
+
actorId: A?.id
|
|
22
|
+
}), [
|
|
23
|
+
T,
|
|
24
|
+
E,
|
|
25
|
+
D,
|
|
26
|
+
O,
|
|
27
|
+
k,
|
|
28
|
+
A?.id
|
|
29
|
+
]), R = _(async () => {
|
|
30
|
+
let [e, t] = await Promise.all([h(L, C, { pagination: {
|
|
31
|
+
limit: 200,
|
|
32
|
+
offset: 0
|
|
33
|
+
} }), h(L, w, { pagination: {
|
|
34
|
+
limit: 200,
|
|
35
|
+
offset: 0
|
|
36
|
+
} })]);
|
|
37
|
+
M(e.serviceProviders), P(t.serviceOfferings);
|
|
38
|
+
}, [L]);
|
|
39
|
+
v(() => {
|
|
40
|
+
R();
|
|
41
|
+
}, [R]);
|
|
42
|
+
let z = y(() => {
|
|
43
|
+
let e = F.trim().toLowerCase();
|
|
44
|
+
return e ? j.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || t.type.toLowerCase().includes(e)) : j;
|
|
45
|
+
}, [j, F]), B = y(() => {
|
|
46
|
+
let e = F.trim().toLowerCase();
|
|
47
|
+
return e ? N.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || (t.category ?? "").toLowerCase().includes(e)) : N;
|
|
48
|
+
}, [N, F]);
|
|
49
|
+
return /* @__PURE__ */ S(a, {
|
|
50
|
+
title: "Marketplace",
|
|
51
|
+
subtitle: "Find logistics service providers",
|
|
52
|
+
icon: /* @__PURE__ */ x(p, { size: 24 }),
|
|
53
|
+
headerActions: /* @__PURE__ */ S(s, {
|
|
54
|
+
variant: "outline",
|
|
55
|
+
children: [/* @__PURE__ */ x(l, { size: 16 }), " Filters"]
|
|
56
|
+
}),
|
|
57
|
+
children: [/* @__PURE__ */ x(t, { children: /* @__PURE__ */ x(n, {
|
|
58
|
+
className: "p-4",
|
|
59
|
+
children: /* @__PURE__ */ S("div", {
|
|
60
|
+
className: "relative",
|
|
61
|
+
children: [/* @__PURE__ */ x(d, {
|
|
62
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
63
|
+
size: 20
|
|
64
|
+
}), /* @__PURE__ */ x(e, {
|
|
65
|
+
placeholder: "Search services, providers, locations...",
|
|
66
|
+
className: "pl-10",
|
|
67
|
+
value: F,
|
|
68
|
+
onChange: (e) => I(e.target.value)
|
|
69
|
+
})]
|
|
70
|
+
})
|
|
71
|
+
}) }), /* @__PURE__ */ S("div", {
|
|
72
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
73
|
+
children: [/* @__PURE__ */ S("div", {
|
|
74
|
+
className: "lg:col-span-2 space-y-4",
|
|
75
|
+
children: [/* @__PURE__ */ S("h3", {
|
|
76
|
+
className: "font-semibold",
|
|
77
|
+
children: [
|
|
78
|
+
"Service Providers (",
|
|
79
|
+
z.length,
|
|
80
|
+
")"
|
|
81
|
+
]
|
|
82
|
+
}), z.map((e) => /* @__PURE__ */ x(t, {
|
|
83
|
+
className: "hover:shadow-md transition-shadow cursor-pointer",
|
|
84
|
+
children: /* @__PURE__ */ x(n, {
|
|
85
|
+
className: "p-6",
|
|
86
|
+
children: /* @__PURE__ */ S("div", {
|
|
87
|
+
className: "flex items-start justify-between",
|
|
88
|
+
children: [/* @__PURE__ */ S("div", { children: [
|
|
89
|
+
/* @__PURE__ */ S("div", {
|
|
90
|
+
className: "flex items-center gap-2",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ x("h4", {
|
|
93
|
+
className: "font-semibold text-lg",
|
|
94
|
+
children: e.name
|
|
95
|
+
}),
|
|
96
|
+
e.isVerified && /* @__PURE__ */ x(o, {
|
|
97
|
+
variant: "default",
|
|
98
|
+
children: "Verified"
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ x(o, {
|
|
101
|
+
variant: e.isActive ? "default" : "secondary",
|
|
102
|
+
children: e.isActive ? "active" : "inactive"
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ x("p", {
|
|
107
|
+
className: "text-muted-foreground mt-1",
|
|
108
|
+
children: e.description
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ S("div", {
|
|
111
|
+
className: "flex items-center gap-4 mt-3 text-sm text-muted-foreground",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ S("span", {
|
|
114
|
+
className: "flex items-center gap-1",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ x(f, {
|
|
117
|
+
size: 14,
|
|
118
|
+
className: "text-yellow-500 fill-yellow-500"
|
|
119
|
+
}),
|
|
120
|
+
" ",
|
|
121
|
+
e.rating ?? 0
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ S("span", {
|
|
125
|
+
className: "flex items-center gap-1",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ x(u, { size: 14 }),
|
|
128
|
+
" ",
|
|
129
|
+
e.type
|
|
130
|
+
]
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ S("span", {
|
|
133
|
+
className: "flex items-center gap-1",
|
|
134
|
+
children: [/* @__PURE__ */ x(c, { size: 14 }), " Listed"]
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
] }), /* @__PURE__ */ S("div", {
|
|
139
|
+
className: "text-right",
|
|
140
|
+
children: [/* @__PURE__ */ x("p", {
|
|
141
|
+
className: "text-sm text-muted-foreground",
|
|
142
|
+
children: "Services"
|
|
143
|
+
}), /* @__PURE__ */ x("p", {
|
|
144
|
+
className: "text-lg font-bold",
|
|
145
|
+
children: Array.isArray(e.services) ? e.services.length : 0
|
|
146
|
+
})]
|
|
147
|
+
})]
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
}, e.id))]
|
|
151
|
+
}), /* @__PURE__ */ S("div", {
|
|
152
|
+
className: "space-y-4",
|
|
153
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
154
|
+
className: "font-semibold",
|
|
155
|
+
children: "Popular Services"
|
|
156
|
+
}), B.map((e) => /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, { children: /* @__PURE__ */ x(r, {
|
|
157
|
+
className: "text-base",
|
|
158
|
+
children: e.name
|
|
159
|
+
}) }), /* @__PURE__ */ S(n, { children: [
|
|
160
|
+
/* @__PURE__ */ x("p", {
|
|
161
|
+
className: "text-sm text-muted-foreground mb-3",
|
|
162
|
+
children: e.description
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ S("div", {
|
|
165
|
+
className: "flex flex-wrap gap-1 mb-3",
|
|
166
|
+
children: [/* @__PURE__ */ x(o, {
|
|
167
|
+
variant: "outline",
|
|
168
|
+
className: "text-xs",
|
|
169
|
+
children: e.category ?? "general"
|
|
170
|
+
}), /* @__PURE__ */ x(o, {
|
|
171
|
+
variant: "outline",
|
|
172
|
+
className: "text-xs",
|
|
173
|
+
children: e.provider?.name ?? "provider"
|
|
174
|
+
})]
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ S("div", {
|
|
177
|
+
className: "flex items-center justify-between",
|
|
178
|
+
children: [/* @__PURE__ */ x("span", {
|
|
179
|
+
className: "font-bold",
|
|
180
|
+
children: g(e.price)
|
|
181
|
+
}), /* @__PURE__ */ x("span", {
|
|
182
|
+
className: "text-sm text-muted-foreground",
|
|
183
|
+
children: e.currency
|
|
184
|
+
})]
|
|
185
|
+
})
|
|
186
|
+
] })] }, e.id))]
|
|
187
|
+
})]
|
|
188
|
+
})]
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { T as default };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { d as e, f as t, rt as n } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
//#region src/movethewheels/components/MetricCard.tsx
|
|
4
|
+
var a = {
|
|
5
|
+
sm: {
|
|
6
|
+
card: "p-3",
|
|
7
|
+
value: "text-xl font-bold",
|
|
8
|
+
label: "text-xs",
|
|
9
|
+
icon: "w-8 h-8"
|
|
10
|
+
},
|
|
11
|
+
md: {
|
|
12
|
+
card: "p-4",
|
|
13
|
+
value: "text-2xl font-bold",
|
|
14
|
+
label: "text-sm",
|
|
15
|
+
icon: "w-10 h-10"
|
|
16
|
+
},
|
|
17
|
+
lg: {
|
|
18
|
+
card: "p-6",
|
|
19
|
+
value: "text-3xl font-bold",
|
|
20
|
+
label: "text-base",
|
|
21
|
+
icon: "w-12 h-12"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function o({ value: o, label: s, icon: c, change: l, changeType: u = "neutral", subtitle: d, trend: f, size: p = "md", onClick: m, className: h }) {
|
|
25
|
+
let g = a[p], _ = {
|
|
26
|
+
positive: "text-green-600 dark:text-green-400",
|
|
27
|
+
negative: "text-red-600 dark:text-red-400",
|
|
28
|
+
neutral: "text-muted-foreground"
|
|
29
|
+
}, v = {
|
|
30
|
+
up: /* @__PURE__ */ r("svg", {
|
|
31
|
+
className: "w-4 h-4",
|
|
32
|
+
fill: "none",
|
|
33
|
+
viewBox: "0 0 24 24",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
children: /* @__PURE__ */ r("path", {
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
strokeLinejoin: "round",
|
|
38
|
+
strokeWidth: 2,
|
|
39
|
+
d: "M5 10l7-7m0 0l7 7m-7-7v18"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
down: /* @__PURE__ */ r("svg", {
|
|
43
|
+
className: "w-4 h-4",
|
|
44
|
+
fill: "none",
|
|
45
|
+
viewBox: "0 0 24 24",
|
|
46
|
+
stroke: "currentColor",
|
|
47
|
+
children: /* @__PURE__ */ r("path", {
|
|
48
|
+
strokeLinecap: "round",
|
|
49
|
+
strokeLinejoin: "round",
|
|
50
|
+
strokeWidth: 2,
|
|
51
|
+
d: "M19 14l-7 7m0 0l-7-7m7 7V3"
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
flat: /* @__PURE__ */ r("svg", {
|
|
55
|
+
className: "w-4 h-4",
|
|
56
|
+
fill: "none",
|
|
57
|
+
viewBox: "0 0 24 24",
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
children: /* @__PURE__ */ r("path", {
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeLinejoin: "round",
|
|
62
|
+
strokeWidth: 2,
|
|
63
|
+
d: "M5 12h14"
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ r(e, {
|
|
68
|
+
className: n("overflow-hidden transition-all duration-200", m && "cursor-pointer hover:shadow-md hover:border-primary/30", h),
|
|
69
|
+
onClick: m,
|
|
70
|
+
children: /* @__PURE__ */ r(t, {
|
|
71
|
+
className: g.card,
|
|
72
|
+
children: /* @__PURE__ */ i("div", {
|
|
73
|
+
className: "flex items-start justify-between",
|
|
74
|
+
children: [/* @__PURE__ */ i("div", {
|
|
75
|
+
className: "space-y-1",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ r("p", {
|
|
78
|
+
className: n("text-muted-foreground", g.label),
|
|
79
|
+
children: s
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ r("p", {
|
|
82
|
+
className: n("text-foreground tracking-tight", g.value),
|
|
83
|
+
children: typeof o == "number" ? o.toLocaleString() : o
|
|
84
|
+
}),
|
|
85
|
+
d && /* @__PURE__ */ r("p", {
|
|
86
|
+
className: "text-xs text-muted-foreground",
|
|
87
|
+
children: d
|
|
88
|
+
}),
|
|
89
|
+
l && /* @__PURE__ */ i("div", {
|
|
90
|
+
className: n("flex items-center gap-1 text-sm", _[u]),
|
|
91
|
+
children: [f && v[f], /* @__PURE__ */ r("span", { children: l })]
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}), c && /* @__PURE__ */ r("div", {
|
|
95
|
+
className: n("flex-shrink-0 p-2 rounded-lg bg-primary/10 text-primary", g.icon),
|
|
96
|
+
children: c
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function s({ size: o = "md" }) {
|
|
103
|
+
let s = a[o];
|
|
104
|
+
return /* @__PURE__ */ r(e, {
|
|
105
|
+
className: "overflow-hidden",
|
|
106
|
+
children: /* @__PURE__ */ r(t, {
|
|
107
|
+
className: s.card,
|
|
108
|
+
children: /* @__PURE__ */ i("div", {
|
|
109
|
+
className: "flex items-start justify-between",
|
|
110
|
+
children: [/* @__PURE__ */ i("div", {
|
|
111
|
+
className: "space-y-2 flex-1",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ r("div", { className: "h-4 w-24 bg-muted animate-pulse rounded" }),
|
|
114
|
+
/* @__PURE__ */ r("div", { className: "h-8 w-32 bg-muted animate-pulse rounded" }),
|
|
115
|
+
/* @__PURE__ */ r("div", { className: "h-3 w-20 bg-muted animate-pulse rounded" })
|
|
116
|
+
]
|
|
117
|
+
}), /* @__PURE__ */ r("div", { className: n("bg-muted animate-pulse rounded-lg", s.icon) })]
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function c({ children: e, columns: t = 4, className: i }) {
|
|
123
|
+
return /* @__PURE__ */ r("div", {
|
|
124
|
+
className: n("grid gap-4", {
|
|
125
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
126
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
127
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
128
|
+
5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5",
|
|
129
|
+
6: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6"
|
|
130
|
+
}[t], i),
|
|
131
|
+
children: e
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
export { s as n, c as r, o as t };
|