From 9d6c2850f0615f529306fda89c0f748959fd09e1 Mon Sep 17 00:00:00 2001 From: elnatansamuel25 Date: Fri, 10 Jul 2026 12:10:45 +0300 Subject: [PATCH] ui --- .gitignore | 2 + package-lock.json | 29 +- src/assets/logo-icon.svg | 6 + src/components/dashboard/StatCard.tsx | 11 +- src/components/sidebar/Sidebar.tsx | 102 ++-- src/components/sidebar/SidebarLogo.tsx | 25 + src/components/sidebar/SidebarNavGroup.tsx | 33 +- src/components/ui/stepper.tsx | 6 +- src/index.css | 8 + .../CreateQuestionTypeFlow.tsx | 10 +- .../content-management/LearnEnglishPage.tsx | 423 ++++++++-------- .../content-management/ProgramCoursesPage.tsx | 478 +++++++++--------- .../components/ContentHierarchyList.tsx | 6 +- .../question-type-steps/ComponentKindCard.tsx | 10 +- .../QuestionTypeBasicInfoStep.tsx | 24 +- .../QuestionTypeConfigStep.tsx | 124 +++-- .../QuestionTypeReviewPublishStep.tsx | 28 +- .../QuestionTypeStepFooter.tsx | 2 +- .../QuestionTypeValidatePreviewStep.tsx | 6 +- .../SchemaBuilderSection.tsx | 16 +- .../SchemaSlotLabelsPanel.tsx | 14 +- 21 files changed, 722 insertions(+), 641 deletions(-) create mode 100644 src/assets/logo-icon.svg create mode 100644 src/components/sidebar/SidebarLogo.tsx diff --git a/.gitignore b/.gitignore index a739264..9ba32b0 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ dist-ssr *.njsproj *.sln *.sw? +AGENTS.md +design-system.md diff --git a/package-lock.json b/package-lock.json index 69fe4a9..8bab665 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,7 +94,6 @@ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -363,7 +362,6 @@ "resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-6.3.1.tgz", "integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==", "license": "MIT", - "peer": true, "dependencies": { "@dnd-kit/accessibility": "^3.1.1", "@dnd-kit/utilities": "^3.2.2", @@ -2820,7 +2818,6 @@ "integrity": "sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -2829,9 +2826,8 @@ "version": "19.2.7", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", - "devOptional": true, + "dev": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -2840,9 +2836,8 @@ "version": "19.2.3", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "devOptional": true, + "dev": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -2898,7 +2893,6 @@ "integrity": "sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.50.0", "@typescript-eslint/types": "8.50.0", @@ -3150,7 +3144,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3389,7 +3382,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -3650,7 +3642,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/custom-error-instance": { @@ -3987,7 +3979,6 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -5194,7 +5185,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -5248,7 +5238,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -5454,7 +5443,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -5464,7 +5452,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -5476,15 +5463,13 @@ "version": "19.2.5", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.5.tgz", "integrity": "sha512-Dn0t8IQhCmeIT3wu+Apm1/YVsJXsGWi6k4sPdnBIdqMVtHtv0IGi6dcpNpNkNac0zB2uUAqNX3MHzN8c+z2rwQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/react-redux": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz", "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==", "license": "MIT", - "peer": true, "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" @@ -5690,8 +5675,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/redux-thunk": { "version": "3.1.0", @@ -6174,7 +6158,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6352,7 +6335,6 @@ "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -6490,7 +6472,6 @@ "integrity": "sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==", "dev": true, "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/src/assets/logo-icon.svg b/src/assets/logo-icon.svg new file mode 100644 index 0000000..afb1823 --- /dev/null +++ b/src/assets/logo-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/dashboard/StatCard.tsx b/src/components/dashboard/StatCard.tsx index 298d214..62a6cbc 100644 --- a/src/components/dashboard/StatCard.tsx +++ b/src/components/dashboard/StatCard.tsx @@ -17,19 +17,22 @@ export function StatCard({ }) { return ( - +
{value}
{label}
-
+
-
- {deltaLabel} vs Last Month +
+
+ {deltaLabel} + vs Last Month +
diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx index 9f5b6a2..ee17ec3 100644 --- a/src/components/sidebar/Sidebar.tsx +++ b/src/components/sidebar/Sidebar.tsx @@ -20,7 +20,7 @@ import { import { type ComponentType, useEffect, useState } from "react"; import { NavLink } from "react-router-dom"; import { cn } from "../../lib/utils"; -import { BrandLogo } from "../brand/BrandLogo"; +import { SidebarLogo } from "./SidebarLogo"; import { getUnreadCount } from "../../api/notifications.api"; import { useTeamPermissions } from "../../hooks/useTeamPermissions"; import { hasFaqPermission } from "../../lib/faqPermissions"; @@ -118,7 +118,13 @@ const navEntries: NavEntry[] = [ icon: CreditCard, permission: "subscriptions.export", }, - { kind: "link", label: "Activity log", to: "/user-log", icon: ClipboardList, permission: "activity_logs.list" }, + { + kind: "link", + label: "Activity log", + to: "/user-log", + icon: ClipboardList, + permission: "activity_logs.list", + }, { kind: "link", label: "Issue reports", to: "/issues", icon: CircleAlert }, { kind: "link", @@ -153,7 +159,11 @@ export function Sidebar({ onToggleCollapse, onClose, }: SidebarProps) { - const { permissions, hasPermission, loading: permissionsLoading } = useTeamPermissions(); + const { + permissions, + hasPermission, + loading: permissionsLoading, + } = useTeamPermissions(); const [unreadCount, setUnreadCount] = useState(0); useEffect(() => { @@ -196,7 +206,8 @@ export function Sidebar({
-