@lateralus-ai/shipping-ui 1.0.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/README.md +108 -0
- package/dist/components/HelloWorld.d.ts +1 -0
- package/dist/components/InputPrompt.d.ts +20 -0
- package/dist/components/ModalPanel.d.ts +8 -0
- package/dist/components/PdfViewer/ImageViewer.d.ts +8 -0
- package/dist/components/PdfViewer/PdfViewer.d.ts +7 -0
- package/dist/components/PdfViewer/index.d.ts +2 -0
- package/dist/components/PdfViewer/usePageManagement.d.ts +5 -0
- package/dist/components/PdfViewer/usePanning.d.ts +15 -0
- package/dist/components/PdfViewer/useRefDimensions.d.ts +4 -0
- package/dist/components/PdfViewer/useRotation.d.ts +4 -0
- package/dist/components/PdfViewer/useZoom.d.ts +8 -0
- package/dist/components/Sidebar/Button.d.ts +7 -0
- package/dist/components/Sidebar/Container.d.ts +5 -0
- package/dist/components/Sidebar/Item.d.ts +9 -0
- package/dist/components/Sidebar/Layout.d.ts +7 -0
- package/dist/components/Sidebar/Provider.d.ts +14 -0
- package/dist/components/Sidebar/SecondaryItem.d.ts +9 -0
- package/dist/components/Sidebar/ToggleCollapseButton.d.ts +1 -0
- package/dist/components/Sidebar/index.d.ts +7 -0
- package/dist/components/icons/CloseSidebarIcon.d.ts +2 -0
- package/dist/components/icons/CloseSidebarMidIcon.d.ts +1 -0
- package/dist/components/icons/ExpandIcon.d.ts +3 -0
- package/dist/components/icons/SendArrowIcon.d.ts +4 -0
- package/dist/components/icons/SendArrowIconGreen.d.ts +4 -0
- package/dist/components/icons/XIcon.d.ts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/index.cjs +30 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +3671 -0
- package/dist/material-theme.d.ts +416 -0
- package/dist/stories/Buttons.d.ts +1 -0
- package/dist/stories/Checkbox.d.ts +1 -0
- package/dist/stories/ColorPalette.d.ts +1 -0
- package/dist/stories/Dropdowns.d.ts +1 -0
- package/dist/stories/InputPrompt.d.ts +1 -0
- package/dist/stories/Sidebar.d.ts +1 -0
- package/dist/stories/Typography.d.ts +1 -0
- package/dist/tailwind-theme.d.ts +197 -0
- package/dist/utils/cn.d.ts +7 -0
- package/package.json +88 -0
- package/src/components/HelloWorld.tsx +3 -0
- package/src/components/InputPrompt.tsx +96 -0
- package/src/components/ModalPanel.tsx +31 -0
- package/src/components/PdfViewer/ImageViewer.tsx +167 -0
- package/src/components/PdfViewer/PdfViewer.tsx +53 -0
- package/src/components/PdfViewer/index.ts +2 -0
- package/src/components/PdfViewer/usePageManagement.ts +14 -0
- package/src/components/PdfViewer/usePanning.ts +42 -0
- package/src/components/PdfViewer/useRefDimensions.ts +16 -0
- package/src/components/PdfViewer/useRotation.ts +13 -0
- package/src/components/PdfViewer/useZoom.ts +26 -0
- package/src/components/Sidebar/Button.tsx +20 -0
- package/src/components/Sidebar/Container.tsx +32 -0
- package/src/components/Sidebar/Item.tsx +39 -0
- package/src/components/Sidebar/Layout.tsx +23 -0
- package/src/components/Sidebar/Provider.tsx +47 -0
- package/src/components/Sidebar/SecondaryItem.tsx +39 -0
- package/src/components/Sidebar/ToggleCollapseButton.tsx +24 -0
- package/src/components/Sidebar/index.ts +7 -0
- package/src/components/icons/CloseSidebarIcon.tsx +19 -0
- package/src/components/icons/CloseSidebarMidIcon.tsx +19 -0
- package/src/components/icons/ExpandIcon.tsx +21 -0
- package/src/components/icons/SendArrowIcon.tsx +23 -0
- package/src/components/icons/SendArrowIconGreen.tsx +17 -0
- package/src/components/icons/XIcon.tsx +21 -0
- package/src/components/index.ts +3 -0
- package/src/index.ts +4 -0
- package/src/material-theme.ts +447 -0
- package/src/stories/Buttons.stories.tsx +15 -0
- package/src/stories/Buttons.tsx +52 -0
- package/src/stories/Checkbox.stories.tsx +15 -0
- package/src/stories/Checkbox.tsx +56 -0
- package/src/stories/ColorPalette.stories.tsx +15 -0
- package/src/stories/ColorPalette.tsx +72 -0
- package/src/stories/Dropdowns.stories.tsx +15 -0
- package/src/stories/Dropdowns.tsx +52 -0
- package/src/stories/InputPrompt.stories.tsx +15 -0
- package/src/stories/InputPrompt.tsx +63 -0
- package/src/stories/PDFViewer.stories.tsx +37 -0
- package/src/stories/Sidebar.stories.tsx +15 -0
- package/src/stories/Sidebar.tsx +94 -0
- package/src/stories/Typography.stories.tsx +15 -0
- package/src/stories/Typography.tsx +110 -0
- package/src/style.css +2 -0
- package/src/tailwind-theme.ts +219 -0
- package/src/utils/cn.ts +11 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
IconButton,
|
|
4
|
+
Menu,
|
|
5
|
+
MenuHandler,
|
|
6
|
+
MenuItem,
|
|
7
|
+
MenuList,
|
|
8
|
+
} from "@material-tailwind/react";
|
|
9
|
+
import { Icon } from "@iconify/react";
|
|
10
|
+
|
|
11
|
+
export const Dropdowns = () => (
|
|
12
|
+
<div className="p-8 grid gap-4">
|
|
13
|
+
<div className="flex gap-4">
|
|
14
|
+
<Menu>
|
|
15
|
+
<MenuHandler>
|
|
16
|
+
<Button>Menu</Button>
|
|
17
|
+
</MenuHandler>
|
|
18
|
+
<MenuList>
|
|
19
|
+
<MenuItem>Menu Item 1</MenuItem>
|
|
20
|
+
<MenuItem>Menu Item 2</MenuItem>
|
|
21
|
+
<MenuItem>Menu Item 3</MenuItem>
|
|
22
|
+
</MenuList>
|
|
23
|
+
</Menu>
|
|
24
|
+
|
|
25
|
+
<Menu>
|
|
26
|
+
<MenuHandler>
|
|
27
|
+
<Button color="blue">
|
|
28
|
+
<Icon icon="hugeicons:menu-01" /> Menu
|
|
29
|
+
</Button>
|
|
30
|
+
</MenuHandler>
|
|
31
|
+
<MenuList>
|
|
32
|
+
<MenuItem>Menu Item 1</MenuItem>
|
|
33
|
+
<MenuItem>Menu Item 2</MenuItem>
|
|
34
|
+
<MenuItem>Menu Item 3</MenuItem>
|
|
35
|
+
</MenuList>
|
|
36
|
+
</Menu>
|
|
37
|
+
|
|
38
|
+
<Menu>
|
|
39
|
+
<MenuHandler>
|
|
40
|
+
<IconButton color="neutral" variant="outlined">
|
|
41
|
+
<Icon icon="hugeicons:menu-01" />
|
|
42
|
+
</IconButton>
|
|
43
|
+
</MenuHandler>
|
|
44
|
+
<MenuList>
|
|
45
|
+
<MenuItem>Menu Item 1</MenuItem>
|
|
46
|
+
<MenuItem>Menu Item 2</MenuItem>
|
|
47
|
+
<MenuItem>Menu Item 3</MenuItem>
|
|
48
|
+
</MenuList>
|
|
49
|
+
</Menu>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { InputPrompts } from "./InputPrompt";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/InputPrompts",
|
|
6
|
+
component: InputPrompts,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof InputPrompts>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Button, IconButton } from "@material-tailwind/react";
|
|
2
|
+
import { InputPrompt } from "../components/";
|
|
3
|
+
import { Icon } from "@iconify/react";
|
|
4
|
+
|
|
5
|
+
export const InputPrompts = () => {
|
|
6
|
+
const bottomButtons = (
|
|
7
|
+
<div>
|
|
8
|
+
<Button variant="text" color="gray">
|
|
9
|
+
Select ship
|
|
10
|
+
</Button>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const rightButtons = (
|
|
15
|
+
<div className="flex gap-2">
|
|
16
|
+
<IconButton variant="text" color="gray">
|
|
17
|
+
<Icon icon="material-symbols:attach-file-rounded" className="size-6" />
|
|
18
|
+
</IconButton>
|
|
19
|
+
<InputPrompt.SubmitButton onClick={() => alert("Click")} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const topContent = (
|
|
24
|
+
<div className="p-2 mt-2 mx-2 rounded bg-orange-50">
|
|
25
|
+
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ex minima hic
|
|
26
|
+
qui! Ipsum et, perferendis molestias ut voluptatum laborum id similique.
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const textArea = (
|
|
31
|
+
<InputPrompt.Textarea placeholder="Write your message here" />
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className="w-[650px] grid gap-8 p-4">
|
|
36
|
+
<InputPrompt.Container right={rightButtons} textArea={textArea} />
|
|
37
|
+
<InputPrompt.Container
|
|
38
|
+
right={rightButtons}
|
|
39
|
+
bottom={bottomButtons}
|
|
40
|
+
textArea={textArea}
|
|
41
|
+
/>
|
|
42
|
+
<InputPrompt.Container
|
|
43
|
+
right={rightButtons}
|
|
44
|
+
top={topContent}
|
|
45
|
+
textArea={textArea}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<div className="border rounded-lg">
|
|
49
|
+
<div className="border-b p-4">Lorem Ipsum dorcet sit amet</div>
|
|
50
|
+
<div className="p-4 border-b">
|
|
51
|
+
<div className="h-[650px] text-gray-400 font-semibold bg-gray-100 rounded-2xl items-center justify-center flex">
|
|
52
|
+
Content placeholder
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<InputPrompt.Container
|
|
56
|
+
right={rightButtons}
|
|
57
|
+
textArea={textArea}
|
|
58
|
+
className="border-none shadow-none"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ImageViewer, PdfViewer } from "../components/PdfViewer";
|
|
3
|
+
|
|
4
|
+
const StoryPage = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="flex gap-16">
|
|
7
|
+
<div className="w-[600px] h-[800px] p-8">
|
|
8
|
+
<ImageViewer
|
|
9
|
+
totalPages={100}
|
|
10
|
+
title="Image Viewer"
|
|
11
|
+
getImageSrc={(page) =>
|
|
12
|
+
`https://placehold.co/600x400?text=page-${page}`
|
|
13
|
+
}
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
<div className="w-[600px] h-[800px] p-8" title="Document Viewer">
|
|
17
|
+
<PdfViewer
|
|
18
|
+
totalPages={100}
|
|
19
|
+
src="https://www.antennahouse.com/hubfs/xsl-fo-sample/pdf/basic-link-1.pdf"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const meta = {
|
|
27
|
+
title: "Design System/PDFViewer",
|
|
28
|
+
component: StoryPage,
|
|
29
|
+
parameters: {
|
|
30
|
+
layout: "fullscreen",
|
|
31
|
+
},
|
|
32
|
+
} satisfies Meta<typeof StoryPage>;
|
|
33
|
+
|
|
34
|
+
export default meta;
|
|
35
|
+
type Story = StoryObj<typeof meta>;
|
|
36
|
+
|
|
37
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { SidebarScreen as Sidebar } from "./Sidebar";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/Sidebar",
|
|
6
|
+
component: Sidebar,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof Sidebar>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Icon } from "@iconify/react";
|
|
2
|
+
import { Sidebar } from "../components";
|
|
3
|
+
import {
|
|
4
|
+
IconButton,
|
|
5
|
+
Menu,
|
|
6
|
+
MenuHandler,
|
|
7
|
+
MenuItem,
|
|
8
|
+
MenuList,
|
|
9
|
+
} from "@material-tailwind/react";
|
|
10
|
+
|
|
11
|
+
const menuExample = (
|
|
12
|
+
<div className="opacity-0 group-hover:opacity-100">
|
|
13
|
+
<Menu placement="right" offset={{ mainAxis: -40 }}>
|
|
14
|
+
<MenuHandler>
|
|
15
|
+
<IconButton color="gray" size="sm" variant="text">
|
|
16
|
+
<Icon icon="lucide:ellipsis" className="size-4" />
|
|
17
|
+
</IconButton>
|
|
18
|
+
</MenuHandler>
|
|
19
|
+
<MenuList>
|
|
20
|
+
<MenuItem>Menu Item 1</MenuItem>
|
|
21
|
+
<MenuItem>Menu Item 2</MenuItem>
|
|
22
|
+
<MenuItem className="text-red-500">Menu Item 3</MenuItem>
|
|
23
|
+
</MenuList>
|
|
24
|
+
</Menu>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const arrowExample = (
|
|
29
|
+
<button>
|
|
30
|
+
<Icon icon="mage:caret-right" className="size-4" />
|
|
31
|
+
</button>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export const SidebarScreen = () => (
|
|
35
|
+
<div className="p-8 gap-4 flex ">
|
|
36
|
+
<Sidebar.Layout className="h-[800px]">
|
|
37
|
+
<div className="w-full flex flex-col gap-2">
|
|
38
|
+
<div className="flex justify-between pr-1">
|
|
39
|
+
<Sidebar.Button
|
|
40
|
+
onClick={() => alert("click")}
|
|
41
|
+
icon={<Icon icon="mage:box-check" className="size-6" />}
|
|
42
|
+
>
|
|
43
|
+
{" "}
|
|
44
|
+
Lorem ipsum
|
|
45
|
+
</Sidebar.Button>
|
|
46
|
+
|
|
47
|
+
<Sidebar.ToggleCollapseButton />
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<Sidebar.Item
|
|
51
|
+
icon={<Icon icon="mage:book" className="size-6" />}
|
|
52
|
+
trailing={arrowExample}
|
|
53
|
+
>
|
|
54
|
+
Dorcet sit amet
|
|
55
|
+
</Sidebar.Item>
|
|
56
|
+
|
|
57
|
+
<Sidebar.Item
|
|
58
|
+
icon={<Icon icon="mage:calendar" className="size-6" />}
|
|
59
|
+
isActive
|
|
60
|
+
>
|
|
61
|
+
Tempore ipsa
|
|
62
|
+
</Sidebar.Item>
|
|
63
|
+
|
|
64
|
+
<Sidebar.Item icon={<Icon icon="mage:email" className="size-6" />}>
|
|
65
|
+
{" "}
|
|
66
|
+
Duis ditarcher
|
|
67
|
+
</Sidebar.Item>
|
|
68
|
+
|
|
69
|
+
<div className="w-full flex flex-col gap-1 relative">
|
|
70
|
+
<Sidebar.SecondaryItem
|
|
71
|
+
trailing={menuExample}
|
|
72
|
+
icon={
|
|
73
|
+
<Icon icon="mage:message" className="size-5 text-orange-400" />
|
|
74
|
+
}
|
|
75
|
+
>
|
|
76
|
+
{" "}
|
|
77
|
+
Dolore eu fugiat nulla
|
|
78
|
+
</Sidebar.SecondaryItem>
|
|
79
|
+
|
|
80
|
+
<Sidebar.SecondaryItem
|
|
81
|
+
trailing={menuExample}
|
|
82
|
+
icon={<Icon icon="mage:message" className="size-5" />}
|
|
83
|
+
>
|
|
84
|
+
Lorem ipsum dorcet sit
|
|
85
|
+
</Sidebar.SecondaryItem>
|
|
86
|
+
|
|
87
|
+
<Sidebar.SecondaryItem>Show all</Sidebar.SecondaryItem>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div className="h-20 bg-gray-100 w-full rounded-xl"></div>
|
|
92
|
+
</Sidebar.Layout>
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Typography } from "./Typography";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Design System/Typography",
|
|
6
|
+
component: Typography,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
} satisfies Meta<typeof Typography>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export const Typography = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div className="p-8 space-y-8">
|
|
6
|
+
<section>
|
|
7
|
+
<h2 className="text-2xl font-bold mb-4">Typography Styles</h2>
|
|
8
|
+
|
|
9
|
+
<div className="space-y-4">
|
|
10
|
+
<div className="border-b pb-2">
|
|
11
|
+
<p className="text-caption-2 text-gray-500 mb-1">Subheader</p>
|
|
12
|
+
<p className="text-subheader">This is subheader text (18px/28px)</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div className="border-b pb-2">
|
|
16
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
17
|
+
Subheader Emphasized
|
|
18
|
+
</p>
|
|
19
|
+
<p className="text-subheader-em">
|
|
20
|
+
This is emphasized subheader text (18px/28px, 500 weight)
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div className="border-b pb-2">
|
|
25
|
+
<p className="text-caption-2 text-gray-500 mb-1">Body</p>
|
|
26
|
+
<p className="text-body">This is body text (16px/28px)</p>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="border-b pb-2">
|
|
30
|
+
<p className="text-caption-2 text-gray-500 mb-1">Body Emphasized</p>
|
|
31
|
+
<p className="text-body-em">
|
|
32
|
+
This is emphasized body text (16px/28px, 500 weight)
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div className="border-b pb-2">
|
|
37
|
+
<p className="text-caption-2 text-gray-500 mb-1">Caption 1</p>
|
|
38
|
+
<p className="text-caption-1">This is caption-1 text (16px/22px)</p>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div className="border-b pb-2">
|
|
42
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
43
|
+
Caption 1 Emphasized
|
|
44
|
+
</p>
|
|
45
|
+
<p className="text-caption-1-em">
|
|
46
|
+
This is emphasized caption-1 text (16px/22px, 500 weight)
|
|
47
|
+
</p>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div className="border-b pb-2">
|
|
51
|
+
<p className="text-caption-2 text-gray-500 mb-1">Caption 2</p>
|
|
52
|
+
<p className="text-caption-2">This is caption-2 text (14px/20px)</p>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div className="border-b pb-2">
|
|
56
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
57
|
+
Caption 2 Emphasized
|
|
58
|
+
</p>
|
|
59
|
+
<p className="text-caption-2-em">
|
|
60
|
+
This is emphasized caption-2 text (14px/20px, 500 weight)
|
|
61
|
+
</p>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div className="border-b pb-2">
|
|
65
|
+
<p className="text-caption-2 text-gray-500 mb-1">Footnote</p>
|
|
66
|
+
<p className="text-footnote">This is footnote text (13px/17px)</p>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div className="border-b pb-2">
|
|
70
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
71
|
+
Footnote Emphasized
|
|
72
|
+
</p>
|
|
73
|
+
<p className="text-footnote-em">
|
|
74
|
+
This is emphasized footnote text (13px/17px, 500 weight)
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</section>
|
|
79
|
+
|
|
80
|
+
<section>
|
|
81
|
+
<h2 className="text-2xl font-bold mb-4">Font Families</h2>
|
|
82
|
+
|
|
83
|
+
<div className="space-y-4">
|
|
84
|
+
<div className="border-b pb-2">
|
|
85
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
86
|
+
Sans (Work Sans)
|
|
87
|
+
</p>
|
|
88
|
+
<p className="font-sans text-body">
|
|
89
|
+
The quick brown fox jumps over the lazy dog
|
|
90
|
+
</p>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div className="border-b pb-2">
|
|
94
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
95
|
+
Mono (Roboto Mono)
|
|
96
|
+
</p>
|
|
97
|
+
<p className="font-mono text-body">const code = "Hello, World!";</p>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div className="border-b pb-2">
|
|
101
|
+
<p className="text-caption-2 text-gray-500 mb-1">
|
|
102
|
+
Signature (Cursive)
|
|
103
|
+
</p>
|
|
104
|
+
<p className="font-signature text-body">John Doe</p>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</section>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
package/src/style.css
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export const theme = {
|
|
2
|
+
fontFamily: {
|
|
3
|
+
sans: ["Work Sans", "sans-serif"],
|
|
4
|
+
mono: ["Roboto Mono", "monospace"],
|
|
5
|
+
signature: ["Alex Brush", "Lucida Handwriting", "cursive"],
|
|
6
|
+
},
|
|
7
|
+
fontSize: {
|
|
8
|
+
subheader: [
|
|
9
|
+
"18px",
|
|
10
|
+
{
|
|
11
|
+
lineHeight: "28px",
|
|
12
|
+
letterSpacing: "-0.01em",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
"subheader-em": [
|
|
16
|
+
"18px",
|
|
17
|
+
{
|
|
18
|
+
lineHeight: "28px",
|
|
19
|
+
letterSpacing: "-0.01em",
|
|
20
|
+
fontWeight: "500",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
body: [
|
|
24
|
+
"16px",
|
|
25
|
+
{
|
|
26
|
+
lineHeight: "28px",
|
|
27
|
+
letterSpacing: "-0.01em",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
"body-em": [
|
|
31
|
+
"16px",
|
|
32
|
+
{
|
|
33
|
+
lineHeight: "28px",
|
|
34
|
+
letterSpacing: "-0.01em",
|
|
35
|
+
fontWeight: "500",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
"caption-1": [
|
|
39
|
+
"16px",
|
|
40
|
+
{
|
|
41
|
+
lineHeight: "22px",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
"caption-1-em": [
|
|
45
|
+
"16px",
|
|
46
|
+
{
|
|
47
|
+
lineHeight: "22px",
|
|
48
|
+
fontWeight: "500",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
"caption-2": [
|
|
52
|
+
"14px",
|
|
53
|
+
{
|
|
54
|
+
lineHeight: "20px",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
"caption-2-em": [
|
|
58
|
+
"14px",
|
|
59
|
+
{
|
|
60
|
+
lineHeight: "20px",
|
|
61
|
+
fontWeight: "500",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
footnote: [
|
|
65
|
+
"13px",
|
|
66
|
+
{
|
|
67
|
+
lineHeight: "17px",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
"footnote-em": [
|
|
71
|
+
"13px",
|
|
72
|
+
{
|
|
73
|
+
lineHeight: "17px",
|
|
74
|
+
fontWeight: "500",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
width: {
|
|
79
|
+
authPageWidth: "370px",
|
|
80
|
+
},
|
|
81
|
+
keyframes: {
|
|
82
|
+
"accordion-down": {
|
|
83
|
+
from: { height: 0 },
|
|
84
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
85
|
+
},
|
|
86
|
+
"accordion-up": {
|
|
87
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
88
|
+
to: { height: 0 },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
animation: {
|
|
92
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
93
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
94
|
+
},
|
|
95
|
+
colors: {
|
|
96
|
+
gray: {
|
|
97
|
+
50: "#fafafa",
|
|
98
|
+
100: "#f0f0f0",
|
|
99
|
+
200: "#d6d6d6",
|
|
100
|
+
300: "#bdbdbd",
|
|
101
|
+
400: "#a3a3a3",
|
|
102
|
+
500: "#8a8a8a",
|
|
103
|
+
600: "#6e6e6e",
|
|
104
|
+
700: "#525252",
|
|
105
|
+
800: "#363636",
|
|
106
|
+
900: "#1a1a1a",
|
|
107
|
+
},
|
|
108
|
+
green: {
|
|
109
|
+
50: "#e0fff2",
|
|
110
|
+
100: "#adf0d3",
|
|
111
|
+
200: "#8aeac1",
|
|
112
|
+
300: "#67e4ae",
|
|
113
|
+
400: "#45de9c",
|
|
114
|
+
500: "#26d489",
|
|
115
|
+
600: "#1da56a",
|
|
116
|
+
700: "#15754c",
|
|
117
|
+
800: "#0c452d",
|
|
118
|
+
900: "#04160e",
|
|
119
|
+
},
|
|
120
|
+
blue: {
|
|
121
|
+
50: "#cae8f7",
|
|
122
|
+
100: "#b8e0f4",
|
|
123
|
+
200: "#95d1ef",
|
|
124
|
+
300: "#71c1ea",
|
|
125
|
+
400: "#4eb2e4",
|
|
126
|
+
500: "#2aa2df",
|
|
127
|
+
600: "#1b82b6",
|
|
128
|
+
700: "#145f85",
|
|
129
|
+
800: "#0d3c54",
|
|
130
|
+
900: "#051923",
|
|
131
|
+
},
|
|
132
|
+
red: {
|
|
133
|
+
50: "#f9dcdc",
|
|
134
|
+
100: "#f6cbcb",
|
|
135
|
+
200: "#f0a8a8",
|
|
136
|
+
300: "#ea8686",
|
|
137
|
+
400: "#e36363",
|
|
138
|
+
500: "#dd4040",
|
|
139
|
+
600: "#c32222",
|
|
140
|
+
700: "#931a1a",
|
|
141
|
+
800: "#641212",
|
|
142
|
+
900: "#340909",
|
|
143
|
+
},
|
|
144
|
+
orange: {
|
|
145
|
+
50: "#fff7eb",
|
|
146
|
+
100: "#f8e0bf",
|
|
147
|
+
200: "#f4cf9a",
|
|
148
|
+
300: "#f0bd75",
|
|
149
|
+
400: "#ecab51",
|
|
150
|
+
500: "#e89a2c",
|
|
151
|
+
600: "#C77C0A",
|
|
152
|
+
700: "#935d10",
|
|
153
|
+
800: "#603d0b",
|
|
154
|
+
900: "#2e1d05",
|
|
155
|
+
},
|
|
156
|
+
"brand-purple": "#ab68ff",
|
|
157
|
+
presentation: "var(--presentation)",
|
|
158
|
+
"text-primary": "var(--text-primary)",
|
|
159
|
+
"text-secondary": "var(--text-secondary)",
|
|
160
|
+
"text-secondary-alt": "var(--text-secondary-alt)",
|
|
161
|
+
"text-tertiary": "var(--text-tertiary)",
|
|
162
|
+
"ring-primary": "var(--ring-primary)",
|
|
163
|
+
"header-primary": "var(--header-primary)",
|
|
164
|
+
"header-hover": "var(--header-hover)",
|
|
165
|
+
"header-button-hover": "var(--header-button-hover)",
|
|
166
|
+
"surface-active": "var(--surface-active)",
|
|
167
|
+
"surface-active-alt": "var(--surface-active-alt)",
|
|
168
|
+
"surface-hover": "var(--surface-hover)",
|
|
169
|
+
"surface-primary": "var(--surface-primary)",
|
|
170
|
+
"surface-primary-alt": "var(--surface-primary-alt)",
|
|
171
|
+
"surface-primary-contrast": "var(--surface-primary-contrast)",
|
|
172
|
+
"surface-secondary": "var(--surface-secondary)",
|
|
173
|
+
"surface-secondary-alt": "var(--surface-secondary-alt)",
|
|
174
|
+
"surface-tertiary": "var(--surface-tertiary)",
|
|
175
|
+
"surface-tertiary-alt": "var(--surface-tertiary-alt)",
|
|
176
|
+
"surface-dialog": "var(--surface-dialog)",
|
|
177
|
+
"surface-submit": "var(--surface-submit)",
|
|
178
|
+
"border-light": "var(--border-light)",
|
|
179
|
+
"border-medium": "var(--border-medium)",
|
|
180
|
+
"border-medium-alt": "var(--border-medium-alt)",
|
|
181
|
+
"border-heavy": "var(--border-heavy)",
|
|
182
|
+
"border-xheavy": "var(--border-xheavy)",
|
|
183
|
+
border: "hsl(var(--border))",
|
|
184
|
+
input: "hsl(var(--input))",
|
|
185
|
+
["switch-unchecked"]: "hsl(var(--switch-unchecked))",
|
|
186
|
+
ring: "hsl(var(--ring))",
|
|
187
|
+
background: "hsl(var(--background))",
|
|
188
|
+
foreground: "hsl(var(--foreground))",
|
|
189
|
+
primary: {
|
|
190
|
+
DEFAULT: "hsl(var(--primary))",
|
|
191
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
192
|
+
},
|
|
193
|
+
secondary: {
|
|
194
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
195
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
196
|
+
},
|
|
197
|
+
destructive: {
|
|
198
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
199
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
200
|
+
},
|
|
201
|
+
muted: {
|
|
202
|
+
DEFAULT: "hsl(var(--muted))",
|
|
203
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
204
|
+
},
|
|
205
|
+
accent: {
|
|
206
|
+
DEFAULT: "hsl(var(--accent))",
|
|
207
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
208
|
+
},
|
|
209
|
+
card: {
|
|
210
|
+
DEFAULT: "hsl(var(--card))",
|
|
211
|
+
foreground: "hsl(var(--card-foreground))",
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
borderRadius: {
|
|
215
|
+
lg: "8px",
|
|
216
|
+
md: "calc(8px - 2px)",
|
|
217
|
+
sm: "calc(8px - 4px)",
|
|
218
|
+
},
|
|
219
|
+
};
|
package/src/utils/cn.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { twMerge } from "tailwind-merge";
|
|
2
|
+
import { type ClassValue, clsx } from "clsx";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Merges the tailwind clases (using twMerge). Conditionally removes false values
|
|
6
|
+
* @param inputs The tailwind classes to merge
|
|
7
|
+
* @returns className string to apply to an element or HOC
|
|
8
|
+
*/
|
|
9
|
+
export function cn(...inputs: ClassValue[]) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|