diff --git a/package-lock.json b/package-lock.json index 1599b14b..686431a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "react": "^18.2.0", "react-devtools-core": "^5.0.0", "react-dom": "^18.2.0", + "react-icons": "^5.0.1", "react-window": "^1.8.10", "sass": "^1.70.0", "sql.js": "1.10.2", @@ -20112,6 +20113,14 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", "dev": true }, + "node_modules/react-icons": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz", + "integrity": "sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index e70a900c..2310bd21 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "react": "^18.2.0", "react-devtools-core": "^5.0.0", "react-dom": "^18.2.0", + "react-icons": "^5.0.1", "react-window": "^1.8.10", "sass": "^1.70.0", "sql.js": "1.10.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd49e39e..097e4d60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,6 +46,9 @@ dependencies: react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + react-icons: + specifier: ^5.0.1 + version: 5.0.1(react@18.2.0) react-window: specifier: ^1.8.10 version: 1.8.10(react-dom@18.2.0)(react@18.2.0) @@ -11200,6 +11203,14 @@ packages: resolution: {integrity: sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==} dev: true + /react-icons@5.0.1(react@18.2.0): + resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==} + peerDependencies: + react: '*' + dependencies: + react: 18.2.0 + dev: false + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 00000000..294a3dc8 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/stories/components/PopupMain.stories.tsx b/src/stories/components/PopupMain.stories.tsx new file mode 100644 index 00000000..dc452909 --- /dev/null +++ b/src/stories/components/PopupMain.stories.tsx @@ -0,0 +1,23 @@ +import { Meta, StoryObj } from '@storybook/react'; +import PopupMain from 'src/views/components/PopupMain'; + +const meta = { + title: 'Components/Common/PopupMain', + component: PopupMain, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + argTypes: { + + }, +} satisfies Meta; +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + + }, +}; \ No newline at end of file diff --git a/src/views/components/PopupMain.tsx b/src/views/components/PopupMain.tsx index fa97323d..bc437c96 100644 --- a/src/views/components/PopupMain.tsx +++ b/src/views/components/PopupMain.tsx @@ -1,24 +1,136 @@ -import { background } from '@shared/messages'; import React from 'react'; -import useSchedules from '../hooks/useSchedules'; -import { Button } from './common/Button/Button'; +import { FaCalendarAlt, FaCog, FaRedo } from 'react-icons/fa'; // Added FaRedo for the refresh icon +import { StatusIcon } from '@shared/util/icons'; import ExtensionRoot from './common/ExtensionRoot/ExtensionRoot'; +import PopupCourseBlock from './common/PopupCourseBlock/PopupCourseBlock'; +import Text from './common/Text/Text'; +import Divider from './common/Divider/Divider'; +import logoImage from '../../assets/logo.png'; // Adjust the path as necessary +import List from './common/List/List'; // Ensure this path is correctly pointing to your List component + + export default function PopupMain() { - const [activeSchedule, schedules] = useSchedules(); + const courses = [ + { + uniqueId: '47280', + department: 'BIO', + number: '311C', + instructors: [{ lastName: 'Fritz' }], + status: 'OPEN', + }, + { + uniqueId: '51180', + department: 'C S', + number: '374L', + instructors: [{ lastName: 'Baer' }], + status: 'CLOSED', + }, + { + uniqueId: '60020', + department: 'S W', + number: '310', + instructors: [{ lastName: 'Whalley' }], + status: 'WAITLISTED', + }, + { + uniqueId: '13190', + department: 'PED', + number: '106C', + instructors: [{ lastName: 'Rich' }], + status: 'CANCELLED', + }, + { + uniqueId: '44435', + department: 'WGS', + number: '301', + instructors: [{ lastName: 'RODRIGUEZ' }], + status: 'TEMP', + }, + ]; - // TODO: Add a button to to switch the active schedule - return ( - - - - ); + // Manually applying colors for the demonstration + const colors = { + OPEN: { primaryColor: '#34D399', secondaryColor: '#059669' }, + CLOSED: { primaryColor: '#818cf8', secondaryColor: '#4f46e5' }, + WAITLISTED: { primaryColor: '#F59E00', secondaryColor: '#B45309' }, + CANCELLED: { primaryColor: '#EF4444', secondaryColor: '#b91c1c' }, + TEMP: { primaryColor: '#fde047', secondaryColor: '#eab308' }, + }; + + const draggableElements = courses.map((course) => ( + +)); + + +return ( + +
+
+
+ Logo +
+ UT Registration + Plus +
+
+
+ + +
+
+ +
+ MAIN SCHEDULE: +
+ 22 HOURS + 8 Courses +
+
+ {/* Integrate the List component here */} + +
+
+
+ +
+ WAITLISTED +
+
+
+ +
+ CLOSED +
+
+
+ +
+ CANCELLED +
+
+
+
+ DATA UPDATED ON: 12:00 AM 02/01/2024 + +
+
+
+
+); }