@algorithm-shift/design-system 1.2.64 → 1.2.66
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/client.d.mts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +14 -5
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +14 -5
- package/dist/client.mjs.map +1 -1
- package/dist/index.css +64 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +117 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +154 -101
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ interface TableProps extends ElementProps {
|
|
|
104
104
|
onCellClick?: (cellData: Record<string, any>, columnId: string) => void;
|
|
105
105
|
getRowSelection?: (rowSelection: Record<string, boolean>) => void;
|
|
106
106
|
totalRecords?: number;
|
|
107
|
+
globalSearch?: boolean;
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
interface TabsProps extends ElementProps {
|
|
@@ -299,9 +300,14 @@ interface ExtendedTableProps extends TableProps {
|
|
|
299
300
|
page?: number;
|
|
300
301
|
itemsPerPage?: number;
|
|
301
302
|
onPageChange?: (props: PageChangeProps) => void;
|
|
303
|
+
onSortChange?: (props: SortChangeProps) => void;
|
|
304
|
+
onFilterChange?: (props: FilterChangeProps) => void;
|
|
305
|
+
onGlobalSearch?: (props: SearchChangeProps) => void;
|
|
306
|
+
sort_by?: string;
|
|
307
|
+
sort_order?: string;
|
|
302
308
|
}
|
|
303
309
|
|
|
304
|
-
declare const Table: ({ columns, data, rowActions, className, style, pagination, paginationMode, itemsPerPage, onPageChange, page, loading, totalRecords, ...props }: ExtendedTableProps) => react_jsx_runtime.JSX.Element;
|
|
310
|
+
declare const Table: ({ columns, data, rowActions, className, style, pagination, paginationMode, itemsPerPage, onPageChange, onSortChange, onFilterChange, onGlobalSearch, page, loading, totalRecords, globalSearch, ...props }: ExtendedTableProps) => react_jsx_runtime.JSX.Element;
|
|
305
311
|
|
|
306
312
|
declare const CustomPagination: ({ totalPages, currentPage, onPageChange, maxVisiblePages, perPage, }: CustomPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
307
313
|
|
package/dist/index.js
CHANGED
|
@@ -243,6 +243,11 @@ function TabGroupComponent({
|
|
|
243
243
|
activeTab,
|
|
244
244
|
onTabChange
|
|
245
245
|
}) {
|
|
246
|
+
(0, import_react3.useEffect)(() => {
|
|
247
|
+
if (list && list.length > 0 && !activeTab && onTabChange) {
|
|
248
|
+
onTabChange(list[0]?.tabId);
|
|
249
|
+
}
|
|
250
|
+
}, [list, activeTab, onTabChange]);
|
|
246
251
|
const formatedList = (0, import_react3.useMemo)(
|
|
247
252
|
() => Array.isArray(list) ? [...list].sort((a, b) => (a.orderNumber ?? 0) - (b.orderNumber ?? 0)) : [],
|
|
248
253
|
[list]
|
|
@@ -27819,7 +27824,7 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
27819
27824
|
name: props.name,
|
|
27820
27825
|
value: props.value || "",
|
|
27821
27826
|
className: cn(
|
|
27822
|
-
"rounded-md",
|
|
27827
|
+
"rounded-md border-1",
|
|
27823
27828
|
className,
|
|
27824
27829
|
props.errorMessage ? "border-red-500" : ""
|
|
27825
27830
|
),
|
|
@@ -28434,16 +28439,20 @@ function DataTable({
|
|
|
28434
28439
|
onPageChange,
|
|
28435
28440
|
pageSize = 10,
|
|
28436
28441
|
paginationMode = "client",
|
|
28437
|
-
totalRecords = 0
|
|
28442
|
+
totalRecords = 0,
|
|
28443
|
+
onSortChange,
|
|
28444
|
+
onFilterChange,
|
|
28445
|
+
onGlobalSearch,
|
|
28446
|
+
globalSearch
|
|
28438
28447
|
}) {
|
|
28439
|
-
const [sorting, setSorting] = React6.useState([]);
|
|
28440
28448
|
const [columnFilters, setColumnFilters] = React6.useState([]);
|
|
28441
28449
|
const [columnVisibility, setColumnVisibility] = React6.useState({});
|
|
28450
|
+
const [manualSort, setManualSort] = React6.useState(null);
|
|
28451
|
+
const [searchTerm, setSearchTerm] = React6.useState("");
|
|
28442
28452
|
const table = (0, import_react_table.useReactTable)({
|
|
28443
28453
|
data,
|
|
28444
28454
|
columns,
|
|
28445
28455
|
state: {
|
|
28446
|
-
sorting,
|
|
28447
28456
|
columnFilters,
|
|
28448
28457
|
columnVisibility,
|
|
28449
28458
|
pagination: {
|
|
@@ -28451,11 +28460,9 @@ function DataTable({
|
|
|
28451
28460
|
pageSize
|
|
28452
28461
|
}
|
|
28453
28462
|
},
|
|
28454
|
-
onSortingChange: setSorting,
|
|
28455
28463
|
onColumnFiltersChange: setColumnFilters,
|
|
28456
28464
|
onColumnVisibilityChange: setColumnVisibility,
|
|
28457
28465
|
getCoreRowModel: (0, import_react_table.getCoreRowModel)(),
|
|
28458
|
-
getSortedRowModel: (0, import_react_table.getSortedRowModel)(),
|
|
28459
28466
|
getFilteredRowModel: (0, import_react_table.getFilteredRowModel)(),
|
|
28460
28467
|
getPaginationRowModel: pagination && paginationMode === "client" ? (0, import_react_table.getPaginationRowModel)() : void 0,
|
|
28461
28468
|
manualPagination: paginationMode === "server",
|
|
@@ -28485,68 +28492,105 @@ function DataTable({
|
|
|
28485
28492
|
}
|
|
28486
28493
|
return [];
|
|
28487
28494
|
};
|
|
28488
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "overflow-hidden rounded-md
|
|
28489
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.
|
|
28490
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.
|
|
28491
|
-
|
|
28492
|
-
{
|
|
28493
|
-
variant: "outline",
|
|
28494
|
-
size: "sm",
|
|
28495
|
-
className: "px-3 py-1 text-xs cursor-pointer",
|
|
28496
|
-
children: "Manage Columns"
|
|
28497
|
-
}
|
|
28498
|
-
) }),
|
|
28499
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
|
|
28500
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
|
|
28501
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
|
|
28495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "overflow-hidden rounded-md w-full", children: [
|
|
28496
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: `flex ${globalSearch ? "justify-between" : "justify-end"} p-2 border-b bg-gray-50`, children: [
|
|
28497
|
+
globalSearch && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2 w-full max-w-sm", children: [
|
|
28498
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative w-full", children: [
|
|
28502
28499
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28503
28500
|
"input",
|
|
28504
28501
|
{
|
|
28505
|
-
type: "
|
|
28506
|
-
|
|
28507
|
-
|
|
28508
|
-
|
|
28509
|
-
|
|
28502
|
+
type: "text",
|
|
28503
|
+
placeholder: "Search...",
|
|
28504
|
+
value: searchTerm,
|
|
28505
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
28506
|
+
onKeyDown: (e) => {
|
|
28507
|
+
if (e.key === "Enter" && onGlobalSearch) {
|
|
28508
|
+
onGlobalSearch(searchTerm.trim());
|
|
28510
28509
|
}
|
|
28511
28510
|
},
|
|
28512
|
-
|
|
28513
|
-
table.getAllLeafColumns().forEach(
|
|
28514
|
-
(col) => col.toggleVisibility(e.target.checked)
|
|
28515
|
-
);
|
|
28516
|
-
}
|
|
28511
|
+
className: "border border-gray-300 rounded-md text-sm px-3 py-2 pl-8 w-full focus:outline-none focus:ring-1 focus:ring-[#12715B]"
|
|
28517
28512
|
}
|
|
28518
28513
|
),
|
|
28519
|
-
"
|
|
28514
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Search, { className: "absolute left-2 top-2.5 text-gray-400", size: 16 })
|
|
28520
28515
|
] }),
|
|
28521
|
-
|
|
28522
|
-
|
|
28523
|
-
|
|
28524
|
-
|
|
28525
|
-
|
|
28526
|
-
|
|
28527
|
-
|
|
28528
|
-
|
|
28529
|
-
|
|
28530
|
-
|
|
28531
|
-
|
|
28516
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28517
|
+
Button,
|
|
28518
|
+
{
|
|
28519
|
+
size: "sm",
|
|
28520
|
+
className: "bg-[#12715B] text-white text-xs h-auto py-2 px-3",
|
|
28521
|
+
onClick: () => onGlobalSearch?.(searchTerm.trim()),
|
|
28522
|
+
children: "Search"
|
|
28523
|
+
}
|
|
28524
|
+
)
|
|
28525
|
+
] }),
|
|
28526
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Popover, { children: [
|
|
28527
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28528
|
+
Button,
|
|
28529
|
+
{
|
|
28530
|
+
variant: "outline",
|
|
28531
|
+
size: "sm",
|
|
28532
|
+
className: "px-3 py-1 text-xs cursor-pointer",
|
|
28533
|
+
children: "Manage Columns"
|
|
28534
|
+
}
|
|
28535
|
+
) }),
|
|
28536
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(PopoverContent, { align: "end", className: "w-48 p-3 space-y-2", children: [
|
|
28537
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-sm font-medium mb-2", children: "Show / Hide Columns" }),
|
|
28538
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "flex items-center gap-2 text-sm font-semibold border-b pb-2 mb-2", children: [
|
|
28539
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28540
|
+
"input",
|
|
28541
|
+
{
|
|
28542
|
+
type: "checkbox",
|
|
28543
|
+
checked: table.getAllLeafColumns().every((col) => col.getIsVisible()),
|
|
28544
|
+
ref: (input) => {
|
|
28545
|
+
if (input) {
|
|
28546
|
+
input.indeterminate = table.getAllLeafColumns().some((col) => col.getIsVisible()) && !table.getAllLeafColumns().every((col) => col.getIsVisible());
|
|
28547
|
+
}
|
|
28548
|
+
},
|
|
28549
|
+
onChange: (e) => {
|
|
28550
|
+
table.getAllLeafColumns().forEach(
|
|
28551
|
+
(col) => col.toggleVisibility(e.target.checked)
|
|
28552
|
+
);
|
|
28553
|
+
}
|
|
28554
|
+
}
|
|
28555
|
+
),
|
|
28556
|
+
"Toggle All"
|
|
28557
|
+
] }),
|
|
28558
|
+
table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
|
|
28559
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28560
|
+
"input",
|
|
28561
|
+
{
|
|
28562
|
+
type: "checkbox",
|
|
28563
|
+
checked: column.getIsVisible(),
|
|
28564
|
+
onChange: (e) => column.toggleVisibility(e.target.checked)
|
|
28565
|
+
}
|
|
28566
|
+
),
|
|
28567
|
+
column.columnDef.header?.toString() ?? column.id
|
|
28568
|
+
] }, column.id))
|
|
28569
|
+
] })
|
|
28532
28570
|
] })
|
|
28533
|
-
] })
|
|
28571
|
+
] }),
|
|
28534
28572
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Table3, { children: [
|
|
28535
28573
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableHeader, { children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: hg.headers.map((header) => {
|
|
28536
28574
|
const canSort = header.column.getCanSort();
|
|
28537
28575
|
const canFilter = header.column.getCanFilter();
|
|
28576
|
+
const sortDir = manualSort?.key === header.column.id ? manualSort.dir : null;
|
|
28538
28577
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableHead, { className: "relative select-none", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
28539
28578
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
28540
28579
|
"span",
|
|
28541
28580
|
{
|
|
28542
28581
|
className: `flex items-center gap-1 ${canSort ? "cursor-pointer" : ""}`,
|
|
28543
|
-
onClick:
|
|
28582
|
+
onClick: () => {
|
|
28583
|
+
if (!canSort) return;
|
|
28584
|
+
const newDir = manualSort?.key === header.column.id && manualSort.dir === "asc" ? "desc" : "asc";
|
|
28585
|
+
setManualSort({ key: header.column.id, dir: newDir });
|
|
28586
|
+
onSortChange?.(header.column.id, newDir);
|
|
28587
|
+
},
|
|
28544
28588
|
children: [
|
|
28545
28589
|
(0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
|
|
28546
28590
|
canSort && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
28547
|
-
|
|
28548
|
-
|
|
28549
|
-
!
|
|
28591
|
+
sortDir === "asc" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowUp, { size: 14, className: "text-gray-500" }),
|
|
28592
|
+
sortDir === "desc" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowDown, { size: 14, className: "text-gray-500" }),
|
|
28593
|
+
!sortDir && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowUpDown, { size: 14, className: "text-gray-400" })
|
|
28550
28594
|
] })
|
|
28551
28595
|
]
|
|
28552
28596
|
}
|
|
@@ -28564,8 +28608,8 @@ function DataTable({
|
|
|
28564
28608
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
28565
28609
|
PopoverContent,
|
|
28566
28610
|
{
|
|
28567
|
-
align: "
|
|
28568
|
-
sideOffset:
|
|
28611
|
+
align: "center",
|
|
28612
|
+
sideOffset: 14,
|
|
28569
28613
|
className: "w-50 p-3 z-[200] border-gray-300",
|
|
28570
28614
|
avoidCollisions: true,
|
|
28571
28615
|
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
@@ -28574,8 +28618,10 @@ function DataTable({
|
|
|
28574
28618
|
onSubmit: (e) => {
|
|
28575
28619
|
e.preventDefault();
|
|
28576
28620
|
const formData = new FormData(e.currentTarget);
|
|
28577
|
-
const value = formData.get("filter");
|
|
28578
|
-
|
|
28621
|
+
const value = formData.get("filter") || "";
|
|
28622
|
+
if (onFilterChange && value) {
|
|
28623
|
+
onFilterChange({ columnKey: header.column.id, columnTerm: value });
|
|
28624
|
+
}
|
|
28579
28625
|
},
|
|
28580
28626
|
className: "space-y-2",
|
|
28581
28627
|
children: [
|
|
@@ -28665,9 +28711,13 @@ var Table4 = ({
|
|
|
28665
28711
|
paginationMode = "client",
|
|
28666
28712
|
itemsPerPage = 10,
|
|
28667
28713
|
onPageChange,
|
|
28714
|
+
onSortChange,
|
|
28715
|
+
onFilterChange,
|
|
28716
|
+
onGlobalSearch,
|
|
28668
28717
|
page,
|
|
28669
28718
|
loading = false,
|
|
28670
28719
|
totalRecords = 0,
|
|
28720
|
+
globalSearch = false,
|
|
28671
28721
|
...props
|
|
28672
28722
|
}) => {
|
|
28673
28723
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
@@ -28688,7 +28738,11 @@ var Table4 = ({
|
|
|
28688
28738
|
onPageChange?.({ page: pageIndex + 1, itemsPerPage: pageSize });
|
|
28689
28739
|
},
|
|
28690
28740
|
paginationMode,
|
|
28691
|
-
totalRecords
|
|
28741
|
+
totalRecords,
|
|
28742
|
+
onSortChange: (col, dir) => onSortChange?.({ sort_by: col, sort_order: dir }),
|
|
28743
|
+
onFilterChange: (filters) => onFilterChange?.({ columnKey: filters.columnKey, columnTerm: filters.columnTerm }),
|
|
28744
|
+
onGlobalSearch: (term) => onGlobalSearch?.({ searchTerm: term }),
|
|
28745
|
+
globalSearch
|
|
28692
28746
|
}
|
|
28693
28747
|
) });
|
|
28694
28748
|
};
|
|
@@ -29085,20 +29139,20 @@ function Navbar({
|
|
|
29085
29139
|
userName = "Guest User"
|
|
29086
29140
|
}) {
|
|
29087
29141
|
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
29088
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mx-auto flex max-w-
|
|
29142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("nav", { className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
|
|
29089
29143
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }) }),
|
|
29090
29144
|
!isMobileView && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
29091
29145
|
import_link6.default,
|
|
29092
29146
|
{
|
|
29093
29147
|
href: item.url || "#",
|
|
29094
|
-
className: "text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",
|
|
29148
|
+
className: "text-sm font-medium dark:text-white text-gray-600 hover:text-gray-900 transition-colors",
|
|
29095
29149
|
children: item.header
|
|
29096
29150
|
},
|
|
29097
29151
|
item.id
|
|
29098
29152
|
)) }),
|
|
29099
29153
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
29100
29154
|
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
29101
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
29155
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
|
|
29102
29156
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
29103
29157
|
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
29104
29158
|
Button,
|
|
@@ -29109,13 +29163,13 @@ function Navbar({
|
|
|
29109
29163
|
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "h-5 w-5 text-gray-400" })
|
|
29110
29164
|
}
|
|
29111
29165
|
),
|
|
29112
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
|
|
29113
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F]" }) }),
|
|
29166
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
|
|
29167
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
|
|
29114
29168
|
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
29115
29169
|
] }),
|
|
29116
29170
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
|
|
29117
29171
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
29118
|
-
!isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-[#000000] text-[13px] font-[500] mb-0", children: userName }),
|
|
29172
|
+
!isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
|
|
29119
29173
|
!isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
29120
29174
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
29121
29175
|
AvatarImage,
|
|
@@ -29129,7 +29183,7 @@ function Navbar({
|
|
|
29129
29183
|
{
|
|
29130
29184
|
variant: "ghost",
|
|
29131
29185
|
size: "icon",
|
|
29132
|
-
className: "text-gray-900 md:hidden",
|
|
29186
|
+
className: "text-gray-900 md:hidden dark:invert",
|
|
29133
29187
|
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
|
|
29134
29188
|
}
|
|
29135
29189
|
)
|
|
@@ -29138,16 +29192,16 @@ function Navbar({
|
|
|
29138
29192
|
{
|
|
29139
29193
|
variant: "ghost",
|
|
29140
29194
|
size: "icon",
|
|
29141
|
-
className: "text-gray-900",
|
|
29195
|
+
className: "text-gray-900 dark:invert",
|
|
29142
29196
|
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
|
|
29143
29197
|
}
|
|
29144
29198
|
)
|
|
29145
29199
|
] }) }),
|
|
29146
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white", children: [
|
|
29147
|
-
profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) }),
|
|
29200
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
|
|
29201
|
+
profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) }),
|
|
29148
29202
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "md:hidden", children: [
|
|
29149
29203
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
|
|
29150
|
-
list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
29204
|
+
list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) })
|
|
29151
29205
|
] })
|
|
29152
29206
|
] })
|
|
29153
29207
|
] })
|