@lateralus-ai/shipping-ui 2.0.0-dev.3 → 2.0.0-dev.4
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/index.cjs +3 -3
- package/dist/index.esm.js +2264 -2245
- package/dist/tailwind-theme.d.ts +4 -4
- package/dist/{theme-entry-CxDa1D0_.mjs → theme-entry-BUK3MJUJ.mjs} +4 -4
- package/dist/{theme-entry-D2X3Ptjf.js → theme-entry-ygTpGaNC.js} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.esm.js +1 -1
- package/package.json +128 -128
- package/src/components/Tabs.tsx +140 -139
- package/src/components/index.ts +42 -42
- package/src/index.ts +74 -74
- package/src/patterns/Search/ResultRow.tsx +58 -58
- package/src/patterns/Search/SearchModal.tsx +304 -292
- package/src/patterns/Search/index.ts +31 -31
- package/src/patterns/Skeleton/Skeleton.tsx +56 -56
- package/src/stories/canvases/ContentCanvas.tsx +114 -114
- package/src/stories/canvases/SearchCanvas.tsx +150 -150
- package/src/tailwind-theme.ts +4 -4
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { cn } from "../../utils/cn";
|
|
2
|
-
|
|
3
|
-
export type SkeletonVariant = "content" | "search";
|
|
4
|
-
|
|
5
|
-
export type SkeletonProps = {
|
|
6
|
-
variant?: SkeletonVariant;
|
|
7
|
-
className?: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const ContentSkeleton = () => (
|
|
11
|
-
<div className="flex flex-col gap-4 p-4" aria-hidden>
|
|
12
|
-
<div className="flex items-center gap-3">
|
|
13
|
-
<div className="size-8 animate-pulse rounded-full bg-grey-200" />
|
|
14
|
-
<div className="flex flex-1 flex-col gap-2">
|
|
15
|
-
<div className="h-4 w-1/3 animate-pulse rounded bg-grey-200" />
|
|
16
|
-
<div className="h-3 w-1/4 animate-pulse rounded bg-grey-100" />
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<div className="flex flex-col gap-2">
|
|
20
|
-
<div className="h-4 w-full animate-pulse rounded bg-grey-200" />
|
|
21
|
-
<div className="h-4 w-5/6 animate-pulse rounded bg-grey-200" />
|
|
22
|
-
<div className="h-4 w-2/3 animate-pulse rounded bg-grey-100" />
|
|
23
|
-
</div>
|
|
24
|
-
<div className="h-24 animate-pulse rounded-control bg-grey-100" />
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
/** Figma Search loading — 8 rows of icon + bar (no input/pills). */
|
|
29
|
-
const SearchSkeleton = () => {
|
|
30
|
-
const widths = [250, 300, 220, 255, 250, 300, 220, 255];
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<div className="flex flex-col gap-1.5 p-4" aria-hidden>
|
|
34
|
-
{widths.map((width, index) => (
|
|
35
|
-
<div key={index} className="flex items-start gap-2 py-2">
|
|
36
|
-
<div className="size-3 shrink-0 animate-pulse rounded-md bg-grey-200" />
|
|
37
|
-
<div
|
|
38
|
-
className="h-3 animate-pulse rounded-md bg-grey-200"
|
|
39
|
-
style={{ width }}
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
))}
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const Skeleton = ({ variant = "content", className }: SkeletonProps) => (
|
|
48
|
-
<div
|
|
49
|
-
className={cn("rounded-control bg-background-primary", className)}
|
|
50
|
-
role="status"
|
|
51
|
-
aria-label="Loading"
|
|
52
|
-
data-variant={variant}
|
|
53
|
-
>
|
|
54
|
-
{variant === "content" ? <ContentSkeleton /> : <SearchSkeleton />}
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
1
|
+
import { cn } from "../../utils/cn";
|
|
2
|
+
|
|
3
|
+
export type SkeletonVariant = "content" | "search";
|
|
4
|
+
|
|
5
|
+
export type SkeletonProps = {
|
|
6
|
+
variant?: SkeletonVariant;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const ContentSkeleton = () => (
|
|
11
|
+
<div className="flex flex-col gap-4 p-4" aria-hidden>
|
|
12
|
+
<div className="flex items-center gap-3">
|
|
13
|
+
<div className="size-8 animate-pulse rounded-full bg-grey-200" />
|
|
14
|
+
<div className="flex flex-1 flex-col gap-2">
|
|
15
|
+
<div className="h-4 w-1/3 animate-pulse rounded bg-grey-200" />
|
|
16
|
+
<div className="h-3 w-1/4 animate-pulse rounded bg-grey-100" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div className="flex flex-col gap-2">
|
|
20
|
+
<div className="h-4 w-full animate-pulse rounded bg-grey-200" />
|
|
21
|
+
<div className="h-4 w-5/6 animate-pulse rounded bg-grey-200" />
|
|
22
|
+
<div className="h-4 w-2/3 animate-pulse rounded bg-grey-100" />
|
|
23
|
+
</div>
|
|
24
|
+
<div className="h-24 animate-pulse rounded-control bg-grey-100" />
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/** Figma Search loading — 8 rows of icon + bar (no input/pills). */
|
|
29
|
+
const SearchSkeleton = () => {
|
|
30
|
+
const widths = [250, 300, 220, 255, 250, 300, 220, 255];
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className="flex flex-col gap-1.5 p-4" aria-hidden>
|
|
34
|
+
{widths.map((width, index) => (
|
|
35
|
+
<div key={index} className="flex items-start gap-2 py-2">
|
|
36
|
+
<div className="size-3 shrink-0 animate-pulse rounded-md bg-grey-200" />
|
|
37
|
+
<div
|
|
38
|
+
className="h-3 animate-pulse rounded-md bg-grey-200"
|
|
39
|
+
style={{ width }}
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Skeleton = ({ variant = "content", className }: SkeletonProps) => (
|
|
48
|
+
<div
|
|
49
|
+
className={cn("rounded-control bg-background-primary", className)}
|
|
50
|
+
role="status"
|
|
51
|
+
aria-label="Loading"
|
|
52
|
+
data-variant={variant}
|
|
53
|
+
>
|
|
54
|
+
{variant === "content" ? <ContentSkeleton /> : <SearchSkeleton />}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
import { Button } from "../../primitives";
|
|
2
|
-
import {
|
|
3
|
-
EmptyState,
|
|
4
|
-
Entry,
|
|
5
|
-
Header,
|
|
6
|
-
Tab,
|
|
7
|
-
Tabs,
|
|
8
|
-
TabsContent,
|
|
9
|
-
TabsList,
|
|
10
|
-
TabsTrigger,
|
|
11
|
-
} from "../../components";
|
|
12
|
-
import { WorkflowsIllustration } from "../../illustrations";
|
|
13
|
-
import {
|
|
14
|
-
FigmaContent,
|
|
15
|
-
FigmaGrid,
|
|
16
|
-
FigmaPage,
|
|
17
|
-
FigmaSection,
|
|
18
|
-
FigmaVariant,
|
|
19
|
-
} from "../_layout";
|
|
20
|
-
import { FIGMA_WIDTHS } from "./figma-widths";
|
|
21
|
-
|
|
22
|
-
export const ContentCanvas = () => (
|
|
23
|
-
<FigmaPage title="Content" width={FIGMA_WIDTHS.content}>
|
|
24
|
-
<FigmaContent>
|
|
25
|
-
<FigmaSection label="Tab">
|
|
26
|
-
<FigmaGrid gap={16}>
|
|
27
|
-
<Tab label="Overview" />
|
|
28
|
-
<Tab label="Tasks" state="active" />
|
|
29
|
-
<Tab label="Reports" className="bg-background-hover" />
|
|
30
|
-
</FigmaGrid>
|
|
31
|
-
</FigmaSection>
|
|
32
|
-
|
|
33
|
-
<FigmaSection label="Tabs">
|
|
34
|
-
<div className="max-w-xl space-y-8">
|
|
35
|
-
<FigmaVariant label="Underline">
|
|
36
|
-
<Tabs defaultValue="all" type="tabs">
|
|
37
|
-
<TabsList>
|
|
38
|
-
<TabsTrigger value="all">All</TabsTrigger>
|
|
39
|
-
<TabsTrigger value="reports">Reports</TabsTrigger>
|
|
40
|
-
<TabsTrigger value="issues">Issues</TabsTrigger>
|
|
41
|
-
</TabsList>
|
|
42
|
-
<TabsContent value="all" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
43
|
-
All content
|
|
44
|
-
</TabsContent>
|
|
45
|
-
<TabsContent value="reports" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
46
|
-
Reports content
|
|
47
|
-
</TabsContent>
|
|
48
|
-
<TabsContent value="issues" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
49
|
-
Issues content
|
|
50
|
-
</TabsContent>
|
|
51
|
-
</Tabs>
|
|
52
|
-
</FigmaVariant>
|
|
53
|
-
<FigmaVariant label="Pills">
|
|
54
|
-
<Tabs defaultValue="active" type="pills">
|
|
55
|
-
<TabsList>
|
|
56
|
-
<TabsTrigger value="active">Active</TabsTrigger>
|
|
57
|
-
<TabsTrigger value="completed" count={3}>
|
|
58
|
-
Completed
|
|
59
|
-
</TabsTrigger>
|
|
60
|
-
</TabsList>
|
|
61
|
-
<TabsContent value="active" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
62
|
-
Active content
|
|
63
|
-
</TabsContent>
|
|
64
|
-
<TabsContent value="completed" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
65
|
-
Completed content
|
|
66
|
-
</TabsContent>
|
|
67
|
-
</Tabs>
|
|
68
|
-
</FigmaVariant>
|
|
69
|
-
</div>
|
|
70
|
-
</FigmaSection>
|
|
71
|
-
|
|
72
|
-
<FigmaSection label="Header">
|
|
73
|
-
<div className="max-w-xl space-y-4">
|
|
74
|
-
<Header title="Fleet overview" />
|
|
75
|
-
<Header
|
|
76
|
-
variant="nested"
|
|
77
|
-
title="Outstanding actions"
|
|
78
|
-
actions={<Button hierarchy="primary">Add</Button>}
|
|
79
|
-
/>
|
|
80
|
-
</div>
|
|
81
|
-
</FigmaSection>
|
|
82
|
-
|
|
83
|
-
<FigmaSection label="Entry">
|
|
84
|
-
<div className="max-w-xl space-y-2">
|
|
85
|
-
<Entry type="chat" title="Hull inspection report" subtitle="2 hours ago" meta="17" />
|
|
86
|
-
<Entry type="issue" title="Critical valve malfunction" state="selected" meta="High" />
|
|
87
|
-
<Entry type="chat" title="Port state control checklist" subtitle="Yesterday" className="bg-background-hover" />
|
|
88
|
-
</div>
|
|
89
|
-
</FigmaSection>
|
|
90
|
-
|
|
91
|
-
<FigmaSection label="Empty State">
|
|
92
|
-
<FigmaGrid gap={32}>
|
|
93
|
-
<FigmaVariant label="Default">
|
|
94
|
-
<div className="w-80">
|
|
95
|
-
<EmptyState
|
|
96
|
-
title="No workflows yet"
|
|
97
|
-
description="Create your first workflow to get started."
|
|
98
|
-
/>
|
|
99
|
-
</div>
|
|
100
|
-
</FigmaVariant>
|
|
101
|
-
<FigmaVariant label="With illustration">
|
|
102
|
-
<div className="w-80">
|
|
103
|
-
<EmptyState
|
|
104
|
-
title="No reports"
|
|
105
|
-
illustration={<WorkflowsIllustration className="mx-auto h-24 w-32" />}
|
|
106
|
-
action={{ children: "Create report", hierarchy: "primary" }}
|
|
107
|
-
/>
|
|
108
|
-
</div>
|
|
109
|
-
</FigmaVariant>
|
|
110
|
-
</FigmaGrid>
|
|
111
|
-
</FigmaSection>
|
|
112
|
-
</FigmaContent>
|
|
113
|
-
</FigmaPage>
|
|
114
|
-
);
|
|
1
|
+
import { Button } from "../../primitives";
|
|
2
|
+
import {
|
|
3
|
+
EmptyState,
|
|
4
|
+
Entry,
|
|
5
|
+
Header,
|
|
6
|
+
Tab,
|
|
7
|
+
Tabs,
|
|
8
|
+
TabsContent,
|
|
9
|
+
TabsList,
|
|
10
|
+
TabsTrigger,
|
|
11
|
+
} from "../../components";
|
|
12
|
+
import { WorkflowsIllustration } from "../../illustrations";
|
|
13
|
+
import {
|
|
14
|
+
FigmaContent,
|
|
15
|
+
FigmaGrid,
|
|
16
|
+
FigmaPage,
|
|
17
|
+
FigmaSection,
|
|
18
|
+
FigmaVariant,
|
|
19
|
+
} from "../_layout";
|
|
20
|
+
import { FIGMA_WIDTHS } from "./figma-widths";
|
|
21
|
+
|
|
22
|
+
export const ContentCanvas = () => (
|
|
23
|
+
<FigmaPage title="Content" width={FIGMA_WIDTHS.content}>
|
|
24
|
+
<FigmaContent>
|
|
25
|
+
<FigmaSection label="Tab">
|
|
26
|
+
<FigmaGrid gap={16}>
|
|
27
|
+
<Tab label="Overview" />
|
|
28
|
+
<Tab label="Tasks" state="active" />
|
|
29
|
+
<Tab label="Reports" className="bg-background-hover" />
|
|
30
|
+
</FigmaGrid>
|
|
31
|
+
</FigmaSection>
|
|
32
|
+
|
|
33
|
+
<FigmaSection label="Tabs">
|
|
34
|
+
<div className="max-w-xl space-y-8">
|
|
35
|
+
<FigmaVariant label="Underline">
|
|
36
|
+
<Tabs defaultValue="all" type="tabs">
|
|
37
|
+
<TabsList>
|
|
38
|
+
<TabsTrigger value="all">All</TabsTrigger>
|
|
39
|
+
<TabsTrigger value="reports">Reports</TabsTrigger>
|
|
40
|
+
<TabsTrigger value="issues">Issues</TabsTrigger>
|
|
41
|
+
</TabsList>
|
|
42
|
+
<TabsContent value="all" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
43
|
+
All content
|
|
44
|
+
</TabsContent>
|
|
45
|
+
<TabsContent value="reports" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
46
|
+
Reports content
|
|
47
|
+
</TabsContent>
|
|
48
|
+
<TabsContent value="issues" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
49
|
+
Issues content
|
|
50
|
+
</TabsContent>
|
|
51
|
+
</Tabs>
|
|
52
|
+
</FigmaVariant>
|
|
53
|
+
<FigmaVariant label="Pills">
|
|
54
|
+
<Tabs defaultValue="active" type="pills">
|
|
55
|
+
<TabsList>
|
|
56
|
+
<TabsTrigger value="active">Active</TabsTrigger>
|
|
57
|
+
<TabsTrigger value="completed" count={3}>
|
|
58
|
+
Completed
|
|
59
|
+
</TabsTrigger>
|
|
60
|
+
</TabsList>
|
|
61
|
+
<TabsContent value="active" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
62
|
+
Active content
|
|
63
|
+
</TabsContent>
|
|
64
|
+
<TabsContent value="completed" className="pt-3 text-caption-2 text-display-on-light-secondary">
|
|
65
|
+
Completed content
|
|
66
|
+
</TabsContent>
|
|
67
|
+
</Tabs>
|
|
68
|
+
</FigmaVariant>
|
|
69
|
+
</div>
|
|
70
|
+
</FigmaSection>
|
|
71
|
+
|
|
72
|
+
<FigmaSection label="Header">
|
|
73
|
+
<div className="max-w-xl space-y-4">
|
|
74
|
+
<Header title="Fleet overview" />
|
|
75
|
+
<Header
|
|
76
|
+
variant="nested"
|
|
77
|
+
title="Outstanding actions"
|
|
78
|
+
actions={<Button hierarchy="primary">Add</Button>}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
</FigmaSection>
|
|
82
|
+
|
|
83
|
+
<FigmaSection label="Entry">
|
|
84
|
+
<div className="max-w-xl space-y-2">
|
|
85
|
+
<Entry type="chat" title="Hull inspection report" subtitle="2 hours ago" meta="17" />
|
|
86
|
+
<Entry type="issue" title="Critical valve malfunction" state="selected" meta="High" />
|
|
87
|
+
<Entry type="chat" title="Port state control checklist" subtitle="Yesterday" className="bg-background-hover" />
|
|
88
|
+
</div>
|
|
89
|
+
</FigmaSection>
|
|
90
|
+
|
|
91
|
+
<FigmaSection label="Empty State">
|
|
92
|
+
<FigmaGrid gap={32}>
|
|
93
|
+
<FigmaVariant label="Default">
|
|
94
|
+
<div className="w-80">
|
|
95
|
+
<EmptyState
|
|
96
|
+
title="No workflows yet"
|
|
97
|
+
description="Create your first workflow to get started."
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</FigmaVariant>
|
|
101
|
+
<FigmaVariant label="With illustration">
|
|
102
|
+
<div className="w-80">
|
|
103
|
+
<EmptyState
|
|
104
|
+
title="No reports"
|
|
105
|
+
illustration={<WorkflowsIllustration className="mx-auto h-24 w-32" />}
|
|
106
|
+
action={{ children: "Create report", hierarchy: "primary" }}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
</FigmaVariant>
|
|
110
|
+
</FigmaGrid>
|
|
111
|
+
</FigmaSection>
|
|
112
|
+
</FigmaContent>
|
|
113
|
+
</FigmaPage>
|
|
114
|
+
);
|
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Pill,
|
|
3
|
-
PillInfo,
|
|
4
|
-
ResultRow,
|
|
5
|
-
SearchModalPanel,
|
|
6
|
-
SectionHeader,
|
|
7
|
-
} from "../../patterns/Search";
|
|
8
|
-
import {
|
|
9
|
-
FigmaContent,
|
|
10
|
-
FigmaGrid,
|
|
11
|
-
FigmaPage,
|
|
12
|
-
FigmaSection,
|
|
13
|
-
FigmaVariant,
|
|
14
|
-
} from "../_layout";
|
|
15
|
-
import { FIGMA_WIDTHS } from "./figma-widths";
|
|
16
|
-
|
|
17
|
-
const recentItems = [
|
|
18
|
-
{ variant: "report" as const, title: "Engine Room Oil Leak" },
|
|
19
|
-
{ variant: "chat" as const, title: "Low Water Pressure on Board" },
|
|
20
|
-
{
|
|
21
|
-
variant: "chat" as const,
|
|
22
|
-
title: "Generator Vibrating Excessively",
|
|
23
|
-
state: "active" as const,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
variant: "issue" as const,
|
|
27
|
-
title:
|
|
28
|
-
"Intermittent Flickering of Navigation Lights Possibly Due to Bulb Failure or Signal Unit Errors",
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
const resultItems = [
|
|
33
|
-
{
|
|
34
|
-
variant: "report" as const,
|
|
35
|
-
title: "Persistent Engine Room Oil Leak",
|
|
36
|
-
subtitle: (
|
|
37
|
-
<>
|
|
38
|
-
We’ve got a persistent oil leak from the{" "}
|
|
39
|
-
<span className="text-caption-2-em text-display-on-light-primary">
|
|
40
|
-
fuel pump
|
|
41
|
-
</span>
|
|
42
|
-
. I’ve tightened what I could, but it keeps seeping.
|
|
43
|
-
</>
|
|
44
|
-
),
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
variant: "chat" as const,
|
|
48
|
-
title: "Ballast Pump Not Starting",
|
|
49
|
-
subtitle: (
|
|
50
|
-
<>
|
|
51
|
-
The{" "}
|
|
52
|
-
<span className="text-caption-2-em text-display-on-light-primary">
|
|
53
|
-
fuel pump
|
|
54
|
-
</span>{" "}
|
|
55
|
-
won’t start consistently. Sometimes it works, sometimes it doesn’t.
|
|
56
|
-
</>
|
|
57
|
-
),
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
variant: "issue" as const,
|
|
61
|
-
title:
|
|
62
|
-
"Excessive Rust on Fuel Pump and Piping with Unclear Material Specifications and Corrosion Protection Measures",
|
|
63
|
-
subtitle: "Created by Jake Silva on March 28",
|
|
64
|
-
state: "active" as const,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
variant: "report" as const,
|
|
68
|
-
title: "Engine Room Oil Leak",
|
|
69
|
-
subtitle: (
|
|
70
|
-
<>
|
|
71
|
-
We’ve spotted a steady oil leak near the{" "}
|
|
72
|
-
<span className="text-caption-2-em text-display-on-light-primary">
|
|
73
|
-
fuel pump
|
|
74
|
-
</span>
|
|
75
|
-
. Not sure if it’s a gasket or a cracked line.
|
|
76
|
-
</>
|
|
77
|
-
),
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
export const SearchCanvas = () => (
|
|
82
|
-
<FigmaPage title="Search" width={FIGMA_WIDTHS.search}>
|
|
83
|
-
<FigmaContent>
|
|
84
|
-
<FigmaSection label="Pill">
|
|
85
|
-
<FigmaGrid gap={16}>
|
|
86
|
-
<Pill>All</Pill>
|
|
87
|
-
<Pill state="active">Reports</Pill>
|
|
88
|
-
<Pill size="small">Issues</Pill>
|
|
89
|
-
<Pill size="small" state="active">
|
|
90
|
-
Chats
|
|
91
|
-
</Pill>
|
|
92
|
-
</FigmaGrid>
|
|
93
|
-
</FigmaSection>
|
|
94
|
-
|
|
95
|
-
<FigmaSection label="Pill Info">
|
|
96
|
-
<FigmaGrid gap={16}>
|
|
97
|
-
<PillInfo />
|
|
98
|
-
<PillInfo type="completed" />
|
|
99
|
-
</FigmaGrid>
|
|
100
|
-
</FigmaSection>
|
|
101
|
-
|
|
102
|
-
<FigmaSection label="Result Row">
|
|
103
|
-
<div className="max-w-xl space-y-2">
|
|
104
|
-
<ResultRow />
|
|
105
|
-
<ResultRow
|
|
106
|
-
variant="chat"
|
|
107
|
-
title="Port state control discussion"
|
|
108
|
-
subtitle="2 days ago"
|
|
109
|
-
/>
|
|
110
|
-
<ResultRow
|
|
111
|
-
variant="issue"
|
|
112
|
-
title="Critical valve malfunction"
|
|
113
|
-
subtitle="Open · High priority"
|
|
114
|
-
/>
|
|
115
|
-
</div>
|
|
116
|
-
</FigmaSection>
|
|
117
|
-
|
|
118
|
-
<FigmaSection label="Section Header">
|
|
119
|
-
<div className="max-w-xl">
|
|
120
|
-
<SectionHeader label="Reports" />
|
|
121
|
-
</div>
|
|
122
|
-
</FigmaSection>
|
|
123
|
-
|
|
124
|
-
<FigmaSection label="Search Modal">
|
|
125
|
-
<FigmaGrid gap={32}>
|
|
126
|
-
<FigmaVariant label="Idle">
|
|
127
|
-
<div className="w-[700px] overflow-hidden rounded-xl border border-divider-primary bg-background-primary shadow-raise3">
|
|
128
|
-
<SearchModalPanel state="idle" recentItems={recentItems} />
|
|
129
|
-
</div>
|
|
130
|
-
</FigmaVariant>
|
|
131
|
-
<FigmaVariant label="Loading">
|
|
132
|
-
<div className="w-[700px] overflow-hidden rounded-xl border border-divider-primary bg-background-primary shadow-raise3">
|
|
133
|
-
<SearchModalPanel state="loading" query="fuel pump" />
|
|
134
|
-
</div>
|
|
135
|
-
</FigmaVariant>
|
|
136
|
-
<FigmaVariant label="Results">
|
|
137
|
-
<div className="w-[700px] overflow-hidden rounded-xl border border-divider-primary bg-background-primary shadow-raise3">
|
|
138
|
-
<SearchModalPanel
|
|
139
|
-
state="results"
|
|
140
|
-
query="fuel pump"
|
|
141
|
-
filter="all"
|
|
142
|
-
resultItems={resultItems}
|
|
143
|
-
/>
|
|
144
|
-
</div>
|
|
145
|
-
</FigmaVariant>
|
|
146
|
-
</FigmaGrid>
|
|
147
|
-
</FigmaSection>
|
|
148
|
-
</FigmaContent>
|
|
149
|
-
</FigmaPage>
|
|
150
|
-
);
|
|
1
|
+
import {
|
|
2
|
+
Pill,
|
|
3
|
+
PillInfo,
|
|
4
|
+
ResultRow,
|
|
5
|
+
SearchModalPanel,
|
|
6
|
+
SectionHeader,
|
|
7
|
+
} from "../../patterns/Search";
|
|
8
|
+
import {
|
|
9
|
+
FigmaContent,
|
|
10
|
+
FigmaGrid,
|
|
11
|
+
FigmaPage,
|
|
12
|
+
FigmaSection,
|
|
13
|
+
FigmaVariant,
|
|
14
|
+
} from "../_layout";
|
|
15
|
+
import { FIGMA_WIDTHS } from "./figma-widths";
|
|
16
|
+
|
|
17
|
+
const recentItems = [
|
|
18
|
+
{ variant: "report" as const, title: "Engine Room Oil Leak" },
|
|
19
|
+
{ variant: "chat" as const, title: "Low Water Pressure on Board" },
|
|
20
|
+
{
|
|
21
|
+
variant: "chat" as const,
|
|
22
|
+
title: "Generator Vibrating Excessively",
|
|
23
|
+
state: "active" as const,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
variant: "issue" as const,
|
|
27
|
+
title:
|
|
28
|
+
"Intermittent Flickering of Navigation Lights Possibly Due to Bulb Failure or Signal Unit Errors",
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const resultItems = [
|
|
33
|
+
{
|
|
34
|
+
variant: "report" as const,
|
|
35
|
+
title: "Persistent Engine Room Oil Leak",
|
|
36
|
+
subtitle: (
|
|
37
|
+
<>
|
|
38
|
+
We’ve got a persistent oil leak from the{" "}
|
|
39
|
+
<span className="text-caption-2-em text-display-on-light-primary">
|
|
40
|
+
fuel pump
|
|
41
|
+
</span>
|
|
42
|
+
. I’ve tightened what I could, but it keeps seeping.
|
|
43
|
+
</>
|
|
44
|
+
),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
variant: "chat" as const,
|
|
48
|
+
title: "Ballast Pump Not Starting",
|
|
49
|
+
subtitle: (
|
|
50
|
+
<>
|
|
51
|
+
The{" "}
|
|
52
|
+
<span className="text-caption-2-em text-display-on-light-primary">
|
|
53
|
+
fuel pump
|
|
54
|
+
</span>{" "}
|
|
55
|
+
won’t start consistently. Sometimes it works, sometimes it doesn’t.
|
|
56
|
+
</>
|
|
57
|
+
),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
variant: "issue" as const,
|
|
61
|
+
title:
|
|
62
|
+
"Excessive Rust on Fuel Pump and Piping with Unclear Material Specifications and Corrosion Protection Measures",
|
|
63
|
+
subtitle: "Created by Jake Silva on March 28",
|
|
64
|
+
state: "active" as const,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
variant: "report" as const,
|
|
68
|
+
title: "Engine Room Oil Leak",
|
|
69
|
+
subtitle: (
|
|
70
|
+
<>
|
|
71
|
+
We’ve spotted a steady oil leak near the{" "}
|
|
72
|
+
<span className="text-caption-2-em text-display-on-light-primary">
|
|
73
|
+
fuel pump
|
|
74
|
+
</span>
|
|
75
|
+
. Not sure if it’s a gasket or a cracked line.
|
|
76
|
+
</>
|
|
77
|
+
),
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
export const SearchCanvas = () => (
|
|
82
|
+
<FigmaPage title="Search" width={FIGMA_WIDTHS.search}>
|
|
83
|
+
<FigmaContent>
|
|
84
|
+
<FigmaSection label="Pill">
|
|
85
|
+
<FigmaGrid gap={16}>
|
|
86
|
+
<Pill>All</Pill>
|
|
87
|
+
<Pill state="active">Reports</Pill>
|
|
88
|
+
<Pill size="small">Issues</Pill>
|
|
89
|
+
<Pill size="small" state="active">
|
|
90
|
+
Chats
|
|
91
|
+
</Pill>
|
|
92
|
+
</FigmaGrid>
|
|
93
|
+
</FigmaSection>
|
|
94
|
+
|
|
95
|
+
<FigmaSection label="Pill Info">
|
|
96
|
+
<FigmaGrid gap={16}>
|
|
97
|
+
<PillInfo />
|
|
98
|
+
<PillInfo type="completed" />
|
|
99
|
+
</FigmaGrid>
|
|
100
|
+
</FigmaSection>
|
|
101
|
+
|
|
102
|
+
<FigmaSection label="Result Row">
|
|
103
|
+
<div className="max-w-xl space-y-2">
|
|
104
|
+
<ResultRow />
|
|
105
|
+
<ResultRow
|
|
106
|
+
variant="chat"
|
|
107
|
+
title="Port state control discussion"
|
|
108
|
+
subtitle="2 days ago"
|
|
109
|
+
/>
|
|
110
|
+
<ResultRow
|
|
111
|
+
variant="issue"
|
|
112
|
+
title="Critical valve malfunction"
|
|
113
|
+
subtitle="Open · High priority"
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
</FigmaSection>
|
|
117
|
+
|
|
118
|
+
<FigmaSection label="Section Header">
|
|
119
|
+
<div className="max-w-xl">
|
|
120
|
+
<SectionHeader label="Reports" />
|
|
121
|
+
</div>
|
|
122
|
+
</FigmaSection>
|
|
123
|
+
|
|
124
|
+
<FigmaSection label="Search Modal">
|
|
125
|
+
<FigmaGrid gap={32}>
|
|
126
|
+
<FigmaVariant label="Idle">
|
|
127
|
+
<div className="w-[700px] overflow-hidden rounded-xl border border-divider-primary bg-background-primary shadow-raise3">
|
|
128
|
+
<SearchModalPanel state="idle" recentItems={recentItems} />
|
|
129
|
+
</div>
|
|
130
|
+
</FigmaVariant>
|
|
131
|
+
<FigmaVariant label="Loading">
|
|
132
|
+
<div className="w-[700px] overflow-hidden rounded-xl border border-divider-primary bg-background-primary shadow-raise3">
|
|
133
|
+
<SearchModalPanel state="loading" query="fuel pump" />
|
|
134
|
+
</div>
|
|
135
|
+
</FigmaVariant>
|
|
136
|
+
<FigmaVariant label="Results">
|
|
137
|
+
<div className="w-[700px] overflow-hidden rounded-xl border border-divider-primary bg-background-primary shadow-raise3">
|
|
138
|
+
<SearchModalPanel
|
|
139
|
+
state="results"
|
|
140
|
+
query="fuel pump"
|
|
141
|
+
filter="all"
|
|
142
|
+
resultItems={resultItems}
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
</FigmaVariant>
|
|
146
|
+
</FigmaGrid>
|
|
147
|
+
</FigmaSection>
|
|
148
|
+
</FigmaContent>
|
|
149
|
+
</FigmaPage>
|
|
150
|
+
);
|
package/src/tailwind-theme.ts
CHANGED
|
@@ -148,10 +148,10 @@ export const theme = {
|
|
|
148
148
|
},
|
|
149
149
|
},
|
|
150
150
|
accent: {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
"on-light": "var(--accent-on-light)",
|
|
152
|
+
"on-dark": "var(--accent-on-dark)",
|
|
153
|
+
"bg-light": "var(--accent-bg-light)",
|
|
154
|
+
"bg-lighter": "var(--accent-bg-lighter)",
|
|
155
155
|
},
|
|
156
156
|
divider: {
|
|
157
157
|
primary: "var(--divider-primary)",
|