forge
Explore
Log in

Don't you dare go Hollow

🔧 add Tabler sidebar icons

Browse files at this commit

84247fb31f2c2f0b1ce56dc4338d386312b5d039Burak BoduroğluParent: 0e0b22d
  • chore
    • 🔧 add Tabler sidebar icons
Show full message
chore: 🔧 add Tabler sidebar icons
- add @tabler/icons-solidjs for Solid sidebar icons
- switch sidebar groups and items to more distinct Tabler icons
- exclude Tabler Solid icons from Vite dependency prebundling to avoid React JSX output
bun.lockmodified+5 -4
@@ -6,6 +6,7 @@
6 "name": "hezarfen-frontend",6 "name": "hezarfen-frontend",
7 "dependencies": {7 "dependencies": {
8 "@kobalte/core": "^0.13.11",8 "@kobalte/core": "^0.13.11",
9+ "@tabler/icons-solidjs": "^3.44.0",
9 "@tanstack/solid-router": "^1.131.0",10 "@tanstack/solid-router": "^1.131.0",
10 "class-variance-authority": "^0.7.1",11 "class-variance-authority": "^0.7.1",
11 "clsx": "^2.1.1",12 "clsx": "^2.1.1",
@@ -222,6 +223,10 @@
222 223
223 "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="],224 "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="],
224 225
226+ "@tabler/icons": ["@tabler/icons@3.44.0", "", {}, "sha512-Wn0AOZG9sg0L+bjfMqq4eNhC6pQjIrk94LvvWYNYkY8KH8wC3YILRzQlrnVJc4FUeMxH/AK97QsYCX35H3LndA=="],
227+
228+ "@tabler/icons-solidjs": ["@tabler/icons-solidjs@3.44.0", "", { "dependencies": { "@tabler/icons": "3.44.0" }, "peerDependencies": { "solid-js": "^1.4.7" } }, "sha512-oYYTCDebkAZ3c1Q+yqXNfbI/86d05JcVX1ektnCcpGBZpz0+qC2Ktggidqi9Su3H2aTFlGc2EXDewmjU5TCFUA=="],
229+
225 "@tanstack/history": ["@tanstack/history@1.162.0", "", {}, "sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA=="],230 "@tanstack/history": ["@tanstack/history@1.162.0", "", {}, "sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA=="],
226 231
227 "@tanstack/router-core": ["@tanstack/router-core@1.171.14", "", { "dependencies": { "@tanstack/history": "1.162.0", "cookie-es": "^3.0.0", "seroval": "^1.5.4", "seroval-plugins": "^1.5.4" } }, "sha512-Mo3hwx0qB0cJsVYGDjG0+Ouf7VV74h/vsoDMGztdlyzDanp4gBA2s7IVvm6hFrmQM6GpD9F0Z7SqD7OldfLE7g=="],232 "@tanstack/router-core": ["@tanstack/router-core@1.171.14", "", { "dependencies": { "@tanstack/history": "1.162.0", "cookie-es": "^3.0.0", "seroval": "^1.5.4", "seroval-plugins": "^1.5.4" } }, "sha512-Mo3hwx0qB0cJsVYGDjG0+Ouf7VV74h/vsoDMGztdlyzDanp4gBA2s7IVvm6hFrmQM6GpD9F0Z7SqD7OldfLE7g=="],
@@ -517,9 +522,5 @@
517 "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],522 "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],
518 523
519 "readdirp/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],524 "readdirp/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],
520-
521- "tinyglobby/fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" } }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
522-
523- "tinyglobby/picomatch": ["picomatch@4.0.5", "", {}, "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A=="],
524 }525 }
525 }526 }
package.jsonmodified+1 -0
@@ -11,6 +11,7 @@
11 },11 },
12 "dependencies": {12 "dependencies": {
13 "@kobalte/core": "^0.13.11",13 "@kobalte/core": "^0.13.11",
14+ "@tabler/icons-solidjs": "^3.44.0",
14 "@tanstack/solid-router": "^1.131.0",15 "@tanstack/solid-router": "^1.131.0",
15 "class-variance-authority": "^0.7.1",16 "class-variance-authority": "^0.7.1",
16 "clsx": "^2.1.1",17 "clsx": "^2.1.1",
src/components/layout/side-nav.tsxmodified+34 -28
@@ -13,16 +13,22 @@ import { cn } from "@/lib/cn";
13 import type { MessageKey } from "@/i18n/messages";13 import type { MessageKey } from "@/i18n/messages";
14 import type { Role } from "@/api/types";14 import type { Role } from "@/api/types";
15 import {15 import {
16- IconBook,
17- IconCalendar,
18- IconChart,
19 IconChevronRight,16 IconChevronRight,
20- IconEdit,17+ IconCalendarCheck,
21- IconExam,18+ IconCalendarCog,
22- IconHome,19+ IconCalendarEvent,
23- IconNote,20+ IconChartBar,
24- IconUsers,21+ IconChecklist,
25-} from "@/components/ui/icons";22+ IconClipboardCheck,
23+ IconHome2,
24+ IconNotebook,
25+ IconPencilQuestion,
26+ IconReportAnalytics,
27+ IconSchool,
28+ IconSettings,
29+ IconUserCog,
30+ IconUsersGroup,
31+} from "@tabler/icons-solidjs";
26 32
27 type NavItem = {33 type NavItem = {
28 to: string;34 to: string;
@@ -44,58 +50,58 @@ const NAV_GROUPS: NavGroup[] = [
44 {50 {
45 id: "students",51 id: "students",
46 labelKey: "nav.group.students",52 labelKey: "nav.group.students",
47- Icon: IconUsers,53+ Icon: IconUsersGroup,
48 items: [54 items: [
49- { to: "/attendance", labelKey: "nav.attendance", Icon: IconCalendar },55+ { to: "/attendance", labelKey: "nav.attendance", Icon: IconClipboardCheck },
50 ],56 ],
51 },57 },
52 {58 {
53 id: "classes",59 id: "classes",
54 labelKey: "nav.group.classes",60 labelKey: "nav.group.classes",
55- Icon: IconBook,61+ Icon: IconSchool,
56 items: [62 items: [
57- { to: "/courses", labelKey: "nav.courses", Icon: IconBook },63+ { to: "/courses", labelKey: "nav.courses", Icon: IconNotebook },
58- { to: "/exams", labelKey: "nav.exams", Icon: IconExam },64+ { to: "/exams", labelKey: "nav.exams", Icon: IconPencilQuestion },
59- { to: "/events", labelKey: "nav.events", Icon: IconCalendar },65+ { to: "/events", labelKey: "nav.events", Icon: IconCalendarEvent },
60 ],66 ],
61 },67 },
62 {68 {
63 id: "grades",69 id: "grades",
64 labelKey: "nav.group.grades",70 labelKey: "nav.group.grades",
65- Icon: IconNote,71+ Icon: IconChecklist,
66 items: [72 items: [
67- { to: "/marks", labelKey: "nav.marks", Icon: IconChart },73+ { to: "/marks", labelKey: "nav.marks", Icon: IconChartBar },
68- { to: "/notes", labelKey: "nav.notes", Icon: IconNote },74+ { to: "/notes", labelKey: "nav.notes", Icon: IconNotebook },
69 ],75 ],
70 },76 },
71 {77 {
72 id: "reports",78 id: "reports",
73 labelKey: "nav.group.reports",79 labelKey: "nav.group.reports",
74- Icon: IconNote,80+ Icon: IconReportAnalytics,
75 minRole: "teacher",81 minRole: "teacher",
76 items: [82 items: [
77- { to: "/management/student-marks", labelKey: "nav.studentMarks", Icon: IconChart, minRole: "teacher" },83+ { to: "/management/student-marks", labelKey: "nav.studentMarks", Icon: IconChartBar, minRole: "teacher" },
78- { to: "/management/student-attendance", labelKey: "nav.studentAttendance", Icon: IconCalendar, minRole: "teacher" },84+ { to: "/management/student-attendance", labelKey: "nav.studentAttendance", Icon: IconCalendarCheck, minRole: "teacher" },
79- { to: "/work", labelKey: "nav.work", Icon: IconChart, minRole: "teacher" },85+ { to: "/work", labelKey: "nav.work", Icon: IconChecklist, minRole: "teacher" },
80 ],86 ],
81 },87 },
82 {88 {
83 id: "settings",89 id: "settings",
84 labelKey: "nav.group.settings",90 labelKey: "nav.group.settings",
85- Icon: IconEdit,91+ Icon: IconSettings,
86 minRole: "manager",92 minRole: "manager",
87 items: [93 items: [
88- { to: "/management/settings", labelKey: "nav.settings", Icon: IconEdit, minRole: "manager" },94+ { to: "/management/settings", labelKey: "nav.settings", Icon: IconSettings, minRole: "manager" },
89- { to: "/management/terms", labelKey: "nav.terms", Icon: IconCalendar, minRole: "manager" },95+ { to: "/management/terms", labelKey: "nav.terms", Icon: IconCalendarCog, minRole: "manager" },
90 ],96 ],
91 },97 },
92 {98 {
93 id: "admin",99 id: "admin",
94 labelKey: "nav.admin",100 labelKey: "nav.admin",
95- Icon: IconUsers,101+ Icon: IconUserCog,
96 minRole: "admin",102 minRole: "admin",
97 items: [103 items: [
98- { to: "/admin/users", labelKey: "nav.users", Icon: IconUsers, minRole: "admin" },104+ { to: "/admin/users", labelKey: "nav.users", Icon: IconUsersGroup, minRole: "admin" },
99 ],105 ],
100 },106 },
101 ];107 ];
@@ -103,7 +109,7 @@ const NAV_GROUPS: NavGroup[] = [
103 const HOME_ITEM: NavItem = {109 const HOME_ITEM: NavItem = {
104 to: "/",110 to: "/",
105 labelKey: "nav.home",111 labelKey: "nav.home",
106- Icon: IconHome,112+ Icon: IconHome2,
107 exact: true,113 exact: true,
108 };114 };
109 115
vite.config.tsmodified+3 -0
@@ -11,6 +11,9 @@ export default defineConfig({
11 "@": path.resolve(__dirname, "./src"),11 "@": path.resolve(__dirname, "./src"),
12 },12 },
13 },13 },
14+ optimizeDeps: {
15+ exclude: ["@tabler/icons-solidjs"],
16+ },
14 server: {17 server: {
15 proxy: {18 proxy: {
16 "/api": {19 "/api": {