ikoncomponents 1.2.8 → 1.3.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.
- package/dist/ikoncomponents/activity-sheet/index.js +2 -2
- package/dist/ikoncomponents/big-calendar/index.js +2 -1
- package/dist/ikoncomponents/fileUpload/index.d.ts +15 -0
- package/dist/ikoncomponents/fileUpload/index.js +69 -0
- package/dist/ikoncomponents/form-fields/date-input/index.js +2 -2
- package/dist/ikoncomponents/main-layout/header.js +2 -2
- package/dist/ikoncomponents/main-layout/main-sidebar.js +2 -2
- package/dist/ikoncomponents/tabs/index.d.ts +1 -1
- package/dist/ikoncomponents/tabs/index.js +1 -1
- package/dist/ikoncomponents/work-in-progress/index.d.ts +1 -0
- package/dist/ikoncomponents/work-in-progress/index.js +4 -0
- package/dist/index.d.ts +24 -20
- package/dist/index.js +11 -8
- package/dist/shadcn/dropdown-menu.js +1 -1
- package/dist/shadcn/tabs.js +1 -1
- package/dist/shadcn/workflow.js +1 -1
- package/dist/styles.css +61 -54
- package/dist/utils/token-management/index.js +9 -5
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlignJustify } from "lucide-react";
|
|
4
|
-
import {
|
|
4
|
+
import { Tabs } from "../tabs";
|
|
5
5
|
import { NoDataComponent } from "../no-data";
|
|
6
6
|
import { UploadTab } from "../upload-tab";
|
|
7
7
|
import { SheetComponent } from "../sheet";
|
|
@@ -19,5 +19,5 @@ export function ActivitySheet({ activityLogs = [] }) {
|
|
|
19
19
|
tabContent: _jsx(UploadTab, {})
|
|
20
20
|
}
|
|
21
21
|
];
|
|
22
|
-
return (_jsx(SheetComponent, { buttonText: "", buttonIcon: _jsx(AlignJustify, {}), sheetTitle: "", sheetContent: _jsx(
|
|
22
|
+
return (_jsx(SheetComponent, { buttonText: "", buttonIcon: _jsx(AlignJustify, {}), sheetTitle: "", sheetContent: _jsx(Tabs, { tabArray: tabArray, tabListClass: '' }), closeButton: true }));
|
|
23
23
|
}
|
|
@@ -6,9 +6,10 @@ import "react-big-calendar/lib/css/react-big-calendar.css";
|
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import BigCalenderToolbar from "./big-calender-toolbar";
|
|
8
8
|
import BigCalenderEvent from "./big-calender-event";
|
|
9
|
+
import { enUS } from 'date-fns/locale';
|
|
9
10
|
// Localization settings
|
|
10
11
|
const locales = {
|
|
11
|
-
"en-US":
|
|
12
|
+
"en-US": enUS,
|
|
12
13
|
};
|
|
13
14
|
const localizer = dateFnsLocalizer({
|
|
14
15
|
format,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface FileUploaderProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
isDrag?: boolean;
|
|
4
|
+
onFileSelect: (fileObj: any) => Promise<any> | void;
|
|
5
|
+
}
|
|
6
|
+
export declare const convertFileToObject: (file: File) => Promise<{
|
|
7
|
+
message: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
size: number;
|
|
10
|
+
type: string;
|
|
11
|
+
lastModified: number;
|
|
12
|
+
base64: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function FileUploader({ label, isDrag, onFileSelect, }: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function getImageFromObject(obj: any): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { UploadCloud, FileUp } from "lucide-react";
|
|
5
|
+
// --- Helper: Convert File to Object with Base64 ---
|
|
6
|
+
export const convertFileToObject = async (file) => {
|
|
7
|
+
const arrayBuffer = await file.arrayBuffer();
|
|
8
|
+
const base64 = btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
|
|
9
|
+
return {
|
|
10
|
+
message: "File processed successfully",
|
|
11
|
+
fileName: file.name,
|
|
12
|
+
size: file.size,
|
|
13
|
+
type: file.type,
|
|
14
|
+
lastModified: file.lastModified,
|
|
15
|
+
base64: base64,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export function FileUploader({ label = "Upload File", isDrag = false, onFileSelect, }) {
|
|
19
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
20
|
+
const handleFile = async (file) => {
|
|
21
|
+
if (!file)
|
|
22
|
+
return;
|
|
23
|
+
const fileObj = await convertFileToObject(file); // convert to object
|
|
24
|
+
await onFileSelect(fileObj); // pass object to parent
|
|
25
|
+
};
|
|
26
|
+
// ---- DRAG HANDLERS ----
|
|
27
|
+
const handleDrop = (e) => {
|
|
28
|
+
var _a;
|
|
29
|
+
if (!isDrag)
|
|
30
|
+
return;
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
setIsDragging(false);
|
|
33
|
+
const file = (_a = e.dataTransfer.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
34
|
+
if (file)
|
|
35
|
+
handleFile(file);
|
|
36
|
+
};
|
|
37
|
+
const handleDragOver = (e) => {
|
|
38
|
+
if (!isDrag)
|
|
39
|
+
return;
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
setIsDragging(true);
|
|
42
|
+
};
|
|
43
|
+
const handleDragLeave = () => {
|
|
44
|
+
if (!isDrag)
|
|
45
|
+
return;
|
|
46
|
+
setIsDragging(false);
|
|
47
|
+
};
|
|
48
|
+
const handleInputChange = (e) => {
|
|
49
|
+
var _a;
|
|
50
|
+
const file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
51
|
+
if (file)
|
|
52
|
+
handleFile(file);
|
|
53
|
+
};
|
|
54
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [_jsx("label", { className: "text-sm font-medium", children: label }), _jsx("input", { type: "file", id: "fileInput", className: "hidden", onChange: handleInputChange }), isDrag ? (_jsx("div", { className: `border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition
|
|
55
|
+
${isDragging ? "border-blue-600 bg-blue-50" : "border-gray-300"}
|
|
56
|
+
`, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: () => { var _a; return (_a = document.getElementById("fileInput")) === null || _a === void 0 ? void 0 : _a.click(); }, children: _jsxs("div", { className: "flex flex-col items-center gap-3", children: [_jsx(UploadCloud, { className: "w-10 h-10 text-blue-600" }), _jsxs("p", { className: "text-gray-600", children: ["Drag & drop your file here or", " ", _jsx("span", { className: "text-blue-600 underline", children: "browse" })] })] }) })) : (
|
|
57
|
+
// ----- SIMPLE UPLOAD BOX -----
|
|
58
|
+
_jsxs("div", { className: "border rounded-lg p-4 flex flex-col items-center gap-2 cursor-pointer text-center", onClick: () => { var _a; return (_a = document.getElementById("fileInput")) === null || _a === void 0 ? void 0 : _a.click(); }, children: [_jsx(FileUp, { className: "w-8 h-8 text-blue-600" }), _jsx("span", { className: "text-blue-600 underline", children: "Browse File" })] }))] }));
|
|
59
|
+
}
|
|
60
|
+
// --- Helper Function: Recreate Image from File Object ---
|
|
61
|
+
export function getImageFromObject(obj) {
|
|
62
|
+
const byteCharacters = atob(obj.base64);
|
|
63
|
+
const byteNumbers = new Array(byteCharacters.length)
|
|
64
|
+
.fill(0)
|
|
65
|
+
.map((_, i) => byteCharacters.charCodeAt(i));
|
|
66
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
67
|
+
const blob = new Blob([byteArray], { type: obj.type });
|
|
68
|
+
return URL.createObjectURL(blob); // usable in <img src="..." />
|
|
69
|
+
}
|
|
@@ -7,9 +7,9 @@ import { format } from "date-fns";
|
|
|
7
7
|
import { CalendarIcon } from "lucide-react";
|
|
8
8
|
import { Calendar } from "../../../shadcn/calendar";
|
|
9
9
|
export function FormDateInput({ formControl, name, label, placeholder, dateFormat, calendarDateDisabled, formDescription, disabled, }) {
|
|
10
|
-
return (_jsx(_Fragment, { children: _jsx(FormField, { control: formControl, name: name, render: ({ field }) => (_jsxs(FormItem, { children: [label && (
|
|
10
|
+
return (_jsx(_Fragment, { children: _jsx(FormField, { control: formControl, name: name, render: ({ field }) => (_jsxs(FormItem, { children: [label && (_jsx(_Fragment, { children: _jsx(FormLabel, { children: label }) })), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, className: "w-full", children: _jsx(FormControl, { children: _jsxs(Button, { variant: "outline", className: cn(!field.value && "text-foreground/50"), disabled: disabled, children: [field.value ? (format(field.value, dateFormat || "PPP")) : (_jsx("span", { children: placeholder || "Pick a date" })), _jsx(CalendarIcon, { className: "ml-auto h-4 w-4 opacity-50" })] }) }) }), _jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: _jsx(Calendar, { mode: "single", selected: field.value, onSelect: field.onChange, disabled: calendarDateDisabled,
|
|
11
11
|
// disabled={(date) =>
|
|
12
12
|
// date > new Date() || date < new Date("1900-01-01")
|
|
13
13
|
// }
|
|
14
|
-
|
|
14
|
+
autoFocus: true }) })] }), formDescription && (_jsx(FormDescription, { children: formDescription })), _jsx(FormMessage, {})] })) }) }));
|
|
15
15
|
}
|
|
@@ -3,12 +3,12 @@ import { AppBreadcrumb } from "../app-breadcrumb";
|
|
|
3
3
|
import { ThemeToggleBtn } from "../theme-toggle-btn";
|
|
4
4
|
import { Separator } from "../../shadcn/separator";
|
|
5
5
|
import { SidebarTrigger } from "../../shadcn/sidebar";
|
|
6
|
-
import { LayoutGrid, Play } from "lucide-react";
|
|
6
|
+
import { Bell, LayoutGrid, Play } from "lucide-react";
|
|
7
7
|
import { IconButton, IconTextButton } from "../buttons";
|
|
8
8
|
import { useSidebarNav } from "./SidebarNavContext";
|
|
9
9
|
export function Header() {
|
|
10
10
|
const { navItems } = useSidebarNav();
|
|
11
11
|
return (_jsx("header", { className: "ml-12 flex h-12 border-b shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: _jsxs("div", { className: "flex items-center justify-between gap-2 px-4 w-full", children: [_jsxs("div", { className: "flex items-center gap-2", children: [(!navItems || navItems.length === 0) ? _jsx("div", {}) : _jsx(SidebarTrigger, { className: "-ml-1" }), (!navItems || navItems.length === 0) ?
|
|
12
12
|
_jsx("div", {}) :
|
|
13
|
-
_jsx(Separator, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }), _jsx(AppBreadcrumb, {})] }), _jsxs("div", { className: "ml-auto flex gap-4", children: [_jsx(ThemeToggleBtn, {}), _jsxs(IconTextButton, { variant: "default", children: [_jsx(Play, {}), "App Store"] }), _jsx(IconButton, { children: _jsx(LayoutGrid, {}) })] })] }) }));
|
|
13
|
+
_jsx(Separator, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }), _jsx(AppBreadcrumb, {})] }), _jsxs("div", { className: "ml-auto flex gap-4", children: [_jsx(IconButton, { children: _jsx(Bell, {}) }), _jsx(ThemeToggleBtn, {}), _jsxs(IconTextButton, { variant: "default", children: [_jsx(Play, {}), "App Store"] }), _jsx(IconButton, { children: _jsx(LayoutGrid, {}) })] })] }) }));
|
|
14
14
|
}
|
|
@@ -75,10 +75,10 @@ export const MainSidebar = ({ baseUrl }) => {
|
|
|
75
75
|
}, []);
|
|
76
76
|
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs("aside", { className: "fixed left-0 top-0 z-20 h-screen w-12 border-r border-border bg-sidebar text-sidebar-foreground flex flex-col items-center py-4 ", children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "default", className: "mb-4 h-8 w-8 rounded-lg p-0", disabled: !selectedAccount, children: _jsx("span", { className: "text-base font-medium text-accent-foreground", children: selectedAccount ? getInitials(selectedAccount.accountName) : '...' }) }) }), _jsxs(DropdownMenuContent, { className: "w-55", side: "right", sideOffset: 8, align: "start", children: [_jsx("div", { className: "px-2 py-1.5 text-xs font-semibold text-foreground", children: "Accounts" }), accounts.map((account) => (_jsxs(DropdownMenuItem, { className: "flex items-center justify-between cursor-pointer", onClick: () => {
|
|
77
77
|
setSelectedAccount(account);
|
|
78
|
-
}, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-6 w-6 rounded bg-primary/10 flex items-center justify-center", children: _jsx("span", { className: "text-xs font-medium text-primary", children: getInitials(account.accountName) }) }), _jsx("span", { className: "text-sm", children: account.accountName })] }), (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountId) === account.accountId && (_jsx(Check, { className: "h-4 w-4 text-primary" }))] }, account.accountId)))] })] }), _jsx("nav", { className: "flex flex-col gap-2", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: "/", children: [_jsx(Home, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Home" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Home" })] }, "home") }), _jsx("nav", { className: "flex flex-col gap-2 flex-1", children: softwares.map((software) => {
|
|
78
|
+
}, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-6 w-6 rounded bg-primary/10 flex items-center justify-center", children: _jsx("span", { className: "text-xs font-medium text-primary", children: getInitials(account.accountName) }) }), _jsx("span", { className: "text-sm", children: account.accountName })] }), (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountId) === account.accountId && (_jsx(Check, { className: "h-4 w-4 text-primary" }))] }, account.accountId)))] })] }), _jsx("nav", { className: "flex flex-col gap-2", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: "/home", children: [_jsx(Home, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Home" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Home" })] }, "home") }), _jsx("nav", { className: "flex flex-col gap-2 flex-1", children: softwares.map((software) => {
|
|
79
79
|
const Icon = FolderCode;
|
|
80
80
|
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: software.url, children: [_jsx(Icon, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: software.softwareName })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: software.softwareName })] }, software.softwareName));
|
|
81
|
-
}) }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: "/last-visited", children: [_jsx(Clock, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Last Visited" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Last Visited" })] }, "last-visited"), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: "/favourites", children: [_jsx(Heart, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Favourites" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Favourites" })] }, "favourites"), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: "/settings", children: [_jsx(Settings, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Settings" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Settings" })] }, "settings"), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10 rounded-full", children: _jsx(CircleUserRound, { className: "h-8 w-8" }) }) }), _jsxs(DropdownMenuContent, { className: "w-55 p-0", side: 'right', sideOffset: 8, children: [_jsxs("div", { className: "flex items-start gap-3 p-4 bg-card", children: [_jsx(CircleUserRound, { className: "h-8 w-8" }), _jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-bold text-foreground blue-dark:text-muted-foreground truncate", children: user === null || user === void 0 ? void 0 : user.userName }), _jsx("p", { className: "text-xs text-muted-foreground truncate", children: user === null || user === void 0 ? void 0 : user.userEmail }), _jsx("p", { className: "text-sm text-muted-foreground font-semibold", children: selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountName })] })] }), _jsx(DropdownMenuSeparator, { className: "my-0" }), _jsxs(DropdownMenuItem, { onClick: async () => {
|
|
81
|
+
}) }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: "/ikon-portal/last-visited", children: [_jsx(Clock, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Last Visited" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Last Visited" })] }, "last-visited"), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: "/ikon-portal/favourites", children: [_jsx(Heart, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Favourites" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Favourites" })] }, "favourites"), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-5 w-5', children: _jsx(Button, { variant: "ghost", className: "h-10 w-10", asChild: true, children: _jsxs("a", { href: "/ikon-portal/settings", children: [_jsx(Settings, { className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: "Settings" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Settings" })] }, "settings"), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10 rounded-full", children: _jsx(CircleUserRound, { className: "h-8 w-8" }) }) }), _jsxs(DropdownMenuContent, { className: "w-55 p-0", side: 'right', sideOffset: 8, children: [_jsxs("div", { className: "flex items-start gap-3 p-4 bg-card", children: [_jsx(CircleUserRound, { className: "h-8 w-8" }), _jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-bold text-foreground blue-dark:text-muted-foreground truncate", children: user === null || user === void 0 ? void 0 : user.userName }), _jsx("p", { className: "text-xs text-muted-foreground truncate", children: user === null || user === void 0 ? void 0 : user.userEmail }), _jsx("p", { className: "text-sm text-muted-foreground font-semibold", children: selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountName })] })] }), _jsx(DropdownMenuSeparator, { className: "my-0" }), _jsxs(DropdownMenuItem, { onClick: async () => {
|
|
82
82
|
await clearAllCookieSession();
|
|
83
83
|
redirect("/login.html");
|
|
84
84
|
}, className: "flex items-center gap-2 px-4 py-3 cursor-pointer focus:bg-destructive dark:focus:bg-destructive blue-dark:focus:bg-destructive", children: [_jsx(LogOut, { className: "h-4 w-4 text-foreground" }), _jsx("span", { children: "Log out" })] })] })] })] }) }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TabProps } from "./type";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function Tabs({ children, tabArray, pathName, tabListClass, tabListInnerClass, tabListButtonClass, tabContentClass, headerEndComponent, onTabChange, isSeperatePage, }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { TextButton } from "../buttons";
|
|
|
7
7
|
import { Card } from "../../shadcn/card";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
9
|
import { useIsMobile } from "../../hooks/use-mobile";
|
|
10
|
-
export function
|
|
10
|
+
export function Tabs({ children, tabArray, pathName, tabListClass = "", tabListInnerClass = "", tabListButtonClass = "", tabContentClass = "", headerEndComponent, onTabChange, isSeperatePage = false, }) {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
// const pathName = usePathname();
|
|
13
13
|
const [itemToDisplay, setItemToDisplay] = useState(5);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WorkInProgress(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function WorkInProgress() {
|
|
3
|
+
return (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsxs("div", { className: "bg-background text-forefround rounded-xl p-6 text-center max-w-md", children: [_jsx("div", { className: "text-3xl font-bold mb-2 animate-pulse", children: "\uD83D\uDEA7 Work in Progress" }), _jsx("p", { className: "text-muted-foreground", children: "We\u2019re currently working on this section. Check back soon!" })] }) }));
|
|
4
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,26 +43,29 @@ export * from "./shadcn/input-otp";
|
|
|
43
43
|
export * from "./shadcn/toggle-group";
|
|
44
44
|
export * from "./shadcn/toggle";
|
|
45
45
|
export { ActionMenu } from "./ikoncomponents/action-menu";
|
|
46
|
-
export type { ActionMenuProps, ExtraActionParams } from "./ikoncomponents/action-menu/type";
|
|
46
|
+
export type { ActionMenuProps, ExtraActionParams, } from "./ikoncomponents/action-menu/type";
|
|
47
47
|
export { CustomAlertDialog } from "./ikoncomponents/alert-dialog";
|
|
48
|
-
export {
|
|
49
|
-
export
|
|
48
|
+
export { useDialog, DialogProvider, } from "./ikoncomponents/alert-dialog/dialog-context";
|
|
49
|
+
export { TextButton, TextButtonWithTooltip, IconTextButton, IconTextButtonWithTooltip, IconButton, IconButtonWithTooltip, } from "./ikoncomponents/buttons";
|
|
50
|
+
export type { ButtonProps, ButtonWithTooltipProps, } from "./ikoncomponents/buttons";
|
|
50
51
|
export { ComboboxInput } from "./ikoncomponents/combobox-input";
|
|
51
|
-
export type { ComboBoxInputProps, ComboboxItemProps } from "./ikoncomponents/combobox-input/type";
|
|
52
|
+
export type { ComboBoxInputProps, ComboboxItemProps, } from "./ikoncomponents/combobox-input/type";
|
|
52
53
|
export { DataTableColumnFilter } from "./ikoncomponents/data-table/datatable-column-filter";
|
|
53
54
|
export { DataTableFacetedFilter } from "./ikoncomponents/data-table/datatable-faceted-filter";
|
|
54
55
|
export { DataTableFilterMenu } from "./ikoncomponents/data-table/datatable-filter-menu";
|
|
56
|
+
export { convertFileToObject, FileUploader, getImageFromObject, } from "./ikoncomponents/fileUpload";
|
|
57
|
+
export type { FileUploaderProps } from "./ikoncomponents/fileUpload";
|
|
55
58
|
export { DataTablePagination } from "./ikoncomponents/data-table/datatable-pagination";
|
|
56
59
|
export { DataTableToolbar } from "./ikoncomponents/data-table/datatable-toolbar";
|
|
57
60
|
export { getDataTableColumnTitle } from "./ikoncomponents/data-table/function";
|
|
58
61
|
export { DataTable } from "./ikoncomponents/data-table";
|
|
59
|
-
export type { DataTableProps, DTColumnsProps, DTExtraParamsProps, DTActionMenuProps, DataTableViewOptionsProps, DTToolBarProps, DataTableFilterProps, DataTableFacetedFilterProps, DataTablePaginationProps, DragDropHeaderProp } from "./ikoncomponents/data-table/type";
|
|
62
|
+
export type { DataTableProps, DTColumnsProps, DTExtraParamsProps, DTActionMenuProps, DataTableViewOptionsProps, DTToolBarProps, DataTableFilterProps, DataTableFacetedFilterProps, DataTablePaginationProps, DragDropHeaderProp, } from "./ikoncomponents/data-table/type";
|
|
60
63
|
export { EChart } from "./ikoncomponents/e-chart";
|
|
61
64
|
export { FileInput } from "./ikoncomponents/file-input";
|
|
62
65
|
export { GlowingEffect } from "./ikoncomponents/glowing-effect";
|
|
63
66
|
export { Icon } from "./ikoncomponents/icon";
|
|
64
67
|
export { LoadingSpinner } from "./ikoncomponents/loading-spinner";
|
|
65
|
-
export type { ISVGProps, LoadingSpinnerProps } from "./ikoncomponents/loading-spinner";
|
|
68
|
+
export type { ISVGProps, LoadingSpinnerProps, } from "./ikoncomponents/loading-spinner";
|
|
66
69
|
export { MultiCombobox } from "./ikoncomponents/multi-combobox";
|
|
67
70
|
export { NoDataComponent } from "./ikoncomponents/no-data";
|
|
68
71
|
export { PageWrapper } from "./ikoncomponents/page-wrapper";
|
|
@@ -71,20 +74,20 @@ export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
|
71
74
|
export { SearchInput } from "./ikoncomponents/search-input";
|
|
72
75
|
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
73
76
|
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
74
|
-
export {
|
|
77
|
+
export { Tabs } from "./ikoncomponents/tabs";
|
|
75
78
|
export type { TabArray, TabProps } from "./ikoncomponents/tabs/type";
|
|
76
79
|
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
77
80
|
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
78
81
|
export { TooltipComponent } from "./ikoncomponents/tooltip";
|
|
79
82
|
export { FrameworkItemDropdown } from "./ikoncomponents/twolevel-dropdown";
|
|
80
|
-
export type { FrameworkEntry, TreeNode, ParentEntry, ProcessedFrameworkData } from "./ikoncomponents/twolevel-dropdown";
|
|
83
|
+
export type { FrameworkEntry, TreeNode, ParentEntry, ProcessedFrameworkData, } from "./ikoncomponents/twolevel-dropdown";
|
|
81
84
|
export { Widgets } from "./ikoncomponents/widgets";
|
|
82
|
-
export type { WidgetProps, WidgetsFunctionProps } from "./ikoncomponents/widgets/type";
|
|
85
|
+
export type { WidgetProps, WidgetsFunctionProps, } from "./ikoncomponents/widgets/type";
|
|
83
86
|
export { BigCalendar } from "./ikoncomponents/big-calendar";
|
|
84
|
-
export type { BigCalendarProps, ExtraParamsEvent, BigCalendarEventProps, BigCalenderToolbarProps } from "./ikoncomponents/big-calendar/type";
|
|
85
|
-
export { BreadcrumbProvider, useBreadcrumb } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
87
|
+
export type { BigCalendarProps, ExtraParamsEvent, BigCalendarEventProps, BigCalenderToolbarProps, } from "./ikoncomponents/big-calendar/type";
|
|
88
|
+
export { BreadcrumbProvider, useBreadcrumb, } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
86
89
|
export type { BreadcrumbItemProps } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
87
|
-
export { AppBreadcrumb, RenderAppBreadcrumb } from "./ikoncomponents/app-breadcrumb";
|
|
90
|
+
export { AppBreadcrumb, RenderAppBreadcrumb, } from "./ikoncomponents/app-breadcrumb";
|
|
88
91
|
export { FormComboboxInput } from "./ikoncomponents/form-fields/combobox-input";
|
|
89
92
|
export { FormComboboxInputWithValue } from "./ikoncomponents/form-fields/combobox-input-value";
|
|
90
93
|
export { FormDateInput } from "./ikoncomponents/form-fields/date-input";
|
|
@@ -94,7 +97,7 @@ export { FormMultiComboboxInput } from "./ikoncomponents/form-fields/multi-combo
|
|
|
94
97
|
export { FormOtpInput } from "./ikoncomponents/form-fields/otp-input";
|
|
95
98
|
export { FormPhoneInput } from "./ikoncomponents/form-fields/phone-input";
|
|
96
99
|
export { FormTextarea } from "./ikoncomponents/form-fields/textarea";
|
|
97
|
-
export type { FormFieldProps, FormInputProps, FormTextareaProps, FormDateInputProps, FormComboboxInputProps, FormComboboxItemProps } from "./ikoncomponents/form-fields/types";
|
|
100
|
+
export type { FormFieldProps, FormInputProps, FormTextareaProps, FormDateInputProps, FormComboboxInputProps, FormComboboxItemProps, } from "./ikoncomponents/form-fields/types";
|
|
98
101
|
export { GradeTableLoader } from "./ikoncomponents/skeleton-loader/skeleton-table";
|
|
99
102
|
export type { GradeTableLoaderProps } from "./ikoncomponents/skeleton-loader/skeleton-table";
|
|
100
103
|
export { SkeletonWidget } from "./ikoncomponents/skeleton-loader/skeleton-widget";
|
|
@@ -102,17 +105,17 @@ export { UploadTab } from "./ikoncomponents/upload-tab";
|
|
|
102
105
|
export { AppSidebar } from "./ikoncomponents/main-layout/app-sidebar";
|
|
103
106
|
export { Footer } from "./ikoncomponents/main-layout/footer";
|
|
104
107
|
export { Header } from "./ikoncomponents/main-layout/header";
|
|
105
|
-
export type { Account, Software } from "./ikoncomponents/main-layout/main-sidebar";
|
|
108
|
+
export type { Account, Software, } from "./ikoncomponents/main-layout/main-sidebar";
|
|
106
109
|
export { MainSidebar } from "./ikoncomponents/main-layout/main-sidebar";
|
|
107
110
|
export { NavMain } from "./ikoncomponents/main-layout/nav-main";
|
|
108
|
-
export type { SidebarNavSubItem, SidebarNavItem, SidebarNavContextType } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
109
|
-
export { SidebarNavProvider, useSidebarNav } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
111
|
+
export type { SidebarNavSubItem, SidebarNavItem, SidebarNavContextType, } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
112
|
+
export { SidebarNavProvider, useSidebarNav, } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
110
113
|
export { MainLayout } from "./ikoncomponents/main-layout";
|
|
111
114
|
export { ProviderWrapper } from "./ikoncomponents/provider-wrapper";
|
|
112
115
|
export { ActivitySheet } from "./ikoncomponents/activity-sheet";
|
|
113
116
|
export type { ActivityLogProps } from "./ikoncomponents/activity-sheet";
|
|
114
|
-
export { ImageCropperProvider, useImageCropper } from "./ikoncomponents/image-cropper-upload";
|
|
115
|
-
export type { ImageCropperProps, OriginalImageProps, AspectRatioWiseImagesProps, ImageCropperContextProps } from "./ikoncomponents/image-cropper-upload";
|
|
117
|
+
export { ImageCropperProvider, useImageCropper, } from "./ikoncomponents/image-cropper-upload";
|
|
118
|
+
export type { ImageCropperProps, OriginalImageProps, AspectRatioWiseImagesProps, ImageCropperContextProps, } from "./ikoncomponents/image-cropper-upload";
|
|
116
119
|
export { ImageCropper } from "./ikoncomponents/image-cropper-upload/image-cropper";
|
|
117
120
|
export type { CropperImgProps } from "./ikoncomponents/image-cropper-upload/image-cropper";
|
|
118
121
|
export { CropperFormWithModal } from "./ikoncomponents/image-cropper-upload/cropper-form-with-modal";
|
|
@@ -121,13 +124,14 @@ export { NewCropperImg } from "./ikoncomponents/image-cropper-upload/components/
|
|
|
121
124
|
export type { CropperImgProps as NewCropperImgProps } from "./ikoncomponents/image-cropper-upload/components/newCropper";
|
|
122
125
|
export { NewImageForm } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
123
126
|
export type { ImageFormProps } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
127
|
+
export { WorkInProgress } from "./ikoncomponents/work-in-progress";
|
|
124
128
|
export { ThemeProvider } from "./utils/theme-provider";
|
|
125
129
|
export { RadiusProvider, useRadius } from "./utils/border-radius-provider";
|
|
126
130
|
export { FontProvider, useFont } from "./utils/font-provider";
|
|
127
131
|
export { cn } from "./utils/cn";
|
|
128
132
|
export type { CookieSessionOptionsProps } from "./utils/session/cookieSession";
|
|
129
|
-
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession } from "./utils/session/cookieSession";
|
|
130
|
-
export { getValidAccessToken, refreshAccessToken, logOut } from "./utils/token-management";
|
|
133
|
+
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession, } from "./utils/session/cookieSession";
|
|
134
|
+
export { getValidAccessToken, refreshAccessToken, logOut, } from "./utils/token-management";
|
|
131
135
|
export type { AccessTokenOptionsProps } from "./utils/token-management";
|
|
132
136
|
export type { TokenResponse } from "./utils/token-management/types";
|
|
133
137
|
export { useIsMobile } from "./hooks/use-mobile";
|
package/dist/index.js
CHANGED
|
@@ -44,11 +44,13 @@ export * from "./shadcn/toggle-group";
|
|
|
44
44
|
export * from "./shadcn/toggle";
|
|
45
45
|
export { ActionMenu } from "./ikoncomponents/action-menu";
|
|
46
46
|
export { CustomAlertDialog } from "./ikoncomponents/alert-dialog";
|
|
47
|
-
export {
|
|
47
|
+
export { useDialog, DialogProvider, } from "./ikoncomponents/alert-dialog/dialog-context";
|
|
48
|
+
export { TextButton, TextButtonWithTooltip, IconTextButton, IconTextButtonWithTooltip, IconButton, IconButtonWithTooltip, } from "./ikoncomponents/buttons";
|
|
48
49
|
export { ComboboxInput } from "./ikoncomponents/combobox-input";
|
|
49
50
|
export { DataTableColumnFilter } from "./ikoncomponents/data-table/datatable-column-filter";
|
|
50
51
|
export { DataTableFacetedFilter } from "./ikoncomponents/data-table/datatable-faceted-filter";
|
|
51
52
|
export { DataTableFilterMenu } from "./ikoncomponents/data-table/datatable-filter-menu";
|
|
53
|
+
export { convertFileToObject, FileUploader, getImageFromObject, } from "./ikoncomponents/fileUpload";
|
|
52
54
|
export { DataTablePagination } from "./ikoncomponents/data-table/datatable-pagination";
|
|
53
55
|
export { DataTableToolbar } from "./ikoncomponents/data-table/datatable-toolbar";
|
|
54
56
|
export { getDataTableColumnTitle } from "./ikoncomponents/data-table/function";
|
|
@@ -66,15 +68,15 @@ export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
|
66
68
|
export { SearchInput } from "./ikoncomponents/search-input";
|
|
67
69
|
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
68
70
|
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
69
|
-
export {
|
|
71
|
+
export { Tabs } from "./ikoncomponents/tabs";
|
|
70
72
|
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
71
73
|
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
72
74
|
export { TooltipComponent } from "./ikoncomponents/tooltip";
|
|
73
75
|
export { FrameworkItemDropdown } from "./ikoncomponents/twolevel-dropdown";
|
|
74
76
|
export { Widgets } from "./ikoncomponents/widgets";
|
|
75
77
|
export { BigCalendar } from "./ikoncomponents/big-calendar";
|
|
76
|
-
export { BreadcrumbProvider, useBreadcrumb } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
77
|
-
export { AppBreadcrumb, RenderAppBreadcrumb } from "./ikoncomponents/app-breadcrumb";
|
|
78
|
+
export { BreadcrumbProvider, useBreadcrumb, } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
79
|
+
export { AppBreadcrumb, RenderAppBreadcrumb, } from "./ikoncomponents/app-breadcrumb";
|
|
78
80
|
export { FormComboboxInput } from "./ikoncomponents/form-fields/combobox-input";
|
|
79
81
|
export { FormComboboxInputWithValue } from "./ikoncomponents/form-fields/combobox-input-value";
|
|
80
82
|
export { FormDateInput } from "./ikoncomponents/form-fields/date-input";
|
|
@@ -92,20 +94,21 @@ export { Footer } from "./ikoncomponents/main-layout/footer";
|
|
|
92
94
|
export { Header } from "./ikoncomponents/main-layout/header";
|
|
93
95
|
export { MainSidebar } from "./ikoncomponents/main-layout/main-sidebar";
|
|
94
96
|
export { NavMain } from "./ikoncomponents/main-layout/nav-main";
|
|
95
|
-
export { SidebarNavProvider, useSidebarNav } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
97
|
+
export { SidebarNavProvider, useSidebarNav, } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
96
98
|
export { MainLayout } from "./ikoncomponents/main-layout";
|
|
97
99
|
export { ProviderWrapper } from "./ikoncomponents/provider-wrapper";
|
|
98
100
|
export { ActivitySheet } from "./ikoncomponents/activity-sheet";
|
|
99
|
-
export { ImageCropperProvider, useImageCropper } from "./ikoncomponents/image-cropper-upload";
|
|
101
|
+
export { ImageCropperProvider, useImageCropper, } from "./ikoncomponents/image-cropper-upload";
|
|
100
102
|
export { ImageCropper } from "./ikoncomponents/image-cropper-upload/image-cropper";
|
|
101
103
|
export { CropperFormWithModal } from "./ikoncomponents/image-cropper-upload/cropper-form-with-modal";
|
|
102
104
|
export { CropperForm } from "./ikoncomponents/image-cropper-upload/cropper-form";
|
|
103
105
|
export { NewCropperImg } from "./ikoncomponents/image-cropper-upload/components/newCropper";
|
|
104
106
|
export { NewImageForm } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
107
|
+
export { WorkInProgress } from "./ikoncomponents/work-in-progress";
|
|
105
108
|
export { ThemeProvider } from "./utils/theme-provider";
|
|
106
109
|
export { RadiusProvider, useRadius } from "./utils/border-radius-provider";
|
|
107
110
|
export { FontProvider, useFont } from "./utils/font-provider";
|
|
108
111
|
export { cn } from "./utils/cn";
|
|
109
|
-
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession } from "./utils/session/cookieSession";
|
|
110
|
-
export { getValidAccessToken, refreshAccessToken, logOut } from "./utils/token-management";
|
|
112
|
+
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession, } from "./utils/session/cookieSession";
|
|
113
|
+
export { getValidAccessToken, refreshAccessToken, logOut, } from "./utils/token-management";
|
|
111
114
|
export { useIsMobile } from "./hooks/use-mobile";
|
|
@@ -36,7 +36,7 @@ function DropdownMenuGroup(_a) {
|
|
|
36
36
|
}
|
|
37
37
|
function DropdownMenuItem(_a) {
|
|
38
38
|
var { className, inset, variant = "default" } = _a, props = __rest(_a, ["className", "inset", "variant"]);
|
|
39
|
-
return (_jsx(DropdownMenuPrimitive.Item, Object.assign({ "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-[var(--input)] dark:focus:bg-[var(--card)]
|
|
39
|
+
return (_jsx(DropdownMenuPrimitive.Item, Object.assign({ "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-[var(--input)] dark:focus:bg-[var(--card)] blue-dark:focus:bg-[var(--secondary)] focus:text-accent-foreground dark:text-foreground focus:dark:text-foreground blue-dark:text-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
40
40
|
}
|
|
41
41
|
function DropdownMenuCheckboxItem(_a) {
|
|
42
42
|
var { className, children, checked } = _a, props = __rest(_a, ["className", "children", "checked"]);
|
package/dist/shadcn/tabs.js
CHANGED
|
@@ -23,7 +23,7 @@ function TabsList(_a) {
|
|
|
23
23
|
}
|
|
24
24
|
function TabsTrigger(_a) {
|
|
25
25
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
26
|
-
return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn("
|
|
26
|
+
return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
27
27
|
}
|
|
28
28
|
function TabsContent(_a) {
|
|
29
29
|
var { className } = _a, props = __rest(_a, ["className"]);
|
package/dist/shadcn/workflow.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ChevronDown } from "lucide-react";
|
|
5
|
-
import { DropdownMenu,
|
|
5
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent } from "./dropdown-menu";
|
|
6
6
|
import { Badge } from "./badge";
|
|
7
7
|
const statusColors = {
|
|
8
8
|
OUTSTANDING: "bg-[#FFDE721A] text-[#FBB125] border border-[#FBB12533]",
|
package/dist/styles.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
:root, :host {
|
|
6
6
|
--color-red-500: oklch(63.7% 0.237 25.331);
|
|
7
7
|
--color-red-800: oklch(44.4% 0.177 26.899);
|
|
8
|
+
--color-blue-50: oklch(97% 0.014 254.604);
|
|
8
9
|
--color-blue-400: oklch(70.7% 0.165 254.624);
|
|
9
10
|
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
10
11
|
--color-blue-600: oklch(54.6% 0.245 262.881);
|
|
@@ -1243,9 +1244,15 @@
|
|
|
1243
1244
|
border-color: color-mix(in oklab, var(--color-black) 8%, transparent);
|
|
1244
1245
|
}
|
|
1245
1246
|
}
|
|
1247
|
+
.border-blue-600 {
|
|
1248
|
+
border-color: var(--color-blue-600);
|
|
1249
|
+
}
|
|
1246
1250
|
.border-border {
|
|
1247
1251
|
border-color: var(--border);
|
|
1248
1252
|
}
|
|
1253
|
+
.border-gray-300 {
|
|
1254
|
+
border-color: var(--color-gray-300);
|
|
1255
|
+
}
|
|
1249
1256
|
.border-gray-400 {
|
|
1250
1257
|
border-color: var(--color-gray-400);
|
|
1251
1258
|
}
|
|
@@ -1339,6 +1346,9 @@
|
|
|
1339
1346
|
background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
|
|
1340
1347
|
}
|
|
1341
1348
|
}
|
|
1349
|
+
.bg-blue-50 {
|
|
1350
|
+
background-color: var(--color-blue-50);
|
|
1351
|
+
}
|
|
1342
1352
|
.bg-blue-500 {
|
|
1343
1353
|
background-color: var(--color-blue-500);
|
|
1344
1354
|
}
|
|
@@ -3355,11 +3365,6 @@
|
|
|
3355
3365
|
background-color: var(--background);
|
|
3356
3366
|
}
|
|
3357
3367
|
}
|
|
3358
|
-
.data-\[state\=active\]\:text-foreground {
|
|
3359
|
-
&[data-state="active"] {
|
|
3360
|
-
color: var(--foreground);
|
|
3361
|
-
}
|
|
3362
|
-
}
|
|
3363
3368
|
.data-\[state\=active\]\:shadow-sm {
|
|
3364
3369
|
&[data-state="active"] {
|
|
3365
3370
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
@@ -4123,6 +4128,11 @@
|
|
|
4123
4128
|
color: var(--color-black);
|
|
4124
4129
|
}
|
|
4125
4130
|
}
|
|
4131
|
+
.dark\:text-foreground {
|
|
4132
|
+
&:is(.dark *) {
|
|
4133
|
+
color: var(--foreground);
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4126
4136
|
.dark\:text-gray-400 {
|
|
4127
4137
|
&:is(.dark *) {
|
|
4128
4138
|
color: var(--color-gray-400);
|
|
@@ -4210,6 +4220,13 @@
|
|
|
4210
4220
|
}
|
|
4211
4221
|
}
|
|
4212
4222
|
}
|
|
4223
|
+
.focus\:dark\:text-foreground {
|
|
4224
|
+
&:focus {
|
|
4225
|
+
&:is(.dark *) {
|
|
4226
|
+
color: var(--foreground);
|
|
4227
|
+
}
|
|
4228
|
+
}
|
|
4229
|
+
}
|
|
4213
4230
|
.dark\:focus-visible\:ring-\[\#15803D\]\/40 {
|
|
4214
4231
|
&:is(.dark *) {
|
|
4215
4232
|
&:focus-visible {
|
|
@@ -4333,27 +4350,17 @@
|
|
|
4333
4350
|
color: var(--muted-foreground);
|
|
4334
4351
|
}
|
|
4335
4352
|
}
|
|
4336
|
-
.blue-dark\:focus\:bg
|
|
4353
|
+
.blue-dark\:focus\:bg-\[var\(--secondary\)\] {
|
|
4337
4354
|
&:is(.blue-dark *) {
|
|
4338
4355
|
&:focus {
|
|
4339
|
-
background-color: var(--
|
|
4356
|
+
background-color: var(--secondary);
|
|
4340
4357
|
}
|
|
4341
4358
|
}
|
|
4342
4359
|
}
|
|
4343
|
-
.blue-dark\:
|
|
4344
|
-
&:is(.blue-dark *) {
|
|
4345
|
-
&[data-state="active"] {
|
|
4346
|
-
border-color: var(--input);
|
|
4347
|
-
}
|
|
4348
|
-
}
|
|
4349
|
-
}
|
|
4350
|
-
.blue-dark\:data-\[state\=active\]\:bg-input\/30 {
|
|
4360
|
+
.blue-dark\:focus\:bg-destructive {
|
|
4351
4361
|
&:is(.blue-dark *) {
|
|
4352
|
-
|
|
4353
|
-
background-color: var(--
|
|
4354
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
4355
|
-
background-color: color-mix(in oklab, var(--input) 30%, transparent);
|
|
4356
|
-
}
|
|
4362
|
+
&:focus {
|
|
4363
|
+
background-color: var(--destructive);
|
|
4357
4364
|
}
|
|
4358
4365
|
}
|
|
4359
4366
|
}
|
|
@@ -4880,8 +4887,8 @@
|
|
|
4880
4887
|
--secondary-foreground: oklch(0.985 0 0);
|
|
4881
4888
|
--muted: oklch(0.269 0 0);
|
|
4882
4889
|
--muted-foreground: oklch(0.708 0 0);
|
|
4883
|
-
--accent: oklch(
|
|
4884
|
-
--accent-foreground:
|
|
4890
|
+
--accent: oklch(98.511% 0.00011 271.152);
|
|
4891
|
+
--accent-foreground: #050505;
|
|
4885
4892
|
--calender-foreground: oklch(98.511% 0.00011 271.152);
|
|
4886
4893
|
--destructive: #f43f5e;
|
|
4887
4894
|
--border: #454545;
|
|
@@ -4970,9 +4977,9 @@
|
|
|
4970
4977
|
font-size: 14px;
|
|
4971
4978
|
}
|
|
4972
4979
|
.rbc-date-cell.rbc-now,
|
|
4973
|
-
.rbc-time-slot.rbc-now,
|
|
4974
|
-
.rbc-show-more,
|
|
4975
|
-
.rbc-header {
|
|
4980
|
+
.rbc-time-slot.rbc-now,
|
|
4981
|
+
.rbc-show-more,
|
|
4982
|
+
.rbc-header {
|
|
4976
4983
|
font-weight: normal !important;
|
|
4977
4984
|
}
|
|
4978
4985
|
.rbc-btn {
|
|
@@ -5018,13 +5025,13 @@
|
|
|
5018
5025
|
height: 100%;
|
|
5019
5026
|
}
|
|
5020
5027
|
.rbc-calendar *,
|
|
5021
|
-
.rbc-calendar *:before,
|
|
5022
|
-
.rbc-calendar *:after {
|
|
5028
|
+
.rbc-calendar *:before,
|
|
5029
|
+
.rbc-calendar *:after {
|
|
5023
5030
|
-webkit-box-sizing: inherit;
|
|
5024
5031
|
box-sizing: inherit;
|
|
5025
5032
|
}
|
|
5026
5033
|
.rbc-abs-full,
|
|
5027
|
-
.rbc-row-bg {
|
|
5034
|
+
.rbc-row-bg {
|
|
5028
5035
|
overflow: hidden;
|
|
5029
5036
|
position: absolute;
|
|
5030
5037
|
top: 0;
|
|
@@ -5033,9 +5040,9 @@
|
|
|
5033
5040
|
bottom: 0;
|
|
5034
5041
|
}
|
|
5035
5042
|
.rbc-ellipsis,
|
|
5036
|
-
.rbc-show-more,
|
|
5037
|
-
.rbc-row-segment .rbc-event-content,
|
|
5038
|
-
.rbc-event-label {
|
|
5043
|
+
.rbc-show-more,
|
|
5044
|
+
.rbc-row-segment .rbc-event-content,
|
|
5045
|
+
.rbc-event-label {
|
|
5039
5046
|
display: block;
|
|
5040
5047
|
overflow: hidden;
|
|
5041
5048
|
text-overflow: ellipsis;
|
|
@@ -5073,8 +5080,8 @@
|
|
|
5073
5080
|
border-right: 1px solid hsl(var(--border));
|
|
5074
5081
|
}
|
|
5075
5082
|
.rbc-header > a,
|
|
5076
|
-
.rbc-header > a:active,
|
|
5077
|
-
.rbc-header > a:visited {
|
|
5083
|
+
.rbc-header > a:active,
|
|
5084
|
+
.rbc-header > a:visited {
|
|
5078
5085
|
color: inherit;
|
|
5079
5086
|
text-decoration: none;
|
|
5080
5087
|
}
|
|
@@ -5115,7 +5122,7 @@
|
|
|
5115
5122
|
scrollbar-width: none;
|
|
5116
5123
|
}
|
|
5117
5124
|
.rbc-row-content-scrollable
|
|
5118
|
-
|
|
5125
|
+
.rbc-row-content-scroll-container::-webkit-scrollbar {
|
|
5119
5126
|
display: none;
|
|
5120
5127
|
}
|
|
5121
5128
|
.rbc-today {
|
|
@@ -5159,7 +5166,7 @@
|
|
|
5159
5166
|
white-space: nowrap;
|
|
5160
5167
|
}
|
|
5161
5168
|
.rbc-toolbar button:active,
|
|
5162
|
-
.rbc-toolbar button.rbc-active {
|
|
5169
|
+
.rbc-toolbar button.rbc-active {
|
|
5163
5170
|
background-image: none;
|
|
5164
5171
|
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
5165
5172
|
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
@@ -5167,9 +5174,9 @@
|
|
|
5167
5174
|
border-color: #adadad;
|
|
5168
5175
|
}
|
|
5169
5176
|
.rbc-toolbar button:active:hover,
|
|
5170
|
-
.rbc-toolbar button:active:focus,
|
|
5171
|
-
.rbc-toolbar button.rbc-active:hover,
|
|
5172
|
-
.rbc-toolbar button.rbc-active:focus {
|
|
5177
|
+
.rbc-toolbar button:active:focus,
|
|
5178
|
+
.rbc-toolbar button.rbc-active:hover,
|
|
5179
|
+
.rbc-toolbar button.rbc-active:focus {
|
|
5173
5180
|
color: #373a3c;
|
|
5174
5181
|
background-color: #d4d4d4;
|
|
5175
5182
|
border-color: #8c8c8c;
|
|
@@ -5217,7 +5224,7 @@
|
|
|
5217
5224
|
margin-right: -1px;
|
|
5218
5225
|
}
|
|
5219
5226
|
.rbc-btn-group + .rbc-btn-group,
|
|
5220
|
-
.rbc-btn-group + button {
|
|
5227
|
+
.rbc-btn-group + button {
|
|
5221
5228
|
margin-left: 10px;
|
|
5222
5229
|
}
|
|
5223
5230
|
@media (max-width: 767px) {
|
|
@@ -5229,7 +5236,7 @@
|
|
|
5229
5236
|
}
|
|
5230
5237
|
}
|
|
5231
5238
|
.rbc-event,
|
|
5232
|
-
.rbc-day-slot .rbc-background-event {
|
|
5239
|
+
.rbc-day-slot .rbc-background-event {
|
|
5233
5240
|
border: none;
|
|
5234
5241
|
-webkit-box-sizing: border-box;
|
|
5235
5242
|
box-sizing: border-box;
|
|
@@ -5245,17 +5252,17 @@
|
|
|
5245
5252
|
text-align: left;
|
|
5246
5253
|
}
|
|
5247
5254
|
.rbc-slot-selecting .rbc-event,
|
|
5248
|
-
.rbc-slot-selecting .rbc-day-slot .rbc-background-event,
|
|
5249
|
-
.rbc-day-slot .rbc-slot-selecting .rbc-background-event {
|
|
5255
|
+
.rbc-slot-selecting .rbc-day-slot .rbc-background-event,
|
|
5256
|
+
.rbc-day-slot .rbc-slot-selecting .rbc-background-event {
|
|
5250
5257
|
cursor: inherit;
|
|
5251
5258
|
pointer-events: none;
|
|
5252
5259
|
}
|
|
5253
5260
|
.rbc-event.rbc-selected,
|
|
5254
|
-
.rbc-day-slot .rbc-selected.rbc-background-event {
|
|
5261
|
+
.rbc-day-slot .rbc-selected.rbc-background-event {
|
|
5255
5262
|
background-color: #265985;
|
|
5256
5263
|
}
|
|
5257
5264
|
.rbc-event:focus,
|
|
5258
|
-
.rbc-day-slot .rbc-background-event:focus {
|
|
5265
|
+
.rbc-day-slot .rbc-background-event:focus {
|
|
5259
5266
|
outline: 5px auto #3b99fc;
|
|
5260
5267
|
}
|
|
5261
5268
|
.rbc-event-label {
|
|
@@ -5306,7 +5313,7 @@
|
|
|
5306
5313
|
color: hsl(var(--input));
|
|
5307
5314
|
}
|
|
5308
5315
|
.rbc-show-more:hover,
|
|
5309
|
-
.rbc-show-more:focus {
|
|
5316
|
+
.rbc-show-more:focus {
|
|
5310
5317
|
color: #265985;
|
|
5311
5318
|
}
|
|
5312
5319
|
.rbc-month-view {
|
|
@@ -5370,8 +5377,8 @@
|
|
|
5370
5377
|
font-weight: bold;
|
|
5371
5378
|
}
|
|
5372
5379
|
.rbc-date-cell > a,
|
|
5373
|
-
.rbc-date-cell > a:active,
|
|
5374
|
-
.rbc-date-cell > a:visited {
|
|
5380
|
+
.rbc-date-cell > a:active,
|
|
5381
|
+
.rbc-date-cell > a:visited {
|
|
5375
5382
|
color: inherit;
|
|
5376
5383
|
text-decoration: none;
|
|
5377
5384
|
}
|
|
@@ -5468,13 +5475,13 @@
|
|
|
5468
5475
|
text-transform: lowercase;
|
|
5469
5476
|
}
|
|
5470
5477
|
.rbc-agenda-time-cell .rbc-continues-after:after {
|
|
5471
|
-
content:
|
|
5478
|
+
content: " »";
|
|
5472
5479
|
}
|
|
5473
5480
|
.rbc-agenda-time-cell .rbc-continues-prior:before {
|
|
5474
|
-
content:
|
|
5481
|
+
content: "« ";
|
|
5475
5482
|
}
|
|
5476
5483
|
.rbc-agenda-date-cell,
|
|
5477
|
-
.rbc-agenda-time-cell {
|
|
5484
|
+
.rbc-agenda-time-cell {
|
|
5478
5485
|
white-space: nowrap;
|
|
5479
5486
|
}
|
|
5480
5487
|
.rbc-agenda-event-cell {
|
|
@@ -5507,7 +5514,7 @@
|
|
|
5507
5514
|
flex-flow: column nowrap;
|
|
5508
5515
|
}
|
|
5509
5516
|
.rbc-time-gutter,
|
|
5510
|
-
.rbc-header-gutter {
|
|
5517
|
+
.rbc-header-gutter {
|
|
5511
5518
|
-webkit-box-flex: 0;
|
|
5512
5519
|
-ms-flex: none;
|
|
5513
5520
|
flex: none;
|
|
@@ -5531,7 +5538,7 @@
|
|
|
5531
5538
|
right: 0;
|
|
5532
5539
|
}
|
|
5533
5540
|
.rbc-day-slot .rbc-event,
|
|
5534
|
-
.rbc-day-slot .rbc-background-event {
|
|
5541
|
+
.rbc-day-slot .rbc-background-event {
|
|
5535
5542
|
border: 1px solid #265985;
|
|
5536
5543
|
display: -webkit-box;
|
|
5537
5544
|
display: -ms-flexbox;
|
|
@@ -5572,7 +5579,7 @@
|
|
|
5572
5579
|
border-top: 1px solid hsl(var(--border));
|
|
5573
5580
|
}
|
|
5574
5581
|
.rbc-time-view-resources .rbc-time-gutter,
|
|
5575
|
-
.rbc-time-view-resources .rbc-time-header-gutter {
|
|
5582
|
+
.rbc-time-view-resources .rbc-time-header-gutter {
|
|
5576
5583
|
position: sticky;
|
|
5577
5584
|
left: 0;
|
|
5578
5585
|
background-color: white;
|
|
@@ -5598,7 +5605,7 @@
|
|
|
5598
5605
|
min-width: 140px;
|
|
5599
5606
|
}
|
|
5600
5607
|
.rbc-time-view-resources .rbc-header,
|
|
5601
|
-
.rbc-time-view-resources .rbc-day-bg {
|
|
5608
|
+
.rbc-time-view-resources .rbc-day-bg {
|
|
5602
5609
|
width: 140px;
|
|
5603
5610
|
-webkit-box-flex: 1;
|
|
5604
5611
|
-ms-flex: 1 1 0px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use server";
|
|
2
2
|
import { redirect } from "next/navigation";
|
|
3
|
-
import { clearAllCookieSession, getCookieSession, setCookieSession } from "../session/cookieSession";
|
|
3
|
+
import { clearAllCookieSession, getCookieSession, setCookieSession, } from "../session/cookieSession";
|
|
4
4
|
export async function getValidAccessToken(options) {
|
|
5
5
|
const accessToken = await getCookieSession("accessToken");
|
|
6
6
|
const refreshToken = await getCookieSession("refreshToken");
|
|
@@ -32,11 +32,15 @@ export async function refreshAccessToken(refreshToken, isSetToken) {
|
|
|
32
32
|
});
|
|
33
33
|
if (response.ok) {
|
|
34
34
|
const data = await response.json();
|
|
35
|
-
const { accessToken, refreshToken, expiresIn, refreshExpiresIn } = data;
|
|
35
|
+
const { accessToken, refreshToken, expiresIn, refreshExpiresIn, } = data;
|
|
36
36
|
if (isSetToken) {
|
|
37
37
|
try {
|
|
38
|
-
await setCookieSession("accessToken", accessToken, {
|
|
39
|
-
|
|
38
|
+
await setCookieSession("accessToken", accessToken, {
|
|
39
|
+
maxAge: expiresIn,
|
|
40
|
+
});
|
|
41
|
+
await setCookieSession("refreshToken", refreshToken, {
|
|
42
|
+
maxAge: refreshExpiresIn,
|
|
43
|
+
});
|
|
40
44
|
}
|
|
41
45
|
catch (error) {
|
|
42
46
|
console.error(error);
|
|
@@ -74,5 +78,5 @@ export async function refreshAccessToken(refreshToken, isSetToken) {
|
|
|
74
78
|
}
|
|
75
79
|
export async function logOut() {
|
|
76
80
|
await clearAllCookieSession();
|
|
77
|
-
redirect(
|
|
81
|
+
redirect("/login.html");
|
|
78
82
|
}
|