@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
package/src/components/index.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export { Input, type InputProps, type InputState } from "./Input";
|
|
2
|
-
export { ReportInput, type ReportInputProps, type ReportInputState } from "./ReportInput";
|
|
3
|
-
export { InputType, type InputTypeProps, type InputTypeKind, type InputTypeState } from "./InputType";
|
|
4
|
-
export { Chip, type ChipProps, type ChipVariant } from "./Chip";
|
|
5
|
-
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
6
|
-
export { Tab, type TabProps, type TabState } from "./Tab";
|
|
7
|
-
export {
|
|
8
|
-
Tabs,
|
|
9
|
-
TabsList,
|
|
10
|
-
TabsTrigger,
|
|
11
|
-
TabsContent,
|
|
12
|
-
type TabsProps,
|
|
13
|
-
type TabsListProps,
|
|
14
|
-
type TabsTriggerProps,
|
|
15
|
-
type TabsContentProps,
|
|
16
|
-
type TabsItem,
|
|
17
|
-
type TabsType,
|
|
18
|
-
} from "./Tabs";
|
|
19
|
-
export { Header, type HeaderProps, type HeaderVariant } from "./Header";
|
|
20
|
-
export { Entry, type EntryProps, type EntryType, type EntryState } from "./Entry";
|
|
21
|
-
export { EmptyState, type EmptyStateProps } from "./EmptyState";
|
|
22
|
-
export {
|
|
23
|
-
Modal,
|
|
24
|
-
ModalTrigger,
|
|
25
|
-
ModalClose,
|
|
26
|
-
ModalPortal,
|
|
27
|
-
ModalOverlay,
|
|
28
|
-
ModalContent,
|
|
29
|
-
ModalTitle,
|
|
30
|
-
ModalDescription,
|
|
31
|
-
ModalHeaderSlot,
|
|
32
|
-
ModalBody,
|
|
33
|
-
type ModalProps,
|
|
34
|
-
type ModalOverlayProps,
|
|
35
|
-
type ModalContentProps,
|
|
36
|
-
type ModalTitleProps,
|
|
37
|
-
type ModalDescriptionProps,
|
|
38
|
-
type ModalBodyProps,
|
|
39
|
-
} from "./Modal";
|
|
40
|
-
export { ModalPanel } from "./ModalPanel";
|
|
41
|
-
export * from "./PdfViewer/";
|
|
42
|
-
export * from "./DocumentEditor";
|
|
1
|
+
export { Input, type InputProps, type InputState } from "./Input";
|
|
2
|
+
export { ReportInput, type ReportInputProps, type ReportInputState } from "./ReportInput";
|
|
3
|
+
export { InputType, type InputTypeProps, type InputTypeKind, type InputTypeState } from "./InputType";
|
|
4
|
+
export { Chip, type ChipProps, type ChipVariant } from "./Chip";
|
|
5
|
+
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
6
|
+
export { Tab, type TabProps, type TabState } from "./Tab";
|
|
7
|
+
export {
|
|
8
|
+
Tabs,
|
|
9
|
+
TabsList,
|
|
10
|
+
TabsTrigger,
|
|
11
|
+
TabsContent,
|
|
12
|
+
type TabsProps,
|
|
13
|
+
type TabsListProps,
|
|
14
|
+
type TabsTriggerProps,
|
|
15
|
+
type TabsContentProps,
|
|
16
|
+
type TabsItem,
|
|
17
|
+
type TabsType,
|
|
18
|
+
} from "./Tabs";
|
|
19
|
+
export { Header, type HeaderProps, type HeaderVariant } from "./Header";
|
|
20
|
+
export { Entry, type EntryProps, type EntryType, type EntryState } from "./Entry";
|
|
21
|
+
export { EmptyState, type EmptyStateProps } from "./EmptyState";
|
|
22
|
+
export {
|
|
23
|
+
Modal,
|
|
24
|
+
ModalTrigger,
|
|
25
|
+
ModalClose,
|
|
26
|
+
ModalPortal,
|
|
27
|
+
ModalOverlay,
|
|
28
|
+
ModalContent,
|
|
29
|
+
ModalTitle,
|
|
30
|
+
ModalDescription,
|
|
31
|
+
ModalHeaderSlot,
|
|
32
|
+
ModalBody,
|
|
33
|
+
type ModalProps,
|
|
34
|
+
type ModalOverlayProps,
|
|
35
|
+
type ModalContentProps,
|
|
36
|
+
type ModalTitleProps,
|
|
37
|
+
type ModalDescriptionProps,
|
|
38
|
+
type ModalBodyProps,
|
|
39
|
+
} from "./Modal";
|
|
40
|
+
export { ModalPanel } from "./ModalPanel";
|
|
41
|
+
export * from "./PdfViewer/";
|
|
42
|
+
export * from "./DocumentEditor";
|
package/src/index.ts
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import "./style.css";
|
|
2
|
-
|
|
3
|
-
export { theme as tailwindTheme } from "./tailwind-theme";
|
|
4
|
-
|
|
5
|
-
export * from "./tokens";
|
|
6
|
-
export * from "./icons";
|
|
7
|
-
export * from "./primitives";
|
|
8
|
-
export * from "./illustrations";
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
Input,
|
|
12
|
-
ReportInput,
|
|
13
|
-
InputType,
|
|
14
|
-
Chip,
|
|
15
|
-
Checkbox,
|
|
16
|
-
Tab,
|
|
17
|
-
Tabs,
|
|
18
|
-
TabsList,
|
|
19
|
-
TabsTrigger,
|
|
20
|
-
TabsContent,
|
|
21
|
-
Header,
|
|
22
|
-
Entry,
|
|
23
|
-
EmptyState,
|
|
24
|
-
Modal,
|
|
25
|
-
ModalTrigger,
|
|
26
|
-
ModalClose,
|
|
27
|
-
ModalPortal,
|
|
28
|
-
ModalOverlay,
|
|
29
|
-
ModalContent,
|
|
30
|
-
ModalTitle,
|
|
31
|
-
ModalDescription,
|
|
32
|
-
ModalHeaderSlot,
|
|
33
|
-
ModalBody,
|
|
34
|
-
ModalPanel,
|
|
35
|
-
PdfViewer,
|
|
36
|
-
ImageViewer,
|
|
37
|
-
DocumentEditor,
|
|
38
|
-
} from "./components";
|
|
39
|
-
|
|
40
|
-
export type {
|
|
41
|
-
InputProps,
|
|
42
|
-
InputState,
|
|
43
|
-
ReportInputProps,
|
|
44
|
-
ReportInputState,
|
|
45
|
-
InputTypeProps,
|
|
46
|
-
InputTypeKind,
|
|
47
|
-
InputTypeState,
|
|
48
|
-
ChipProps,
|
|
49
|
-
ChipVariant,
|
|
50
|
-
CheckboxProps,
|
|
51
|
-
TabProps,
|
|
52
|
-
TabState,
|
|
53
|
-
TabsProps,
|
|
54
|
-
TabsListProps,
|
|
55
|
-
TabsTriggerProps,
|
|
56
|
-
TabsContentProps,
|
|
57
|
-
TabsItem,
|
|
58
|
-
TabsType,
|
|
59
|
-
HeaderProps,
|
|
60
|
-
HeaderVariant,
|
|
61
|
-
EntryProps,
|
|
62
|
-
EntryType,
|
|
63
|
-
EntryState,
|
|
64
|
-
EmptyStateProps,
|
|
65
|
-
ModalProps,
|
|
66
|
-
ModalOverlayProps,
|
|
67
|
-
ModalContentProps,
|
|
68
|
-
ModalTitleProps,
|
|
69
|
-
ModalDescriptionProps,
|
|
70
|
-
ModalBodyProps,
|
|
71
|
-
} from "./components";
|
|
72
|
-
|
|
73
|
-
export * as Patterns from "./patterns";
|
|
74
|
-
export * as Domain from "./domain";
|
|
1
|
+
import "./style.css";
|
|
2
|
+
|
|
3
|
+
export { theme as tailwindTheme } from "./tailwind-theme";
|
|
4
|
+
|
|
5
|
+
export * from "./tokens";
|
|
6
|
+
export * from "./icons";
|
|
7
|
+
export * from "./primitives";
|
|
8
|
+
export * from "./illustrations";
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
Input,
|
|
12
|
+
ReportInput,
|
|
13
|
+
InputType,
|
|
14
|
+
Chip,
|
|
15
|
+
Checkbox,
|
|
16
|
+
Tab,
|
|
17
|
+
Tabs,
|
|
18
|
+
TabsList,
|
|
19
|
+
TabsTrigger,
|
|
20
|
+
TabsContent,
|
|
21
|
+
Header,
|
|
22
|
+
Entry,
|
|
23
|
+
EmptyState,
|
|
24
|
+
Modal,
|
|
25
|
+
ModalTrigger,
|
|
26
|
+
ModalClose,
|
|
27
|
+
ModalPortal,
|
|
28
|
+
ModalOverlay,
|
|
29
|
+
ModalContent,
|
|
30
|
+
ModalTitle,
|
|
31
|
+
ModalDescription,
|
|
32
|
+
ModalHeaderSlot,
|
|
33
|
+
ModalBody,
|
|
34
|
+
ModalPanel,
|
|
35
|
+
PdfViewer,
|
|
36
|
+
ImageViewer,
|
|
37
|
+
DocumentEditor,
|
|
38
|
+
} from "./components";
|
|
39
|
+
|
|
40
|
+
export type {
|
|
41
|
+
InputProps,
|
|
42
|
+
InputState,
|
|
43
|
+
ReportInputProps,
|
|
44
|
+
ReportInputState,
|
|
45
|
+
InputTypeProps,
|
|
46
|
+
InputTypeKind,
|
|
47
|
+
InputTypeState,
|
|
48
|
+
ChipProps,
|
|
49
|
+
ChipVariant,
|
|
50
|
+
CheckboxProps,
|
|
51
|
+
TabProps,
|
|
52
|
+
TabState,
|
|
53
|
+
TabsProps,
|
|
54
|
+
TabsListProps,
|
|
55
|
+
TabsTriggerProps,
|
|
56
|
+
TabsContentProps,
|
|
57
|
+
TabsItem,
|
|
58
|
+
TabsType,
|
|
59
|
+
HeaderProps,
|
|
60
|
+
HeaderVariant,
|
|
61
|
+
EntryProps,
|
|
62
|
+
EntryType,
|
|
63
|
+
EntryState,
|
|
64
|
+
EmptyStateProps,
|
|
65
|
+
ModalProps,
|
|
66
|
+
ModalOverlayProps,
|
|
67
|
+
ModalContentProps,
|
|
68
|
+
ModalTitleProps,
|
|
69
|
+
ModalDescriptionProps,
|
|
70
|
+
ModalBodyProps,
|
|
71
|
+
} from "./components";
|
|
72
|
+
|
|
73
|
+
export * as Patterns from "./patterns";
|
|
74
|
+
export * as Domain from "./domain";
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import { ChatIcon, IssuesIcon, ReportIcon } from "../../icons";
|
|
3
|
-
import { cn } from "../../utils/cn";
|
|
4
|
-
|
|
5
|
-
export type ResultRowVariant = "report" | "chat" | "issue";
|
|
6
|
-
export type ResultRowState = "idle" | "active";
|
|
7
|
-
|
|
8
|
-
export type ResultRowProps = {
|
|
9
|
-
variant?: ResultRowVariant;
|
|
10
|
-
state?: ResultRowState;
|
|
11
|
-
title?: ReactNode;
|
|
12
|
-
/** Secondary line — excerpt, metadata, or highlighted query match. */
|
|
13
|
-
subtitle?: ReactNode;
|
|
14
|
-
onClick?: () => void;
|
|
15
|
-
className?: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const variantIcons: Record<ResultRowVariant, ReactNode> = {
|
|
19
|
-
report: <ReportIcon className="size-4" />,
|
|
20
|
-
chat: <ChatIcon className="size-4" />,
|
|
21
|
-
issue: <IssuesIcon className="size-4" />,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const ResultRow = ({
|
|
25
|
-
variant = "report",
|
|
26
|
-
state = "idle",
|
|
27
|
-
title = "Search result",
|
|
28
|
-
subtitle,
|
|
29
|
-
onClick,
|
|
30
|
-
className,
|
|
31
|
-
}: ResultRowProps) => (
|
|
32
|
-
<button
|
|
33
|
-
type="button"
|
|
34
|
-
className={cn(
|
|
35
|
-
"flex w-full items-center gap-4 rounded-control px-3 py-2.5 text-left transition-colors",
|
|
36
|
-
"hover:bg-[rgba(38,36,32,0.04)]",
|
|
37
|
-
state === "active" && "bg-[rgba(38,36,32,0.04)]",
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
data-variant={variant}
|
|
41
|
-
data-state={state}
|
|
42
|
-
onClick={onClick}
|
|
43
|
-
>
|
|
44
|
-
<span className="shrink-0 text-display-on-light-secondary">
|
|
45
|
-
{variantIcons[variant]}
|
|
46
|
-
</span>
|
|
47
|
-
<span className="min-w-0 flex-1">
|
|
48
|
-
<span className="block truncate text-caption-1-em text-display-on-light-primary">
|
|
49
|
-
{title}
|
|
50
|
-
</span>
|
|
51
|
-
{subtitle != null && subtitle !== false && (
|
|
52
|
-
<span className="mt-0.5 block truncate text-caption-2 text-display-on-light-secondary">
|
|
53
|
-
{subtitle}
|
|
54
|
-
</span>
|
|
55
|
-
)}
|
|
56
|
-
</span>
|
|
57
|
-
</button>
|
|
58
|
-
);
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { ChatIcon, IssuesIcon, ReportIcon } from "../../icons";
|
|
3
|
+
import { cn } from "../../utils/cn";
|
|
4
|
+
|
|
5
|
+
export type ResultRowVariant = "report" | "chat" | "issue";
|
|
6
|
+
export type ResultRowState = "idle" | "active";
|
|
7
|
+
|
|
8
|
+
export type ResultRowProps = {
|
|
9
|
+
variant?: ResultRowVariant;
|
|
10
|
+
state?: ResultRowState;
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
/** Secondary line — excerpt, metadata, or highlighted query match. */
|
|
13
|
+
subtitle?: ReactNode;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const variantIcons: Record<ResultRowVariant, ReactNode> = {
|
|
19
|
+
report: <ReportIcon className="size-4" />,
|
|
20
|
+
chat: <ChatIcon className="size-4" />,
|
|
21
|
+
issue: <IssuesIcon className="size-4" />,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const ResultRow = ({
|
|
25
|
+
variant = "report",
|
|
26
|
+
state = "idle",
|
|
27
|
+
title = "Search result",
|
|
28
|
+
subtitle,
|
|
29
|
+
onClick,
|
|
30
|
+
className,
|
|
31
|
+
}: ResultRowProps) => (
|
|
32
|
+
<button
|
|
33
|
+
type="button"
|
|
34
|
+
className={cn(
|
|
35
|
+
"flex w-full items-center gap-4 rounded-control px-3 py-2.5 text-left transition-colors",
|
|
36
|
+
"hover:bg-[rgba(38,36,32,0.04)]",
|
|
37
|
+
state === "active" && "bg-[rgba(38,36,32,0.04)]",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
data-variant={variant}
|
|
41
|
+
data-state={state}
|
|
42
|
+
onClick={onClick}
|
|
43
|
+
>
|
|
44
|
+
<span className="shrink-0 text-display-on-light-secondary">
|
|
45
|
+
{variantIcons[variant]}
|
|
46
|
+
</span>
|
|
47
|
+
<span className="min-w-0 flex-1">
|
|
48
|
+
<span className="block truncate text-caption-1-em text-display-on-light-primary">
|
|
49
|
+
{title}
|
|
50
|
+
</span>
|
|
51
|
+
{subtitle != null && subtitle !== false && (
|
|
52
|
+
<span className="mt-0.5 block truncate text-caption-2 text-display-on-light-secondary">
|
|
53
|
+
{subtitle}
|
|
54
|
+
</span>
|
|
55
|
+
)}
|
|
56
|
+
</span>
|
|
57
|
+
</button>
|
|
58
|
+
);
|