ikoncomponents 1.3.2 → 1.3.4
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/big-calender-event/index.js +3 -3
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +21 -0
- package/dist/ikoncomponents/custom-combo-dropdown/index.js +85 -0
- package/dist/ikoncomponents/fileUpload/index.js +2 -2
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +2 -2
- package/dist/ikoncomponents/main-layout/footer.js +1 -1
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +5 -17
- package/dist/ikoncomponents/main-layout/main-sidebar.js +4 -4
- package/dist/ikoncomponents/tabs/index.d.ts +1 -1
- package/dist/ikoncomponents/tabs/index.js +1 -1
- package/dist/ikoncomponents/theme-toggle-btn/index.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/styles.css +71 -883
- package/dist/utils/session/cookieSession.js +2 -2
- package/dist/utils/token-management/index.d.ts +3 -1
- package/dist/utils/token-management/index.js +39 -52
- package/package.json +103 -103
|
@@ -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
|
}
|
|
@@ -3,12 +3,12 @@ import { Eye, SquarePen } from "lucide-react";
|
|
|
3
3
|
import { TooltipComponent as Tooltip } from "../../tooltip";
|
|
4
4
|
// Custom event component
|
|
5
5
|
export default function BigCalenderEvent({ event, extraParamsEvent }) {
|
|
6
|
-
return (_jsxs("div", { className: "custom-event flex flex-row justify-between", children: [_jsx("span", { className: "truncate", children: event.title }), _jsxs("span", { className: "flex flex-row gap-1", children: [((extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.isEditableAll) || event.isEditable) &&
|
|
7
|
-
_jsx(Tooltip, { tooltipContent: "Edit", children: _jsx("button", { className: "event-edit-button", onClick: (e) => {
|
|
6
|
+
return (_jsxs("div", { className: "custom-event flex flex-row justify-between", children: [_jsx("span", { className: "truncate w-auto", children: event.title }), _jsxs("span", { className: "flex flex-row gap-1", children: [((extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.isEditableAll) || event.isEditable) &&
|
|
7
|
+
_jsx(Tooltip, { tooltipContent: "Edit", children: _jsx("button", { className: "event-edit-button w-fit px-1", onClick: (e) => {
|
|
8
8
|
var _a;
|
|
9
9
|
e.stopPropagation(); // Prevent triggering other event handlers
|
|
10
10
|
(_a = extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.onEditEventClick) === null || _a === void 0 ? void 0 : _a.call(extraParamsEvent, event);
|
|
11
|
-
}, children: _jsx(SquarePen, { size: 16 }) }) }), _jsx(Tooltip, { tooltipContent: "View", children: _jsx("button", { className: "event-view-button", onClick: (e) => {
|
|
11
|
+
}, children: _jsx(SquarePen, { size: 16 }) }) }), _jsx(Tooltip, { tooltipContent: "View", children: _jsx("button", { className: "event-view-button w-fit px-1", onClick: (e) => {
|
|
12
12
|
var _a;
|
|
13
13
|
e.stopPropagation(); // Prevent triggering other event handlers
|
|
14
14
|
(_a = extraParamsEvent === null || extraParamsEvent === void 0 ? void 0 : extraParamsEvent.onViewEventClick) === null || _a === void 0 ? void 0 : _a.call(extraParamsEvent, event);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type Option = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type CustomComboboxInputProps = {
|
|
8
|
+
formControl: any;
|
|
9
|
+
name: string;
|
|
10
|
+
label?: string | React.ReactNode;
|
|
11
|
+
options: Option[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
addNewPlaceholder?: string;
|
|
17
|
+
formDescription?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function CustomComboboxInput({ formControl, name, label, options, placeholder, emptyMessage, onValueChange, className, addNewPlaceholder, formDescription, disabled, }: CustomComboboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Check, ChevronsUpDown, Plus } from "lucide-react";
|
|
5
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "../../shadcn/form";
|
|
6
|
+
import { cn } from "../../utils/cn";
|
|
7
|
+
import { Button } from "../../shadcn/button";
|
|
8
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../../shadcn/command";
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../shadcn/popover";
|
|
10
|
+
import { Input } from "../../shadcn/input";
|
|
11
|
+
export function CustomComboboxInput({ formControl, name, label, options, placeholder = "Select an option", emptyMessage = "No options found.", onValueChange, className, addNewPlaceholder = "Add custom value...", formDescription, disabled, }) {
|
|
12
|
+
const [open, setOpen] = React.useState(false);
|
|
13
|
+
const [searchValue, setSearchValue] = React.useState("");
|
|
14
|
+
const [items, setItems] = React.useState(options);
|
|
15
|
+
const [isAddingNew, setIsAddingNew] = React.useState(false);
|
|
16
|
+
const [newValue, setNewValue] = React.useState("");
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
setItems(options);
|
|
19
|
+
}, [options]);
|
|
20
|
+
return (_jsx(FormField, { control: formControl, name: name, render: ({ field }) => {
|
|
21
|
+
const selectedItem = items.find((item) => item.value === field.value);
|
|
22
|
+
const handleAddNewItem = () => {
|
|
23
|
+
const trimmedValue = newValue.trim();
|
|
24
|
+
if (!trimmedValue)
|
|
25
|
+
return;
|
|
26
|
+
if (items.some((item) => item.value === trimmedValue)) {
|
|
27
|
+
const existingItem = items.find(i => i.value === trimmedValue);
|
|
28
|
+
if (existingItem) {
|
|
29
|
+
field.onChange(existingItem.value);
|
|
30
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(existingItem.value);
|
|
31
|
+
setNewValue("");
|
|
32
|
+
setIsAddingNew(false);
|
|
33
|
+
setOpen(false);
|
|
34
|
+
setSearchValue("");
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const newOption = {
|
|
39
|
+
value: trimmedValue,
|
|
40
|
+
label: trimmedValue,
|
|
41
|
+
disabled: true,
|
|
42
|
+
};
|
|
43
|
+
setItems((prev) => [...prev, newOption]);
|
|
44
|
+
field.onChange(trimmedValue);
|
|
45
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(trimmedValue);
|
|
46
|
+
setNewValue("");
|
|
47
|
+
setIsAddingNew(false);
|
|
48
|
+
setOpen(false);
|
|
49
|
+
setSearchValue("");
|
|
50
|
+
};
|
|
51
|
+
return (_jsxs(FormItem, { className: cn(className), children: [label && (_jsxs(_Fragment, { children: [_jsx(FormLabel, { children: label }), _jsx("br", {})] })), _jsxs(Popover, { open: open, onOpenChange: (isOpen) => {
|
|
52
|
+
setOpen(isOpen);
|
|
53
|
+
if (!isOpen) {
|
|
54
|
+
setSearchValue("");
|
|
55
|
+
setIsAddingNew(false);
|
|
56
|
+
setNewValue("");
|
|
57
|
+
}
|
|
58
|
+
}, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsxs(Button, { variant: "outline", role: "combobox", "aria-expanded": open, className: cn("w-full justify-between", !field.value && "text-foreground/50", className), disabled: disabled || field.disabled, children: [_jsx("span", { className: "line-clamp-1 text-left", children: field.value
|
|
59
|
+
? selectedItem
|
|
60
|
+
? selectedItem.label
|
|
61
|
+
: field.value
|
|
62
|
+
: placeholder }), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }) }), _jsx(PopoverContent, { className: "p-0 w-[--radix-popover-trigger-width]", align: "start", children: _jsxs(Command, { shouldFilter: true, children: [_jsx(CommandInput, { placeholder: "Search...", value: searchValue, onValueChange: setSearchValue }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: searchValue && items.length > 0 ? "No results found." : emptyMessage }), _jsx(CommandGroup, { children: items
|
|
63
|
+
.filter(item => item.label.toLowerCase().includes(searchValue.toLowerCase()) || item.value.toLowerCase().includes(searchValue.toLowerCase()))
|
|
64
|
+
.map((item) => (_jsxs(CommandItem, { value: item.value, onSelect: (currentValue) => {
|
|
65
|
+
field.onChange(currentValue);
|
|
66
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(currentValue);
|
|
67
|
+
setOpen(false);
|
|
68
|
+
setSearchValue("");
|
|
69
|
+
}, className: "cursor-pointer", disabled: item === null || item === void 0 ? void 0 : item.disabled, children: [_jsx(Check, { className: cn("mr-2 h-4 w-4", field.value === item.value
|
|
70
|
+
? "opacity-100"
|
|
71
|
+
: "opacity-0") }), item.label] }, item.value))) })] }), _jsx("div", { className: "border-t p-2", children: isAddingNew ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { placeholder: addNewPlaceholder, value: newValue, onChange: (e) => setNewValue(e.target.value), onKeyDown: (e) => {
|
|
72
|
+
if (e.key === "Enter") {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
handleAddNewItem();
|
|
75
|
+
}
|
|
76
|
+
if (e.key === "Escape") {
|
|
77
|
+
setIsAddingNew(false);
|
|
78
|
+
setNewValue("");
|
|
79
|
+
}
|
|
80
|
+
}, autoFocus: true, className: "h-8" }), _jsx(Button, { size: "sm", variant: "ghost", onClick: () => {
|
|
81
|
+
setIsAddingNew(false);
|
|
82
|
+
setNewValue("");
|
|
83
|
+
}, className: "h-8", children: "Cancel" }), _jsx(Button, { size: "sm", variant: "default", onClick: handleAddNewItem, className: "h-8", disabled: !newValue.trim() || items.some(item => item.value === newValue.trim()), children: "Add" })] })) : (_jsxs(Button, { variant: "outline", className: "w-full justify-start", onClick: () => setIsAddingNew(true), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), "Add new option"] })) })] }) })] }), formDescription && (_jsx(FormDescription, { children: formDescription })), _jsx(FormMessage, {})] }));
|
|
84
|
+
} }));
|
|
85
|
+
}
|
|
@@ -51,8 +51,8 @@ export function FileUploader({ label = "Upload File", isDrag = false, onFileSele
|
|
|
51
51
|
if (file)
|
|
52
52
|
handleFile(file);
|
|
53
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"}
|
|
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
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
57
|
// ----- SIMPLE UPLOAD BOX -----
|
|
58
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" })] }))] }));
|
|
@@ -90,12 +90,12 @@ const NewImageFormComponent = ({ open, setOpen, onImageSubmit, }) => {
|
|
|
90
90
|
const getImagePreview = (state) => {
|
|
91
91
|
const imgSource = croppedImage && activeState === state ? croppedImage : prevImages[state];
|
|
92
92
|
// const imgSource = prevImages[state];
|
|
93
|
-
return imgSource ? (_jsx("div", { className: `
|
|
93
|
+
return imgSource ? (_jsx("div", { className: `
|
|
94
94
|
${state === "first"
|
|
95
95
|
? "relative w-3/5 h-[200px] bg-slate-400"
|
|
96
96
|
: state === "second"
|
|
97
97
|
? "relative w-1/2 h-[220px] bg-slate-400"
|
|
98
|
-
: "relative w-1/3 h-[120px] bg-slate-400"}`, children: _jsx(Image, { src: imgSource || "", alt: `Preview ${state}`, layout: "fill", objectFit: "70vh" }) })) : (_jsx("div", { className: `
|
|
98
|
+
: "relative w-1/3 h-[120px] bg-slate-400"}`, children: _jsx(Image, { src: imgSource || "", alt: `Preview ${state}`, layout: "fill", objectFit: "70vh" }) })) : (_jsx("div", { className: `
|
|
99
99
|
${state === "first"
|
|
100
100
|
? "relative w-3/5 h-[200px] bg-slate-400"
|
|
101
101
|
: state === "second"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Copyright } from "lucide-react";
|
|
3
3
|
export function Footer() {
|
|
4
|
-
return (_jsx("footer", { className: "ml-12 flex border-t px-4 py-2 justify-center lg:justify-start", children: _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx(Copyright, {}), _jsx("span", { children: "Powered By" }), _jsx("a", { href: "https://keross.com", target: "_blank", children: "Keross" }), _jsx("span", { className: "", children: "|" }), _jsx("span", { id: "txtCopyrightYear", className: "", children: new Date().getFullYear() })] }) }));
|
|
4
|
+
return (_jsx("footer", { className: "ml-12 flex border-t px-4 py-2 justify-center lg:justify-start", children: _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx(Copyright, { className: "size-4" }), _jsx("span", { children: "Powered By" }), _jsx("a", { href: "https://keross.com", target: "_blank", children: "Keross" }), _jsx("span", { className: "", children: "|" }), _jsx("span", { id: "txtCopyrightYear", className: "", children: new Date().getFullYear() })] }) }));
|
|
5
5
|
}
|
|
@@ -12,23 +12,11 @@ export interface Account {
|
|
|
12
12
|
export interface Software {
|
|
13
13
|
softwareId: string;
|
|
14
14
|
softwareName: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
softwareManager: string;
|
|
21
|
-
softwareVisibility: "PUBLIC" | "PRIVATE";
|
|
22
|
-
softwareStatus: string;
|
|
23
|
-
repoName: string;
|
|
24
|
-
active: boolean;
|
|
25
|
-
price: number;
|
|
26
|
-
currency: string | null;
|
|
27
|
-
logoResourceId: string | null;
|
|
28
|
-
icon: string | null;
|
|
29
|
-
link: string | null;
|
|
30
|
-
category: string | null;
|
|
31
|
-
videoResources: any[];
|
|
15
|
+
url: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
defaultSoftware: boolean;
|
|
19
|
+
order: number;
|
|
32
20
|
}
|
|
33
21
|
export interface User {
|
|
34
22
|
userId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { Check, CircleUserRound,
|
|
4
|
+
import { Check, CircleUserRound, FolderCode, Home, LogOut, Settings } from 'lucide-react';
|
|
5
5
|
import { Button } from '../../shadcn/button';
|
|
6
6
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../shadcn/tooltip';
|
|
7
7
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '../../shadcn/dropdown-menu';
|
|
@@ -65,7 +65,7 @@ export const MainSidebar = ({ baseUrl }) => {
|
|
|
65
65
|
const fetchSubscribedSoftwares = async () => {
|
|
66
66
|
try {
|
|
67
67
|
const accessToken = await getValidAccessToken();
|
|
68
|
-
const response = await axios.get(`${baseUrl}/platform/software/accessible/
|
|
68
|
+
const response = await axios.get(`${baseUrl}/platform/software/accessible/user`, {
|
|
69
69
|
headers: {
|
|
70
70
|
Authorization: `Bearer ${accessToken}`,
|
|
71
71
|
},
|
|
@@ -85,8 +85,8 @@ export const MainSidebar = ({ baseUrl }) => {
|
|
|
85
85
|
}, 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-1", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-8 w-8', children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: "/home", children: [_jsx(Home, { className: "h-8 w-8" }), _jsx("span", { className: "sr-only", children: "Home" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Home" })] }, "home") }), _jsx("nav", { className: "flex flex-col gap-1 flex-1", children: softwares.map((software) => {
|
|
86
86
|
var _a, _b;
|
|
87
87
|
const hasIcon = Boolean(software.icon && software.icon.trim() !== "");
|
|
88
|
-
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: (_a = software.
|
|
89
|
-
}) }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-8 w-8', children: _jsx(Button, { variant: "ghost",
|
|
88
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: (_a = software.url) !== null && _a !== void 0 ? _a : "#", children: [hasIcon ? (_jsx(Icon, { name: toPascalCase((_b = software.icon) !== null && _b !== void 0 ? _b : ''), className: "h-8 w-8" })) : (_jsx(FolderCode, { className: "h-8 w-8" })), _jsx("span", { className: "sr-only", children: software.softwareName })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: software.softwareName })] }, software.softwareName));
|
|
89
|
+
}) }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: 'h-8 w-8', children: _jsx(Button, { variant: "ghost", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: "/settings", children: [_jsx(Settings, { className: "h-8 w-8" }), _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", 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 () => {
|
|
90
90
|
await clearAllCookieSession();
|
|
91
91
|
redirect("/login.html");
|
|
92
92
|
}, 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);
|
|
@@ -30,7 +30,7 @@ export function ThemeToggleBtn() {
|
|
|
30
30
|
const applySavedColors = useCallback(() => {
|
|
31
31
|
const primaryColor = localStorage.getItem("primary") || '#0f172b';
|
|
32
32
|
const secondaryColor = localStorage.getItem("secondary") || '#1b2336';
|
|
33
|
-
const tertiaryColor = localStorage.getItem("tertiary") || '#
|
|
33
|
+
const tertiaryColor = localStorage.getItem("tertiary") || '#1f3aba';
|
|
34
34
|
const pChartColor = localStorage.getItem("primaryChart") || '#00bc7d';
|
|
35
35
|
const sChartColor = localStorage.getItem("secondaryChart") || '#fd9a00';
|
|
36
36
|
const tChartColor = localStorage.getItem("tertiaryChart") || '#ad46ff';
|
package/dist/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
|
74
74
|
export { SearchInput } from "./ikoncomponents/search-input";
|
|
75
75
|
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
76
76
|
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
77
|
-
export {
|
|
77
|
+
export { Tabs } from "./ikoncomponents/tabs";
|
|
78
78
|
export type { TabArray, TabProps } from "./ikoncomponents/tabs/type";
|
|
79
79
|
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
80
80
|
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
@@ -125,13 +125,13 @@ export type { CropperImgProps as NewCropperImgProps } from "./ikoncomponents/ima
|
|
|
125
125
|
export { NewImageForm } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
126
126
|
export type { ImageFormProps } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
127
127
|
export { WorkInProgress } from "./ikoncomponents/work-in-progress";
|
|
128
|
+
export { CustomComboboxInput } from "./ikoncomponents/custom-combo-dropdown";
|
|
128
129
|
export { ThemeProvider } from "./utils/theme-provider";
|
|
129
130
|
export { RadiusProvider, useRadius } from "./utils/border-radius-provider";
|
|
130
131
|
export { FontProvider, useFont } from "./utils/font-provider";
|
|
131
132
|
export { cn } from "./utils/cn";
|
|
132
133
|
export type { CookieSessionOptionsProps } from "./utils/session/cookieSession";
|
|
133
134
|
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession, } from "./utils/session/cookieSession";
|
|
134
|
-
export { getValidAccessToken, refreshAccessToken, logOut, } from "./utils/token-management";
|
|
135
|
-
export type { AccessTokenOptionsProps } from "./utils/token-management";
|
|
135
|
+
export { getValidAccessToken, refreshAccessToken, decodeAccessToken, logOut, } from "./utils/token-management";
|
|
136
136
|
export type { TokenResponse } from "./utils/token-management/types";
|
|
137
137
|
export { useIsMobile } from "./hooks/use-mobile";
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
|
68
68
|
export { SearchInput } from "./ikoncomponents/search-input";
|
|
69
69
|
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
70
70
|
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
71
|
-
export {
|
|
71
|
+
export { Tabs } from "./ikoncomponents/tabs";
|
|
72
72
|
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
73
73
|
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
74
74
|
export { TooltipComponent } from "./ikoncomponents/tooltip";
|
|
@@ -105,10 +105,11 @@ export { CropperForm } from "./ikoncomponents/image-cropper-upload/cropper-form"
|
|
|
105
105
|
export { NewCropperImg } from "./ikoncomponents/image-cropper-upload/components/newCropper";
|
|
106
106
|
export { NewImageForm } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
107
107
|
export { WorkInProgress } from "./ikoncomponents/work-in-progress";
|
|
108
|
+
export { CustomComboboxInput } from "./ikoncomponents/custom-combo-dropdown";
|
|
108
109
|
export { ThemeProvider } from "./utils/theme-provider";
|
|
109
110
|
export { RadiusProvider, useRadius } from "./utils/border-radius-provider";
|
|
110
111
|
export { FontProvider, useFont } from "./utils/font-provider";
|
|
111
112
|
export { cn } from "./utils/cn";
|
|
112
113
|
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession, } from "./utils/session/cookieSession";
|
|
113
|
-
export { getValidAccessToken, refreshAccessToken, logOut, } from "./utils/token-management";
|
|
114
|
+
export { getValidAccessToken, refreshAccessToken, decodeAccessToken, logOut, } from "./utils/token-management";
|
|
114
115
|
export { useIsMobile } from "./hooks/use-mobile";
|