@lateralus-ai/shipping-ui 1.1.1 → 1.2.0

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.
@@ -0,0 +1,82 @@
1
+ import { useState } from "react";
2
+ import { SearchModal } from "../components/SearchModal";
3
+
4
+ const mockResults = [
5
+ {
6
+ id: "1",
7
+ title: "Create React App",
8
+ description: "Set up a modern web app by running one command",
9
+ category: "Documentation",
10
+ },
11
+ {
12
+ id: "2",
13
+ title: "React Router",
14
+ description: "Declarative routing for React apps at any scale",
15
+ category: "Library",
16
+ },
17
+ {
18
+ id: "3",
19
+ title: "Redux Toolkit",
20
+ description:
21
+ "The official, opinionated, batteries-included toolset for efficient Redux development",
22
+ category: "State Management",
23
+ },
24
+ {
25
+ id: "4",
26
+ title: "Material Tailwind",
27
+ description:
28
+ "React components library that implements Google's Material Design",
29
+ category: "UI Library",
30
+ },
31
+ {
32
+ id: "5",
33
+ title: "Tailwind CSS",
34
+ description: "A utility-first CSS framework for rapid UI development",
35
+ category: "Styling",
36
+ },
37
+ ];
38
+
39
+ export const SearchModals = () => {
40
+ const [open, setOpen] = useState(false);
41
+ const [searchQuery, setSearchQuery] = useState("");
42
+ const [activeFilter, setActiveFilter] = useState<string>("");
43
+
44
+ const filteredResults = mockResults.filter((result) => {
45
+ const matchesQuery = result.title
46
+ .toLowerCase()
47
+ .includes(searchQuery.toLowerCase());
48
+ const matchesFilter = !activeFilter || result.category === activeFilter;
49
+ return matchesQuery && matchesFilter;
50
+ });
51
+
52
+ return (
53
+ <div className="p-8">
54
+ <button
55
+ onClick={() => setOpen(true)}
56
+ className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
57
+ >
58
+ Open Search Modal
59
+ </button>
60
+
61
+ <SearchModal
62
+ open={open}
63
+ onClose={() => setOpen(false)}
64
+ results={searchQuery ? filteredResults : []}
65
+ onSearch={setSearchQuery}
66
+ onResultClick={(result) => {
67
+ console.log("Selected:", result);
68
+ alert(`Selected: ${result.title}`);
69
+ }}
70
+ filters={[
71
+ "Documentation",
72
+ "Library",
73
+ "State Management",
74
+ "UI Library",
75
+ "Styling",
76
+ ]}
77
+ activeFilter={activeFilter}
78
+ onFilterChange={setActiveFilter}
79
+ />
80
+ </div>
81
+ );
82
+ };
@@ -0,0 +1,51 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Tabs,
4
+ TabsHeader,
5
+ Tab,
6
+ TabsBody,
7
+ TabPanel,
8
+ } from "@material-tailwind/react";
9
+ import { SettingsIcon } from "../components/icons/SettingsIcon";
10
+
11
+ const TabsComponent = () => (
12
+ <Tabs value="chats" className="w-[800px]">
13
+ <TabsHeader>
14
+ <Tab value="chats">Chats</Tab>
15
+ <Tab value="issues">Issues</Tab>
16
+
17
+ <button className="cursor-pointer mb-2 ml-auto rounded p-1 hover:bg-gray-100">
18
+ <SettingsIcon className="size-4" />
19
+ </button>
20
+ </TabsHeader>
21
+
22
+ <TabsBody>
23
+ <TabPanel value="chats">
24
+ Chats panel orem ipsum dolor sit, amet consectetur adipisicing elit.
25
+ Saepe deserunt officiis tempora accusamus sunt illo quae placeat velit
26
+ eius maiores, iste ipsa alias quos similique dolores odio? Magnam, quia
27
+ deleniti?
28
+ </TabPanel>
29
+ <TabPanel value="issues">
30
+ Issues panel orem ipsum dolor sit, amet consectetur adipisicing elit.
31
+ Saepe deserunt officiis tempora accusamus sunt illo quae placeat velit
32
+ eius maiores, iste ipsa alias quos similique dolores odio? Magnam, quia
33
+ deleniti?
34
+ </TabPanel>
35
+ </TabsBody>
36
+ </Tabs>
37
+ );
38
+
39
+ const meta = {
40
+ title: "Design System/Tabs",
41
+ component: TabsComponent,
42
+ parameters: {
43
+ layout: "centered",
44
+ },
45
+ tags: ["autodocs"],
46
+ } satisfies Meta<typeof TabsComponent>;
47
+
48
+ export default meta;
49
+ type Story = StoryObj<typeof meta>;
50
+
51
+ export const Default: Story = {};
@@ -0,0 +1,55 @@
1
+ .tabs-container {
2
+ width: 100%;
3
+ min-width: 400px;
4
+ }
5
+
6
+ .tabs-header {
7
+ display: flex;
8
+ border-bottom: 2px solid #e5e7eb;
9
+ margin-bottom: 16px;
10
+ }
11
+
12
+ .tab-button {
13
+ padding: 12px 24px;
14
+ background: none;
15
+ border: none;
16
+ cursor: pointer;
17
+ font-size: 14px;
18
+ font-weight: 500;
19
+ color: #6b7280;
20
+ position: relative;
21
+ transition: color 0.2s;
22
+ }
23
+
24
+ .tab-button:hover {
25
+ color: #374151;
26
+ }
27
+
28
+ .tab-button.active {
29
+ color: #3b82f6;
30
+ }
31
+
32
+ .tab-button.active::after {
33
+ content: "";
34
+ position: absolute;
35
+ bottom: -2px;
36
+ left: 0;
37
+ right: 0;
38
+ height: 2px;
39
+ background-color: #3b82f6;
40
+ }
41
+
42
+ .tab-content {
43
+ animation: fadeIn 0.3s ease-in-out;
44
+ }
45
+
46
+ @keyframes fadeIn {
47
+ from {
48
+ opacity: 0;
49
+ transform: translateY(4px);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateY(0);
54
+ }
55
+ }
@@ -93,6 +93,18 @@ export const theme = {
93
93
  "accordion-up": "accordion-up 0.2s ease-out",
94
94
  },
95
95
  colors: {
96
+ brand: {
97
+ 50: "#e0fff2",
98
+ 100: "#adf0d3",
99
+ 200: "#8aeac1",
100
+ 300: "#67e4ae",
101
+ 400: "#45de9c",
102
+ 500: "#26d489",
103
+ 600: "#1da56a",
104
+ 700: "#15754c",
105
+ 800: "#0c452d",
106
+ 900: "#04160e",
107
+ },
96
108
  gray: {
97
109
  50: "#fafafa",
98
110
  100: "#f0f0f0",