@lateralus-ai/shipping-ui 1.4.12 → 1.4.14
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 -108
- package/dist/index.cjs +38 -38
- package/dist/index.esm.js +4936 -4913
- package/dist/tailwind-theme.d.ts +12 -0
- package/package.json +99 -99
- package/src/components/DocumentEditor/DocumentEditor.tsx +871 -871
- package/src/components/HelloWorld.tsx +3 -3
- package/src/components/InputPrompt.tsx +96 -96
- package/src/components/ModalPanel.tsx +49 -49
- package/src/components/PdfViewer/ImageViewer.tsx +211 -211
- package/src/components/PdfViewer/PdfViewer.tsx +232 -209
- package/src/components/PdfViewer/index.ts +2 -2
- package/src/components/PdfViewer/usePageManagement.ts +32 -32
- package/src/components/PdfViewer/usePanning.ts +42 -42
- package/src/components/PdfViewer/useRefDimensions.ts +16 -16
- package/src/components/PdfViewer/useRotation.ts +13 -13
- package/src/components/PdfViewer/useZoom.ts +26 -26
- package/src/components/SearchModal.tsx +320 -320
- package/src/components/Sidebar/Button.tsx +20 -20
- package/src/components/Sidebar/Container.tsx +31 -31
- package/src/components/Sidebar/Item.tsx +39 -39
- package/src/components/Sidebar/Layout.tsx +32 -32
- package/src/components/Sidebar/Provider.tsx +47 -47
- package/src/components/Sidebar/SecondaryItem.tsx +39 -39
- package/src/components/Sidebar/SideContainer.tsx +31 -31
- package/src/components/Sidebar/ToggleCollapseButton.tsx +24 -24
- package/src/components/Sidebar/index.ts +8 -8
- package/src/components/Tabs.tsx +43 -43
- package/src/components/icons/CloseSidebarIcon.tsx +19 -19
- package/src/components/icons/CloseSidebarMidIcon.tsx +19 -19
- package/src/components/icons/ExpandIcon.tsx +21 -21
- package/src/components/icons/SendArrowIcon.tsx +23 -23
- package/src/components/icons/SendArrowIconGreen.tsx +17 -17
- package/src/components/icons/SettingsIcon.tsx +33 -33
- package/src/components/icons/XIcon.tsx +21 -21
- package/src/components/index.ts +6 -6
- package/src/index.ts +4 -4
- package/src/material-theme.ts +477 -477
- package/src/stories/Buttons.stories.tsx +15 -15
- package/src/stories/Buttons.tsx +52 -52
- package/src/stories/Checkbox.stories.tsx +15 -15
- package/src/stories/Checkbox.tsx +56 -56
- package/src/stories/ColorPalette.stories.tsx +15 -15
- package/src/stories/ColorPalette.tsx +85 -72
- package/src/stories/DocumentEditor.stories.tsx +287 -287
- package/src/stories/Dropdowns.stories.tsx +15 -15
- package/src/stories/Dropdowns.tsx +52 -52
- package/src/stories/InputPrompt.stories.tsx +15 -15
- package/src/stories/InputPrompt.tsx +63 -63
- package/src/stories/ModalHeader.stories.tsx +35 -35
- package/src/stories/PDFViewer.stories.tsx +39 -39
- package/src/stories/SearchModal.stories.tsx +132 -132
- package/src/stories/SearchModal.tsx +82 -82
- package/src/stories/Sidebar.stories.tsx +15 -15
- package/src/stories/Sidebar.tsx +108 -108
- package/src/stories/Tabs.stories.tsx +51 -51
- package/src/stories/Typography.stories.tsx +15 -15
- package/src/stories/Typography.tsx +110 -110
- package/src/style.css +2 -2
- package/src/styles/tabs.css +55 -55
- package/src/tailwind-theme.ts +243 -231
- package/src/types/documentEditor.ts +55 -55
- package/src/utils/checkboxModule.ts +241 -241
- package/src/utils/cn.ts +11 -11
|
@@ -1,52 +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
|
-
);
|
|
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
|
+
);
|
|
@@ -1,15 +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 = {};
|
|
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 = {};
|
|
@@ -1,63 +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
|
-
};
|
|
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
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { ModalPanel } from "../components/ModalPanel";
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof ModalPanel.Header> = {
|
|
5
|
-
title: "Design System/ModalPanel",
|
|
6
|
-
component: ModalPanel.Header,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof ModalPanel.Header>;
|
|
14
|
-
|
|
15
|
-
export const Default: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
onClose: () => console.log("Close button clicked"),
|
|
18
|
-
children: "Modal Panel Example",
|
|
19
|
-
},
|
|
20
|
-
decorators: [
|
|
21
|
-
(Story) => (
|
|
22
|
-
<div className="w-[500px] border border-gray-200 rounded-xl">
|
|
23
|
-
<Story />
|
|
24
|
-
<ModalPanel.Body className="h-64 p-4">
|
|
25
|
-
<p className="text-body">
|
|
26
|
-
This is the modal body content. The height is controlled by the h-64 class,
|
|
27
|
-
and the width fills the container automatically.
|
|
28
|
-
</p>
|
|
29
|
-
<p className="text-body mt-4">
|
|
30
|
-
You can add any content here and control the height through the className prop.
|
|
31
|
-
</p>
|
|
32
|
-
</ModalPanel.Body>
|
|
33
|
-
</div>
|
|
34
|
-
),
|
|
35
|
-
],
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ModalPanel } from "../components/ModalPanel";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof ModalPanel.Header> = {
|
|
5
|
+
title: "Design System/ModalPanel",
|
|
6
|
+
component: ModalPanel.Header,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof ModalPanel.Header>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
onClose: () => console.log("Close button clicked"),
|
|
18
|
+
children: "Modal Panel Example",
|
|
19
|
+
},
|
|
20
|
+
decorators: [
|
|
21
|
+
(Story) => (
|
|
22
|
+
<div className="w-[500px] border border-gray-200 rounded-xl">
|
|
23
|
+
<Story />
|
|
24
|
+
<ModalPanel.Body className="h-64 p-4">
|
|
25
|
+
<p className="text-body">
|
|
26
|
+
This is the modal body content. The height is controlled by the h-64 class,
|
|
27
|
+
and the width fills the container automatically.
|
|
28
|
+
</p>
|
|
29
|
+
<p className="text-body mt-4">
|
|
30
|
+
You can add any content here and control the height through the className prop.
|
|
31
|
+
</p>
|
|
32
|
+
</ModalPanel.Body>
|
|
33
|
+
</div>
|
|
34
|
+
),
|
|
35
|
+
],
|
|
36
36
|
};
|