@algorithm-shift/design-system 1.2.983 → 1.2.985
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/index.css +10 -28
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +104 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +109 -108
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -234,6 +234,7 @@ interface NavbarProps extends ElementProps {
|
|
|
234
234
|
isBuilder?: boolean;
|
|
235
235
|
source?: string;
|
|
236
236
|
navList?: Record<string, any>;
|
|
237
|
+
onSearch?: (search: { searchTerm: string }) => void;
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
interface BreadcrumbProps extends ElementProps {
|
|
@@ -449,7 +450,8 @@ declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, styl
|
|
|
449
450
|
|
|
450
451
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
451
452
|
|
|
452
|
-
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode,
|
|
453
|
+
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, // desktop | mobile | tablet
|
|
454
|
+
list, profileMenu, userName, isBuilder, source, navList, onSearch }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
453
455
|
|
|
454
456
|
declare const _default$1: React$1.MemoExoticComponent<({ className, style, loading: externalLoading, dataKey, dataLabel, apiUrl, isPaginationEnabled, limit, canvasMode, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element>;
|
|
455
457
|
|
package/dist/index.d.ts
CHANGED
|
@@ -234,6 +234,7 @@ interface NavbarProps extends ElementProps {
|
|
|
234
234
|
isBuilder?: boolean;
|
|
235
235
|
source?: string;
|
|
236
236
|
navList?: Record<string, any>;
|
|
237
|
+
onSearch?: (search: { searchTerm: string }) => void;
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
interface BreadcrumbProps extends ElementProps {
|
|
@@ -449,7 +450,8 @@ declare const StagesComponent: ({ stages, isShowBtn, buttonText, className, styl
|
|
|
449
450
|
|
|
450
451
|
declare const Spacer: ({ className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
451
452
|
|
|
452
|
-
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode,
|
|
453
|
+
declare function Navbar({ style, badgeType, badgeCount, hideBadgeWhenZero, profileType, showName, imageUrl, altText, canvasMode, // desktop | mobile | tablet
|
|
454
|
+
list, profileMenu, userName, isBuilder, source, navList, onSearch }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
453
455
|
|
|
454
456
|
declare const _default$1: React$1.MemoExoticComponent<({ className, style, loading: externalLoading, dataKey, dataLabel, apiUrl, isPaginationEnabled, limit, canvasMode, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element>;
|
|
455
457
|
|
package/dist/index.js
CHANGED
|
@@ -706,6 +706,19 @@ function DropdownMenuItem({
|
|
|
706
706
|
}
|
|
707
707
|
);
|
|
708
708
|
}
|
|
709
|
+
function DropdownMenuSeparator({
|
|
710
|
+
className,
|
|
711
|
+
...props
|
|
712
|
+
}) {
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
714
|
+
DropdownMenuPrimitive.Separator,
|
|
715
|
+
{
|
|
716
|
+
"data-slot": "dropdown-menu-separator",
|
|
717
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
718
|
+
...props
|
|
719
|
+
}
|
|
720
|
+
);
|
|
721
|
+
}
|
|
709
722
|
function DropdownMenuSub({
|
|
710
723
|
...props
|
|
711
724
|
}) {
|
|
@@ -782,28 +795,12 @@ function SplitButton({ style, textContent, className, list = [] }) {
|
|
|
782
795
|
|
|
783
796
|
// src/components/Basic/Icon/Icon.tsx
|
|
784
797
|
var import_react8 = require("react");
|
|
798
|
+
var SolidIcons = __toESM(require("@fortawesome/free-solid-svg-icons"));
|
|
799
|
+
var RegularIcons = __toESM(require("@fortawesome/free-regular-svg-icons"));
|
|
800
|
+
var BrandIcons = __toESM(require("@fortawesome/free-brands-svg-icons"));
|
|
785
801
|
var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
|
|
786
802
|
var LucideIcons = __toESM(require("lucide-react"));
|
|
787
803
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
788
|
-
async function loadFAIcon(iconName, prefix = "fas") {
|
|
789
|
-
const pkgMap = {
|
|
790
|
-
fas: "@fortawesome/free-solid-svg-icons",
|
|
791
|
-
// Solid
|
|
792
|
-
far: "@fortawesome/free-regular-svg-icons",
|
|
793
|
-
// Regular
|
|
794
|
-
fab: "@fortawesome/free-brands-svg-icons"
|
|
795
|
-
// Brands
|
|
796
|
-
};
|
|
797
|
-
const basePackage = pkgMap[prefix] || pkgMap["fas"];
|
|
798
|
-
const modulePath = `${basePackage}`;
|
|
799
|
-
try {
|
|
800
|
-
const mod = await import(modulePath);
|
|
801
|
-
return mod[iconName] || Object.values(mod)[0];
|
|
802
|
-
} catch {
|
|
803
|
-
console.warn(`FA icon not found in ${modulePath}`);
|
|
804
|
-
return null;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
804
|
function Icon(props) {
|
|
808
805
|
const {
|
|
809
806
|
iconSet = "fontawesome",
|
|
@@ -819,6 +816,15 @@ function Icon(props) {
|
|
|
819
816
|
...rest
|
|
820
817
|
} = props;
|
|
821
818
|
const [dynamicIcon, setDynamicIcon] = (0, import_react8.useState)(icon || null);
|
|
819
|
+
async function loadFAIcon(iconName, prefix2 = "fas") {
|
|
820
|
+
const pkgMap = {
|
|
821
|
+
fas: SolidIcons,
|
|
822
|
+
far: RegularIcons,
|
|
823
|
+
fab: BrandIcons
|
|
824
|
+
};
|
|
825
|
+
const basePackage = pkgMap[prefix2] ?? SolidIcons;
|
|
826
|
+
return basePackage[iconName] ?? null;
|
|
827
|
+
}
|
|
822
828
|
(0, import_react8.useEffect)(() => {
|
|
823
829
|
if (icon && iconSet === "fontawesome") {
|
|
824
830
|
loadFAIcon(icon, prefix).then((ico) => setDynamicIcon(ico));
|
|
@@ -835,7 +841,10 @@ function Icon(props) {
|
|
|
835
841
|
Comp,
|
|
836
842
|
{
|
|
837
843
|
size: numericSize,
|
|
838
|
-
className
|
|
844
|
+
className: cn(
|
|
845
|
+
className,
|
|
846
|
+
props.onClick ? "cursor-pointer" : ""
|
|
847
|
+
),
|
|
839
848
|
title,
|
|
840
849
|
style,
|
|
841
850
|
"aria-hidden": title ? void 0 : true,
|
|
@@ -857,7 +866,10 @@ function Icon(props) {
|
|
|
857
866
|
spin,
|
|
858
867
|
spinPulse: pulse,
|
|
859
868
|
widthAuto: fixedWidth,
|
|
860
|
-
className: cn(
|
|
869
|
+
className: cn(
|
|
870
|
+
className,
|
|
871
|
+
props.onClick ? "cursor-pointer" : ""
|
|
872
|
+
),
|
|
861
873
|
title,
|
|
862
874
|
style: {
|
|
863
875
|
...tempStyle
|
|
@@ -5250,7 +5262,11 @@ var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
|
5250
5262
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5251
5263
|
|
|
5252
5264
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
5265
|
+
var import_react34 = require("react");
|
|
5253
5266
|
var import_lucide_react18 = require("lucide-react");
|
|
5267
|
+
var import_image2 = __toESM(require("next/image"));
|
|
5268
|
+
var import_link4 = __toESM(require("next/link"));
|
|
5269
|
+
var import_navigation3 = require("next/navigation");
|
|
5254
5270
|
|
|
5255
5271
|
// src/components/ui/avatar.tsx
|
|
5256
5272
|
var React12 = __toESM(require("react"));
|
|
@@ -5291,11 +5307,6 @@ var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
5291
5307
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
5292
5308
|
|
|
5293
5309
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
5294
|
-
var import_link4 = __toESM(require("next/link"));
|
|
5295
|
-
var import_image2 = __toESM(require("next/image"));
|
|
5296
|
-
var import_navigation3 = require("next/navigation");
|
|
5297
|
-
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
5298
|
-
var import_react34 = require("react");
|
|
5299
5310
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5300
5311
|
function Navbar({
|
|
5301
5312
|
style,
|
|
@@ -5307,44 +5318,76 @@ function Navbar({
|
|
|
5307
5318
|
imageUrl,
|
|
5308
5319
|
altText = "Logo",
|
|
5309
5320
|
canvasMode = "desktop",
|
|
5321
|
+
// desktop | mobile | tablet
|
|
5310
5322
|
list = [],
|
|
5311
5323
|
profileMenu = [],
|
|
5312
5324
|
userName = "Guest User",
|
|
5313
5325
|
isBuilder = false,
|
|
5314
5326
|
source,
|
|
5315
|
-
navList
|
|
5327
|
+
navList,
|
|
5328
|
+
onSearch
|
|
5316
5329
|
}) {
|
|
5317
|
-
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
5318
5330
|
const router = (0, import_navigation3.useRouter)();
|
|
5319
|
-
const [
|
|
5320
|
-
|
|
5331
|
+
const [screenMode, setScreenMode] = (0, import_react34.useState)(
|
|
5332
|
+
canvasMode
|
|
5333
|
+
);
|
|
5334
|
+
(0, import_react34.useEffect)(() => {
|
|
5335
|
+
const detectMode = () => {
|
|
5336
|
+
if (window.innerWidth < 640) setScreenMode("mobile");
|
|
5337
|
+
else if (window.innerWidth < 1024) setScreenMode("tablet");
|
|
5338
|
+
else setScreenMode("desktop");
|
|
5339
|
+
};
|
|
5340
|
+
detectMode();
|
|
5341
|
+
window.addEventListener("resize", detectMode);
|
|
5342
|
+
return () => window.removeEventListener("resize", detectMode);
|
|
5343
|
+
}, []);
|
|
5344
|
+
const mode = canvasMode || screenMode;
|
|
5345
|
+
const isMobile = mode === "mobile";
|
|
5346
|
+
const isTablet = mode === "tablet";
|
|
5347
|
+
const isDesktop = mode === "desktop";
|
|
5321
5348
|
const handleBuilderExit = (0, import_react34.useCallback)(
|
|
5322
5349
|
(e, url) => {
|
|
5323
5350
|
if (isBuilder) {
|
|
5324
5351
|
e.preventDefault();
|
|
5325
|
-
|
|
5326
|
-
|
|
5352
|
+
showSonnerToast({ variant: "info", title: `You will be redirected to ${url} in the real app.`, duration: 3e3 });
|
|
5353
|
+
} else {
|
|
5354
|
+
router.push(url);
|
|
5327
5355
|
}
|
|
5328
5356
|
},
|
|
5329
5357
|
[isBuilder]
|
|
5330
5358
|
);
|
|
5331
|
-
const
|
|
5332
|
-
if (
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
const formatedMenu = (0, import_react34.useMemo)(() => {
|
|
5338
|
-
if (source === "state" && navList && navList.length) {
|
|
5339
|
-
return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
|
|
5359
|
+
const formattedMenu = (0, import_react34.useMemo)(() => {
|
|
5360
|
+
if (source === "state" && navList?.length) {
|
|
5361
|
+
return navList.map((i) => ({
|
|
5362
|
+
...i,
|
|
5363
|
+
header: i.name || "Menu"
|
|
5364
|
+
}));
|
|
5340
5365
|
}
|
|
5341
|
-
return list
|
|
5342
|
-
}, [source, navList]);
|
|
5366
|
+
return list;
|
|
5367
|
+
}, [source, navList, list]);
|
|
5368
|
+
const RenderSearchInput = () => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-1 px-2", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
5369
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react18.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
|
|
5370
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5371
|
+
Input,
|
|
5372
|
+
{
|
|
5373
|
+
placeholder: "Search",
|
|
5374
|
+
className: "pl-9 text-gray-500",
|
|
5375
|
+
onKeyDown: (event) => {
|
|
5376
|
+
if (event.key === "Enter") {
|
|
5377
|
+
const query = event.target.value;
|
|
5378
|
+
onSearch?.({
|
|
5379
|
+
searchTerm: query
|
|
5380
|
+
});
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5384
|
+
)
|
|
5385
|
+
] }) });
|
|
5343
5386
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
5344
5387
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5345
5388
|
"nav",
|
|
5346
5389
|
{
|
|
5347
|
-
className: "w-full h-[75px] border-b border-
|
|
5390
|
+
className: "w-full min-h-[75px] border-b border-gray-200 dark:border-gray-800 dark:bg-gray-800 bg-white shadow-sm",
|
|
5348
5391
|
style,
|
|
5349
5392
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
|
|
5350
5393
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
@@ -5353,69 +5396,36 @@ function Navbar({
|
|
|
5353
5396
|
href: "/",
|
|
5354
5397
|
onClick: (e) => handleBuilderExit(e, "/"),
|
|
5355
5398
|
className: "flex items-center space-x-2",
|
|
5356
|
-
children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_image2.default, { src: imageUrl, alt: altText, width:
|
|
5399
|
+
children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_image2.default, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
|
|
5357
5400
|
}
|
|
5358
5401
|
),
|
|
5359
|
-
|
|
5402
|
+
isDesktop && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5360
5403
|
import_link4.default,
|
|
5361
5404
|
{
|
|
5362
|
-
href: item.url
|
|
5405
|
+
href: item.url,
|
|
5363
5406
|
onClick: (e) => handleBuilderExit(e, item.url),
|
|
5364
|
-
className: "text-sm font-medium dark:text-white
|
|
5407
|
+
className: "text-sm font-medium text-gray-600 dark:text-white hover:text-gray-900",
|
|
5365
5408
|
children: item.header
|
|
5366
5409
|
},
|
|
5367
5410
|
item.id
|
|
5368
5411
|
)) }),
|
|
5369
5412
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5373
|
-
|
|
5374
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
|
|
5375
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react18.Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
|
|
5376
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime66.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_runtime66.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
5413
|
+
(isDesktop || isTablet) && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RenderSearchInput, {}),
|
|
5414
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
|
|
5415
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react18.Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
|
|
5416
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
|
|
5377
5417
|
] }),
|
|
5378
5418
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DropdownMenu, { children: [
|
|
5379
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
5380
|
-
!
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
AvatarImage,
|
|
5384
|
-
{
|
|
5385
|
-
src: "/images/appbuilder/toolset/profile.svg",
|
|
5386
|
-
alt: "Profile"
|
|
5387
|
-
}
|
|
5388
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
|
|
5389
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5390
|
-
Button,
|
|
5391
|
-
{
|
|
5392
|
-
variant: "ghost",
|
|
5393
|
-
size: "icon",
|
|
5394
|
-
className: "text-gray-900 md:hidden dark:invert",
|
|
5395
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react18.Menu, { className: "h-6 w-6" })
|
|
5396
|
-
}
|
|
5397
|
-
)
|
|
5398
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react18.Menu, { className: "h-6 w-6" }) })
|
|
5419
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
5420
|
+
!isMobile && showName && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
|
|
5421
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "bg-green-700 text-white h-full w-full rounded-full flex items-center justify-center text-xs", children: getInitials(userName) }) }),
|
|
5422
|
+
(isMobile || isTablet) && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react18.Menu, { className: "h-6 w-6" }) })
|
|
5399
5423
|
] }) }),
|
|
5400
5424
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
|
|
5401
|
-
profileMenu
|
|
5402
|
-
|
|
5403
|
-
{
|
|
5404
|
-
|
|
5405
|
-
onClick: (e) => handleBuilderExit(e, item.url),
|
|
5406
|
-
children: item.header
|
|
5407
|
-
}
|
|
5408
|
-
) }, item.id)) }),
|
|
5409
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "md:hidden", children: [
|
|
5410
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
|
|
5411
|
-
formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5412
|
-
import_link4.default,
|
|
5413
|
-
{
|
|
5414
|
-
href: item.url || "#",
|
|
5415
|
-
onClick: (e) => handleBuilderExit(e, item.url),
|
|
5416
|
-
children: item.header
|
|
5417
|
-
}
|
|
5418
|
-
) }, item.id)) })
|
|
5425
|
+
profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_link4.default, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
|
|
5426
|
+
(isMobile || isTablet) && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
5427
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuSeparator, {}),
|
|
5428
|
+
formattedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_link4.default, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
|
|
5419
5429
|
] })
|
|
5420
5430
|
] })
|
|
5421
5431
|
] })
|
|
@@ -5423,16 +5433,7 @@ function Navbar({
|
|
|
5423
5433
|
] })
|
|
5424
5434
|
}
|
|
5425
5435
|
),
|
|
5426
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5427
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DialogHeader, { children: [
|
|
5428
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogTitle, { children: "Exit Builder?" }),
|
|
5429
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
|
|
5430
|
-
] }),
|
|
5431
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DialogFooter, { children: [
|
|
5432
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
|
|
5433
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
|
|
5434
|
-
] })
|
|
5435
|
-
] }) })
|
|
5436
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "p-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RenderSearchInput, {}) })
|
|
5436
5437
|
] });
|
|
5437
5438
|
}
|
|
5438
5439
|
|