@burdenoff/microfe-movethewheels 2026.713.1 → 2026.716.2
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/stories/MetricCard.stories.d.ts +9 -0
- package/dist/stories/Notice.stories.d.ts +9 -0
- package/dist/stories/StatusBadge.stories.d.ts +13 -0
- package/package.json +12 -2
- package/src/stories/MetricCard.stories.tsx +45 -0
- package/src/stories/Notice.stories.tsx +34 -0
- package/src/stories/StatusBadge.stories.tsx +67 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MetricCard } from '../movethewheels/components/MetricCard';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MetricCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const WithDelta: Story;
|
|
9
|
+
export declare const FeaturedWithSparkline: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Notice } from '../movethewheels/components/Notice';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Notice>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Success: Story;
|
|
8
|
+
export declare const Info: Story;
|
|
9
|
+
export declare const Empty: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { StatusBadge } from '../movethewheels/components/StatusBadge';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof StatusBadge>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const InTransit: Story;
|
|
8
|
+
export declare const Delivered: Story;
|
|
9
|
+
export declare const Cancelled: Story;
|
|
10
|
+
export declare const VehicleAvailable: Story;
|
|
11
|
+
export declare const DriverOffline: Story;
|
|
12
|
+
export declare const Priority: Story;
|
|
13
|
+
export declare const VehicleType: Story;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-movethewheels",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.716.2",
|
|
4
4
|
"description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -31,7 +31,10 @@
|
|
|
31
31
|
"lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
|
|
32
32
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
33
33
|
"type:check": "tsc --noEmit",
|
|
34
|
-
"sanity": "bun run codegen && bun run lint:sanity && bun run format && bun run type:check && bun run build",
|
|
34
|
+
"sanity": "bun run codegen && bun run lint:sanity && bun run format && bun run type:check && bun run build && bun run build-storybook",
|
|
35
|
+
"storybook": "storybook dev -p 6006",
|
|
36
|
+
"build-storybook": "storybook build",
|
|
37
|
+
"test:storybook": "test-storybook",
|
|
35
38
|
"schema:pull": "graphql-codegen --project schema-wspace && graphql-codegen --project schema-global",
|
|
36
39
|
"codegen": "graphql-codegen --project wspace && graphql-codegen --project global",
|
|
37
40
|
"codegen:all": "bun run schema:pull && bun run codegen",
|
|
@@ -68,6 +71,13 @@
|
|
|
68
71
|
"@graphql-codegen/typescript": "^4.0.0",
|
|
69
72
|
"@graphql-codegen/typescript-operations": "^4.0.0",
|
|
70
73
|
"@graphql-codegen/typescript-react-apollo": "^4.0.0",
|
|
74
|
+
"@storybook/addon-essentials": "^8.6.0",
|
|
75
|
+
"@storybook/addon-interactions": "^8.6.0",
|
|
76
|
+
"@storybook/react": "^8.6.0",
|
|
77
|
+
"@storybook/react-vite": "^8.6.0",
|
|
78
|
+
"@storybook/test": "^8.6.0",
|
|
79
|
+
"@storybook/test-runner": "0.22.0",
|
|
80
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
71
81
|
"@types/leaflet": "^1.9.12",
|
|
72
82
|
"@types/react": "^19.0.2",
|
|
73
83
|
"@types/react-dom": "^19.0.2",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Package, Truck, TrendingUp } from 'lucide-react';
|
|
3
|
+
import { MetricCard } from '../movethewheels/components/MetricCard';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof MetricCard> = {
|
|
6
|
+
title: 'MoveTheWheels/MetricCard',
|
|
7
|
+
component: MetricCard,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
icon: <Package size={24} />,
|
|
20
|
+
value: '1,248',
|
|
21
|
+
label: 'Active orders',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const WithDelta: Story = {
|
|
26
|
+
args: {
|
|
27
|
+
icon: <Truck size={24} />,
|
|
28
|
+
value: '98.2%',
|
|
29
|
+
label: 'On-time deliveries',
|
|
30
|
+
delta: { value: '+2.4%', direction: 'up' },
|
|
31
|
+
accent: 'success',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const FeaturedWithSparkline: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
icon: <TrendingUp size={24} />,
|
|
38
|
+
value: '$42,890',
|
|
39
|
+
label: 'Monthly revenue',
|
|
40
|
+
delta: { value: '+8.1%', direction: 'up' },
|
|
41
|
+
sparklineData: [32000, 33500, 36100, 35400, 38900, 40200, 42890],
|
|
42
|
+
accent: 'brand',
|
|
43
|
+
glow: true,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Notice } from '../movethewheels/components/Notice';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Notice> = {
|
|
5
|
+
title: 'MoveTheWheels/Notice',
|
|
6
|
+
component: Notice,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
|
|
16
|
+
export const Success: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
message: 'Route optimization completed successfully.',
|
|
19
|
+
variant: 'success',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Info: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
message: 'Dispatch window updated to 09:00–17:00 IST.',
|
|
26
|
+
variant: 'info',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Empty: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
message: null,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import {
|
|
3
|
+
StatusBadge,
|
|
4
|
+
PriorityBadge,
|
|
5
|
+
VehicleTypeBadge,
|
|
6
|
+
} from '../movethewheels/components/StatusBadge';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof StatusBadge> = {
|
|
9
|
+
title: 'MoveTheWheels/StatusBadge',
|
|
10
|
+
component: StatusBadge,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
status: {
|
|
16
|
+
control: { type: 'text' },
|
|
17
|
+
description: 'Raw server enum value (e.g. in_transit, delivered, available)',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
|
|
26
|
+
export const InTransit: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
status: 'in_transit',
|
|
29
|
+
type: 'order',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const Delivered: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
status: 'delivered',
|
|
36
|
+
type: 'order',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const Cancelled: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
status: 'cancelled',
|
|
43
|
+
type: 'order',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const VehicleAvailable: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
status: 'available',
|
|
50
|
+
type: 'vehicle',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const DriverOffline: Story = {
|
|
55
|
+
args: {
|
|
56
|
+
status: 'offline',
|
|
57
|
+
type: 'driver',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const Priority: Story = {
|
|
62
|
+
render: () => <PriorityBadge priority="urgent" />,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const VehicleType: Story = {
|
|
66
|
+
render: () => <VehicleTypeBadge type="truck" />,
|
|
67
|
+
};
|