@ck-ui/component-library 2.0.0 → 2.0.1

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.
Files changed (70) hide show
  1. package/dist/CalendarGrid-DzsGX04L.js +240 -0
  2. package/dist/ScrollDropdown-B6iVjMy_.js +80 -0
  3. package/dist/assets/DateRangePicker-BJW-EAys.css +1 -0
  4. package/dist/assets/ScrollDropdown-zzvVGbzo.css +1 -0
  5. package/dist/assets/styles-Dz05pjuA.css +1 -0
  6. package/dist/components/DateRangePicker/Calendar/CalendarGrid.d.ts.map +1 -1
  7. package/dist/components/DateRangePicker/Calendar/CalendarGrid.js +2 -2
  8. package/dist/components/DateRangePicker/Calendar/ScrollDropdown.js +1 -1
  9. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  10. package/dist/components/DateRangePicker/DateRangePicker.js +154 -154
  11. package/dist/components/Sidebar/Sidebar.constants.d.ts +5 -0
  12. package/dist/components/Sidebar/Sidebar.constants.d.ts.map +1 -0
  13. package/dist/components/Sidebar/Sidebar.constants.js +7 -0
  14. package/dist/components/Sidebar/Sidebar.d.ts +7 -0
  15. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  16. package/dist/components/Sidebar/Sidebar.js +46 -0
  17. package/dist/components/Sidebar/Sidebar.types.d.ts +52 -0
  18. package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -0
  19. package/dist/components/Sidebar/Sidebar.types.js +1 -0
  20. package/dist/components/Sidebar/Sidebar.utils.d.ts +7 -0
  21. package/dist/components/Sidebar/Sidebar.utils.d.ts.map +1 -0
  22. package/dist/components/Sidebar/Sidebar.utils.js +48 -0
  23. package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts +12 -0
  24. package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts.map +1 -0
  25. package/dist/components/Sidebar/components/CollapsedTooltip/index.js +35 -0
  26. package/dist/components/Sidebar/components/ContactUsButton/index.d.ts +8 -0
  27. package/dist/components/Sidebar/components/ContactUsButton/index.d.ts.map +1 -0
  28. package/dist/components/Sidebar/components/ContactUsButton/index.js +14 -0
  29. package/dist/components/Sidebar/components/ExploreSection/index.d.ts +11 -0
  30. package/dist/components/Sidebar/components/ExploreSection/index.d.ts.map +1 -0
  31. package/dist/components/Sidebar/components/ExploreSection/index.js +22 -0
  32. package/dist/components/Sidebar/components/GptCard/index.d.ts +14 -0
  33. package/dist/components/Sidebar/components/GptCard/index.d.ts.map +1 -0
  34. package/dist/components/Sidebar/components/GptCard/index.js +22 -0
  35. package/dist/components/Sidebar/components/IconRenderer/index.d.ts +7 -0
  36. package/dist/components/Sidebar/components/IconRenderer/index.d.ts.map +1 -0
  37. package/dist/components/Sidebar/components/IconRenderer/index.js +16 -0
  38. package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts +13 -0
  39. package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts.map +1 -0
  40. package/dist/components/Sidebar/components/MenuItemWrapper/index.js +44 -0
  41. package/dist/components/Sidebar/components/MenuRenderer/index.d.ts +12 -0
  42. package/dist/components/Sidebar/components/MenuRenderer/index.d.ts.map +1 -0
  43. package/dist/components/Sidebar/components/MenuRenderer/index.js +77 -0
  44. package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts +11 -0
  45. package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts.map +1 -0
  46. package/dist/components/Sidebar/components/ModuleSwitchButton/index.js +18 -0
  47. package/dist/components/Sidebar/components/SectionLabel/index.d.ts +5 -0
  48. package/dist/components/Sidebar/components/SectionLabel/index.d.ts.map +1 -0
  49. package/dist/components/Sidebar/components/SectionLabel/index.js +8 -0
  50. package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts +15 -0
  51. package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts.map +1 -0
  52. package/dist/components/Sidebar/components/SubMenuWrapper/index.js +35 -0
  53. package/dist/components/Sidebar/hooks/useActiveDetection.d.ts +11 -0
  54. package/dist/components/Sidebar/hooks/useActiveDetection.d.ts.map +1 -0
  55. package/dist/components/Sidebar/hooks/useActiveDetection.js +15 -0
  56. package/dist/components/Sidebar/hooks/useMenuState.d.ts +9 -0
  57. package/dist/components/Sidebar/hooks/useMenuState.d.ts.map +1 -0
  58. package/dist/components/Sidebar/hooks/useMenuState.js +51 -0
  59. package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts +7 -0
  60. package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts.map +1 -0
  61. package/dist/components/Sidebar/hooks/useModuleSwitch.js +20 -0
  62. package/dist/components/Sidebar/index.d.ts +4 -0
  63. package/dist/components/Sidebar/index.d.ts.map +1 -0
  64. package/dist/components/Sidebar/index.js +5 -0
  65. package/dist/styles.module-BIdwTiuE.js +66 -0
  66. package/package.json +1 -1
  67. package/dist/CalendarGrid-xx9nYA1_.js +0 -237
  68. package/dist/ScrollDropdown-tf6ex2lE.js +0 -80
  69. package/dist/assets/DateRangePicker-DNHTCnqT.css +0 -1
  70. package/dist/assets/ScrollDropdown-CQTxVikn.css +0 -1
@@ -0,0 +1,7 @@
1
+ import { SidebarMenuItem } from './Sidebar.types';
2
+ export declare function normalizeUrl(url: string | undefined): string;
3
+ export declare function isItemActive(item: SidebarMenuItem, currentPath: string, allItems: SidebarMenuItem[]): boolean;
4
+ export declare function isTreeActive(item: SidebarMenuItem, currentPath: string, allItems: SidebarMenuItem[]): boolean;
5
+ export declare function capitalizeFirstLetter(str: string): string;
6
+ export declare function addBreakOpportunities(text: string | undefined): string;
7
+ //# sourceMappingURL=Sidebar.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.utils.d.ts","sourceRoot":"","sources":["../../../lib/components/Sidebar/Sidebar.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ5D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GACtE,OAAO,CAqBT;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GACtE,OAAO,CAGT;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAEtE"}
@@ -0,0 +1,48 @@
1
+ function a(e) {
2
+ if (!e) return "";
3
+ let r = e.toLowerCase();
4
+ if (r.startsWith("http"))
5
+ try {
6
+ r = new URL(r).pathname.toLowerCase();
7
+ } catch {
8
+ }
9
+ return r = r.split("?")[0], r.endsWith("/") ? r.slice(0, -1) : r;
10
+ }
11
+ function l(e, r, n) {
12
+ if (e.name === "Customers" && e.dashboardServices?.length)
13
+ return r.toLowerCase().includes("dashboard/customers");
14
+ const t = a(e.url), s = a(r);
15
+ if (!t) return !1;
16
+ if (s === t) return !0;
17
+ if (!e.exactMatch && s.startsWith(`${t}/`)) {
18
+ let u = !1;
19
+ const c = (f) => {
20
+ for (const i of f) {
21
+ const o = a(i.url);
22
+ if (o && o !== t && s === o) {
23
+ u = !0;
24
+ return;
25
+ }
26
+ i.dashboardServices?.length && c(i.dashboardServices);
27
+ }
28
+ };
29
+ return c(n), !u;
30
+ }
31
+ return !1;
32
+ }
33
+ function d(e, r, n) {
34
+ return l(e, r, n) ? !0 : e.dashboardServices?.some((t) => d(t, r, n)) ?? !1;
35
+ }
36
+ function h(e) {
37
+ return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
38
+ }
39
+ function p(e) {
40
+ return e?.split(":")?.join(":​") ?? "";
41
+ }
42
+ export {
43
+ p as addBreakOpportunities,
44
+ h as capitalizeFirstLetter,
45
+ l as isItemActive,
46
+ d as isTreeActive,
47
+ a as normalizeUrl
48
+ };
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ interface CollapsedTooltipProps {
3
+ active: boolean;
4
+ icon: ReactNode;
5
+ label?: string | null;
6
+ children: ReactNode;
7
+ popupClassName?: string;
8
+ onClick?: () => void;
9
+ }
10
+ export declare function CollapsedTooltip({ active, icon, label, children, popupClassName, onClick }: CollapsedTooltipProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/CollapsedTooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzD,UAAU,qBAAqB;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAY,EAAE,QAAQ,EAAE,cAAmB,EAAE,OAAO,EAAE,EAAE,qBAAqB,2CA4B7H"}
@@ -0,0 +1,35 @@
1
+ import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
+ import { useState as h, useRef as p } from "react";
3
+ import { s as e } from "../../../../styles.module-BIdwTiuE.js";
4
+ function $({ active: m, icon: d, label: r = null, children: f, popupClassName: v = "", onClick: a }) {
5
+ const [l, i] = h(!1), N = p(null), o = p(null), c = () => {
6
+ o.current && (clearTimeout(o.current), o.current = null), i(!0);
7
+ }, u = () => {
8
+ o.current = setTimeout(() => i(!1), 80);
9
+ };
10
+ return /* @__PURE__ */ t("div", { className: e["sidebar-popup"], ref: N, onMouseEnter: c, onMouseLeave: u, children: [
11
+ /* @__PURE__ */ t(
12
+ "div",
13
+ {
14
+ className: `${e["sidebar-menu-item"]} ${m || l ? e.active : ""}`,
15
+ onClick: a,
16
+ role: "menuitem",
17
+ tabIndex: 0,
18
+ onKeyDown: (n) => {
19
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), a?.());
20
+ },
21
+ children: [
22
+ d,
23
+ r && /* @__PURE__ */ s("span", { className: e["menu-content"], children: r })
24
+ ]
25
+ }
26
+ ),
27
+ l && /* @__PURE__ */ t("div", { className: `${e["popover-container"]} ${v}`, onMouseEnter: c, onMouseLeave: u, role: "tooltip", children: [
28
+ /* @__PURE__ */ s("div", { className: e["popover-arrow"] }),
29
+ /* @__PURE__ */ s("div", { className: e["popover-content"], children: f })
30
+ ] })
31
+ ] });
32
+ }
33
+ export {
34
+ $ as CollapsedTooltip
35
+ };
@@ -0,0 +1,8 @@
1
+ interface ContactUsButtonProps {
2
+ collapsed: boolean;
3
+ contactUsUrl?: string;
4
+ onContactUsClick?: () => void;
5
+ }
6
+ export declare function ContactUsButton({ collapsed, contactUsUrl, onContactUsClick }: ContactUsButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ContactUsButton/index.tsx"],"names":[],"mappings":"AAGA,UAAU,oBAAoB;IAAG,SAAS,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAAE;AAQ5G,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,EAAE,oBAAoB,2CAYlG"}
@@ -0,0 +1,14 @@
1
+ import { jsx as n, jsxs as s, Fragment as a } from "react/jsx-runtime";
2
+ import { IconRenderer as i } from "../IconRenderer/index.js";
3
+ import { s as t } from "../../../../styles.module-BIdwTiuE.js";
4
+ const d = /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M13.34 10.903c-.87-.87-1.94-.87-2.8 0l-.7.7c-.06.06-.13.09-.21.09-.08 0-.15-.03-.21-.09-.89-.63-1.7-1.37-2.42-2.19-.72-.82-1.32-1.71-1.78-2.67-.03-.06-.04-.12-.03-.18.01-.06.04-.11.09-.15l.7-.7c.87-.87.87-1.94 0-2.8L4.63 1.49c-.87-.87-1.94-.87-2.8 0l-.7.7C.37 2.95-.1 3.94.02 4.97c.26 2.23 1.21 4.33 2.72 6.03 1.51 1.7 3.47 2.89 5.64 3.42.41.1.83.15 1.25.15 1.05 0 2.06-.4 2.82-1.13l.7-.7c.87-.87.87-1.94 0-2.8l-1.81-1.01z", fill: "currentColor" }) });
5
+ function f({ collapsed: c, contactUsUrl: e, onContactUsClick: r }) {
6
+ const o = /* @__PURE__ */ n("span", { className: t["menu-icon"], children: /* @__PURE__ */ n(i, { icon: d }) }), l = /* @__PURE__ */ s(a, { children: [
7
+ o,
8
+ !c && /* @__PURE__ */ n("span", { children: "Contact Us" })
9
+ ] });
10
+ return e && !r ? /* @__PURE__ */ n("div", { className: t["contact-us-btn"], children: /* @__PURE__ */ n("a", { href: e, rel: "noreferrer", className: `${t["contact-us-link"]} ${c ? t["collapsed-link"] : ""}`, "aria-label": "Contact Us", children: l }) }) : /* @__PURE__ */ n("div", { className: t["contact-us-btn"], children: /* @__PURE__ */ n("button", { type: "button", onClick: r, className: `${t["contact-us-link"]} ${c ? t["collapsed-link"] : ""}`, "aria-label": "Contact Us", children: l }) });
11
+ }
12
+ export {
13
+ f as ContactUsButton
14
+ };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { ExploreItem } from '../../Sidebar.types';
3
+ interface ExploreSectionProps {
4
+ exploreList: ExploreItem[];
5
+ collapsed: boolean;
6
+ userType?: string;
7
+ cloudProviderIcons?: Record<string, ReactNode>;
8
+ }
9
+ export declare function ExploreSection({ exploreList, collapsed, userType, cloudProviderIcons }: ExploreSectionProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ExploreSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,UAAU,mBAAmB;IAAG,WAAW,EAAE,WAAW,EAAE,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAAE;AAEpJ,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,mBAAmB,kDAuB3G"}
@@ -0,0 +1,22 @@
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { SectionLabel as h } from "../SectionLabel/index.js";
3
+ import { IconRenderer as c } from "../IconRenderer/index.js";
4
+ import { s as o } from "../../../../styles.module-BIdwTiuE.js";
5
+ function u({ exploreList: l, collapsed: n, userType: t, cloudProviderIcons: d }) {
6
+ if (!l || l.length === 0) return null;
7
+ const i = t === "CLOUDONOMICS";
8
+ return /* @__PURE__ */ s("div", { className: `${o["explore-section"]} ${n ? o["explore-collapsed"] : ""}`, children: [
9
+ /* @__PURE__ */ r(h, { label: "Explore", collapsed: n }),
10
+ l.map((e) => {
11
+ const a = d?.[e.cloudProvider] || e.icon;
12
+ return /* @__PURE__ */ s("div", { className: o["explore-links"], children: [
13
+ !n && /* @__PURE__ */ r(c, { icon: a }),
14
+ !n && /* @__PURE__ */ r("span", { children: e.displayName }),
15
+ /* @__PURE__ */ r("div", { className: i ? o["cursor-not-allowed"] : "", children: /* @__PURE__ */ r("a", { href: `//${e.link}`, target: "_blank", rel: "noopener noreferrer", className: i ? o["pointer-events-none"] : "", "aria-label": `Open ${e.displayName}`, children: n ? /* @__PURE__ */ r(c, { icon: a }) : /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ r("path", { d: "M11.667 11.667H2.333V2.333H7V1H2.333C1.593 1 1 1.6 1 2.333v9.334C1 12.4 1.593 13 2.333 13h9.334C12.4 13 13 12.4 13 11.667V7h-1.333v4.667zM8.333 1v1.333h2.394L4.08 8.98l.94.94 6.647-6.647v2.394H13V1H8.333z", fill: "currentColor" }) }) }) })
16
+ ] }, e.cloudProvider);
17
+ })
18
+ ] });
19
+ }
20
+ export {
21
+ u as ExploreSection
22
+ };
@@ -0,0 +1,14 @@
1
+ import { SidebarMenuItem, GptCardProps } from '../../Sidebar.types';
2
+ import { ReactNode } from 'react';
3
+ interface GptCardWrapperProps {
4
+ item: SidebarMenuItem;
5
+ collapsed: boolean;
6
+ currentPath: string;
7
+ onNavigate: (path: string) => void;
8
+ open: boolean;
9
+ onToggle: (open: boolean) => void;
10
+ renderGptCard?: (props: GptCardProps) => ReactNode;
11
+ }
12
+ export declare function GptCardWrapper({ item, collapsed, currentPath, onNavigate, open, onToggle, renderGptCard }: GptCardWrapperProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/GptCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,mBAAmB;IAAG,IAAI,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC;CAAE;AAE3O,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,mBAAmB,kDA2B9H"}
@@ -0,0 +1,22 @@
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import { s as e } from "../../../../styles.module-BIdwTiuE.js";
3
+ function b({ item: i, collapsed: c, currentPath: o, onNavigate: n, open: s, onToggle: l, renderGptCard: d }) {
4
+ if (c) return null;
5
+ const a = o.endsWith("ck-gpt"), h = () => {
6
+ i.url ? n(i.url) : i.journey?.length && n(`/dashboard/${i.journey[0]}`);
7
+ };
8
+ return d ? /* @__PURE__ */ t("div", { className: `${e["chat-bot-btn"]} ${a ? e["gpt-disabled"] : ""}`, children: /* @__PURE__ */ t("div", { className: e["gpt-container"], children: d({ item: i, onNavigate: n, disabled: a, open: s, onToggle: l }) }) }) : /* @__PURE__ */ t("div", { className: `${e["chat-bot-btn"]} ${a ? e["gpt-disabled"] : ""}`, children: /* @__PURE__ */ r("div", { className: e["gpt-container"], children: [
9
+ /* @__PURE__ */ r("div", { className: e["gpt-header"], children: [
10
+ /* @__PURE__ */ t("span", { className: e["gpt-new-tag"], children: "★ New" }),
11
+ /* @__PURE__ */ t("button", { type: "button", className: e["gpt-toggle-btn"], onClick: () => l(!s), "aria-expanded": s, "aria-label": "Toggle GPT card", children: s ? /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ t("path", { d: "M3 5L7 9L11 5", stroke: "#6B7280", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ t("path", { d: "M3 9L7 5L11 9", stroke: "#6B7280", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
12
+ ] }),
13
+ /* @__PURE__ */ r("div", { className: e["gpt-body"], style: { maxHeight: s ? "140px" : "0", opacity: s ? 1 : 0, overflow: "hidden", transition: "max-height 300ms ease, opacity 300ms ease" }, children: [
14
+ /* @__PURE__ */ t("p", { className: e["gpt-title"], children: "Lens GPT" }),
15
+ /* @__PURE__ */ t("div", { className: e["gpt-icons-row"], children: /* @__PURE__ */ t("span", { className: e["gpt-subtitle"], children: "AI Powered Insights" }) })
16
+ ] }),
17
+ /* @__PURE__ */ t("button", { type: "button", className: e["gpt-start-btn"], onClick: h, disabled: a, children: "Start Chat" })
18
+ ] }) });
19
+ }
20
+ export {
21
+ b as GptCardWrapper
22
+ };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface IconRendererProps {
3
+ icon: string | ReactNode | undefined;
4
+ }
5
+ export declare function IconRenderer({ icon }: IconRendererProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/IconRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACtC;AAWD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAavD"}
@@ -0,0 +1,16 @@
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { useState as h } from "react";
3
+ import { s as t } from "../../../../styles.module-BIdwTiuE.js";
4
+ const o = /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
5
+ /* @__PURE__ */ r("rect", { x: "1", y: "1", width: "6", height: "6", rx: "1.5", stroke: "currentColor", strokeWidth: "1.4" }),
6
+ /* @__PURE__ */ r("rect", { x: "9", y: "1", width: "6", height: "6", rx: "1.5", stroke: "currentColor", strokeWidth: "1.4" }),
7
+ /* @__PURE__ */ r("rect", { x: "1", y: "9", width: "6", height: "6", rx: "1.5", stroke: "currentColor", strokeWidth: "1.4" }),
8
+ /* @__PURE__ */ r("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1.5", stroke: "currentColor", strokeWidth: "1.4" })
9
+ ] });
10
+ function l({ icon: e }) {
11
+ const [s, i] = h(!1);
12
+ return e ? typeof e == "string" ? s ? /* @__PURE__ */ r("span", { className: t["icon-node"], children: o }) : /* @__PURE__ */ r("img", { src: e, alt: "", className: t["icon-img"], "aria-hidden": "true", onError: () => i(!0) }) : /* @__PURE__ */ r("span", { className: t["icon-node"], children: e }) : /* @__PURE__ */ r("span", { className: t["icon-node"], children: o });
13
+ }
14
+ export {
15
+ l as IconRenderer
16
+ };
@@ -0,0 +1,13 @@
1
+ import { SidebarMenuItem } from '../../Sidebar.types';
2
+ interface MenuItemWrapperProps {
3
+ item: SidebarMenuItem;
4
+ active: boolean;
5
+ collapsed: boolean;
6
+ icon?: boolean;
7
+ level?: number;
8
+ onNavigate: (path: string) => void;
9
+ onMenuItemClick?: (item: SidebarMenuItem) => void;
10
+ }
11
+ export declare function MenuItemWrapper({ item, active, collapsed, icon, level, onNavigate, onMenuItemClick, }: MenuItemWrapperProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/MenuItemWrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,UAAU,oBAAoB;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAW,EAAE,KAAS,EAAE,UAAU,EAAE,eAAe,GAC7E,EAAE,oBAAoB,2CAsCtB"}
@@ -0,0 +1,44 @@
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import { IconRenderer as f } from "../IconRenderer/index.js";
3
+ import { addBreakOpportunities as N } from "../../Sidebar.utils.js";
4
+ import { s as e } from "../../../../styles.module-BIdwTiuE.js";
5
+ function $({
6
+ item: n,
7
+ active: s,
8
+ collapsed: i,
9
+ icon: c = !0,
10
+ level: t = 0,
11
+ onNavigate: m,
12
+ onMenuItemClick: d
13
+ }) {
14
+ const a = () => {
15
+ n.url && m(n.url), d?.(n);
16
+ }, p = t > 0 && s, l = t > 0 ? 15 + (t - 1) * 16 : 0;
17
+ return /* @__PURE__ */ u(
18
+ "div",
19
+ {
20
+ className: `${e["sidebar-menu-item"]} ${e["leaf-item"]} ${s ? e.active : ""}`,
21
+ onClick: a,
22
+ onKeyDown: (o) => {
23
+ (o.key === "Enter" || o.key === " ") && (o.preventDefault(), a());
24
+ },
25
+ role: "menuitem",
26
+ tabIndex: 0,
27
+ "aria-current": s ? "page" : void 0,
28
+ children: [
29
+ p && /* @__PURE__ */ r(
30
+ "span",
31
+ {
32
+ className: e["active-indicator"],
33
+ style: { left: `-${l}px` }
34
+ }
35
+ ),
36
+ c && /* @__PURE__ */ r("span", { className: e["menu-icon"], children: /* @__PURE__ */ r(f, { icon: n.icon }) }),
37
+ !i && /* @__PURE__ */ r("span", { className: e["menu-content"], children: N(n.name) })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ export {
43
+ $ as MenuItemWrapper
44
+ };
@@ -0,0 +1,12 @@
1
+ import { SidebarMenuItem as MenuItem } from '../../Sidebar.types';
2
+ interface MenuRendererProps {
3
+ menuItems: MenuItem[];
4
+ currentPath: string;
5
+ collapsed: boolean;
6
+ multicloudExploreList?: unknown[];
7
+ onNavigate: (path: string) => void;
8
+ onMenuItemClick?: (item: MenuItem) => void;
9
+ }
10
+ export declare function MenuRenderer({ menuItems, currentPath, collapsed, multicloudExploreList, onNavigate, onMenuItemClick }: MenuRendererProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/MenuRenderer/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAYvE,UAAU,iBAAiB;IACzB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,EAAE,CAAC;IAClC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,iBAAiB,2CA4GxI"}
@@ -0,0 +1,77 @@
1
+ import { jsx as n, jsxs as v } from "react/jsx-runtime";
2
+ import { useMemo as W, useCallback as f } from "react";
3
+ import { MenuItemWrapper as g } from "../MenuItemWrapper/index.js";
4
+ import { SubMenuWrapper as A } from "../SubMenuWrapper/index.js";
5
+ import { CollapsedTooltip as b } from "../CollapsedTooltip/index.js";
6
+ import { IconRenderer as L } from "../IconRenderer/index.js";
7
+ import { useActiveDetection as B } from "../../hooks/useActiveDetection.js";
8
+ import { useMenuState as K } from "../../hooks/useMenuState.js";
9
+ import { SectionLabel as O } from "../SectionLabel/index.js";
10
+ import { MULTICLOUD_VIEW_KEY as N, CHAT_BOT_KEY as _ } from "../../Sidebar.constants.js";
11
+ import { addBreakOpportunities as T } from "../../Sidebar.utils.js";
12
+ import { s as o } from "../../../../styles.module-BIdwTiuE.js";
13
+ function Q({ menuItems: d, currentPath: S, collapsed: t, multicloudExploreList: y, onNavigate: i, onMenuItemClick: l }) {
14
+ const { isActive: c, isTreeActive: p } = B({ currentPath: S, allItems: d }), { openByLevel: w, toggleMenu: C } = K({ menuItems: d, currentPath: S }), k = W(
15
+ () => d.filter((e) => e.dashboardServices && e.dashboardServices.length > 0),
16
+ [d]
17
+ ), u = f((e, a) => {
18
+ const r = e.dashboardServices && e.dashboardServices.length > 0, s = p(e);
19
+ return r ? /* @__PURE__ */ n(b, { active: s, icon: /* @__PURE__ */ n("span", { className: o["menu-icon"], children: /* @__PURE__ */ n(L, { icon: e.icon }) }), popupClassName: a <= 1 ? o["single-child-popover"] : "", children: /* @__PURE__ */ v("div", { className: o["popover-menu"], children: [
20
+ /* @__PURE__ */ n("div", { className: o["popover-title"], children: e.name }),
21
+ /* @__PURE__ */ n("div", { className: o["popover-children"], children: e.dashboardServices.map((m) => x(m)) })
22
+ ] }) }, e.name) : /* @__PURE__ */ n(b, { active: c(e), icon: /* @__PURE__ */ n("span", { className: o["menu-icon"], children: /* @__PURE__ */ n(L, { icon: e.icon }) }), onClick: () => {
23
+ e.url && i(e.url), l?.(e);
24
+ }, children: /* @__PURE__ */ n("div", { className: o["popover-title-single"], children: e.name }) }, e.name);
25
+ }, [c, p, i, l]), x = f((e) => e.dashboardServices && e.dashboardServices.length > 0 ? /* @__PURE__ */ v("div", { className: o["popover-child-with-sub"], children: [
26
+ /* @__PURE__ */ n(b, { active: p(e), icon: null, label: e.name, popupClassName: o["nested-popover"], children: /* @__PURE__ */ v("div", { className: o["popover-menu"], children: [
27
+ /* @__PURE__ */ n("div", { className: o["popover-title"], children: e.name }),
28
+ /* @__PURE__ */ n("div", { className: o["popover-children"], children: e.dashboardServices.map((r) => /* @__PURE__ */ n(
29
+ "div",
30
+ {
31
+ className: `${o["popover-child-item"]} ${c(r) ? o.active : ""}`,
32
+ onClick: () => {
33
+ r.url && i(r.url), l?.(r);
34
+ },
35
+ onKeyDown: (s) => {
36
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), r.url && i(r.url), l?.(r));
37
+ },
38
+ role: "menuitem",
39
+ tabIndex: 0,
40
+ children: T(r.name)
41
+ },
42
+ r.name
43
+ )) })
44
+ ] }) }),
45
+ /* @__PURE__ */ n("span", { className: o["popover-child-arrow"], children: /* @__PURE__ */ n("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M1 1L5 5L1 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
46
+ ] }, e.name) : /* @__PURE__ */ n(
47
+ "div",
48
+ {
49
+ className: `${o["popover-child-item"]} ${c(e) ? o.active : ""}`,
50
+ onClick: () => {
51
+ e.url && i(e.url), l?.(e);
52
+ },
53
+ onKeyDown: (r) => {
54
+ (r.key === "Enter" || r.key === " ") && (r.preventDefault(), e.url && i(e.url), l?.(e));
55
+ },
56
+ role: "menuitem",
57
+ tabIndex: 0,
58
+ children: T(e.name)
59
+ },
60
+ e.name
61
+ ), [c, p, i, l]), h = f((e, a = 0) => {
62
+ const r = e.dashboardServices && e.dashboardServices.length > 0, s = `${a}-${e.name}`, m = !!w[s], D = p(e), $ = a === 0 && k.length === 1;
63
+ return r ? /* @__PURE__ */ n(A, { item: e, isOpen: m, active: D, collapsed: !1, level: a, isSingleTopLevel: $, onToggle: () => C(s, a, e), children: e.dashboardServices.map((E) => h(E, a + 1)) }, e.name) : /* @__PURE__ */ n(g, { item: e, active: c(e), collapsed: !1, level: a, onNavigate: i, onMenuItemClick: l }, e.name);
64
+ }, [w, c, p, C, i, l, k]);
65
+ if (y && y.length > 0 && d.length > 0) {
66
+ const e = d.filter((r) => r.key === N), a = d.filter((r) => r.key !== N);
67
+ return /* @__PURE__ */ v("nav", { className: o["menu-renderer"], role: "menu", "aria-label": "Sidebar navigation", children: [
68
+ e.map((r, s) => t ? u(r, s) : h(r, 0)),
69
+ /* @__PURE__ */ n(O, { label: "Services", collapsed: t }),
70
+ a.map((r, s) => t ? u(r, s) : h(r, 0))
71
+ ] });
72
+ }
73
+ return /* @__PURE__ */ n("nav", { className: o["menu-renderer"], role: "menu", "aria-label": "Sidebar navigation", children: d.map((e, a) => !t && e.key === _ ? null : t ? u(e, a) : h(e, 0)) });
74
+ }
75
+ export {
76
+ Q as MenuRenderer
77
+ };
@@ -0,0 +1,11 @@
1
+ import { ModuleItem } from '../../Sidebar.types';
2
+ interface ModuleSwitchButtonProps {
3
+ modules: ModuleItem[];
4
+ collapsed: boolean;
5
+ currentModuleId?: string;
6
+ userType?: string;
7
+ onModuleSwitch: (moduleName: string) => void;
8
+ }
9
+ export declare function ModuleSwitchButton({ modules, collapsed, currentModuleId, userType, onModuleSwitch }: ModuleSwitchButtonProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/ModuleSwitchButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKtD,UAAU,uBAAuB;IAAG,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAAE;AAE3K,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,uBAAuB,kDAoB5H"}
@@ -0,0 +1,18 @@
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { capitalizeFirstLetter as u } from "../../Sidebar.utils.js";
3
+ import { Tooltip as p } from "../../../Tooltip/index.js";
4
+ import { s as r } from "../../../../styles.module-BIdwTiuE.js";
5
+ function g({ modules: s, collapsed: i, currentModuleId: a, userType: d, onModuleSwitch: c }) {
6
+ if (d !== "CUSTOMER") return null;
7
+ const o = s.filter((t) => t.feEnabled && t.type === "CUSTOMER" && t.id !== a);
8
+ return o.length === 0 ? null : /* @__PURE__ */ e("div", { className: r.boxShadow, children: o.map((t) => {
9
+ const n = `Switch to ${u(t.displayName)}`, l = /* @__PURE__ */ h("button", { type: "button", className: `${r["switch-module-btn"]} ${i ? r["switch-module-collapsed"] : ""}`, onClick: () => c(t.name), "aria-label": n, children: [
10
+ !i && /* @__PURE__ */ e("span", { children: n }),
11
+ /* @__PURE__ */ e("svg", { width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", style: { marginLeft: i ? 0 : "8px" }, children: /* @__PURE__ */ e("path", { d: "M1.5 1L6.5 6L1.5 11", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
12
+ ] });
13
+ return i ? /* @__PURE__ */ e("div", { className: r["switch-module-wrapper"], children: /* @__PURE__ */ e(p, { title: n, placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: l }) }) }, t.id) : /* @__PURE__ */ e("div", { className: r["switch-module-wrapper"], children: l }, t.id);
14
+ }) });
15
+ }
16
+ export {
17
+ g as ModuleSwitchButton
18
+ };
@@ -0,0 +1,5 @@
1
+ export declare function SectionLabel({ label, collapsed }: {
2
+ label: string;
3
+ collapsed: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/SectionLabel/index.tsx"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,kDAGvF"}
@@ -0,0 +1,8 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { s } from "../../../../styles.module-BIdwTiuE.js";
3
+ function o({ label: r, collapsed: e }) {
4
+ return e ? null : /* @__PURE__ */ t("p", { className: s["sidebar-tag"], children: r });
5
+ }
6
+ export {
7
+ o as SectionLabel
8
+ };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { SidebarMenuItem } from '../../Sidebar.types';
3
+ interface SubMenuWrapperProps {
4
+ item: SidebarMenuItem;
5
+ isOpen: boolean;
6
+ active: boolean;
7
+ collapsed: boolean;
8
+ level: number;
9
+ isSingleTopLevel?: boolean;
10
+ onToggle: () => void;
11
+ children: ReactNode;
12
+ }
13
+ export declare function SubMenuWrapper({ item, isOpen, active, collapsed, level, isSingleTopLevel, onToggle, children }: SubMenuWrapperProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export {};
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Sidebar/components/SubMenuWrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAwB,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,mBAAmB,kDAsC3I"}
@@ -0,0 +1,35 @@
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { IconRenderer as h } from "../IconRenderer/index.js";
3
+ import { s as e } from "../../../../styles.module-BIdwTiuE.js";
4
+ function p({ item: t, isOpen: r, active: o, collapsed: d, level: l, isSingleTopLevel: a = !1, onToggle: c, children: m }) {
5
+ if (d) return null;
6
+ const u = !(a && r);
7
+ return /* @__PURE__ */ i("div", { className: `${e.submenu} ${r ? e["with-child"] : ""}`, children: [
8
+ /* @__PURE__ */ i(
9
+ "div",
10
+ {
11
+ className: `${e["sidebar-menu-item"]} ${o || r ? e.active : ""}`,
12
+ onClick: () => {
13
+ a && r || c();
14
+ },
15
+ onKeyDown: (s) => {
16
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), a && r || c());
17
+ },
18
+ role: "menuitem",
19
+ tabIndex: 0,
20
+ "aria-expanded": r,
21
+ children: [
22
+ l === 0 && /* @__PURE__ */ n("span", { className: e["menu-icon"], children: /* @__PURE__ */ n(h, { icon: t.icon }) }),
23
+ /* @__PURE__ */ n("span", { className: e["menu-content"], children: /* @__PURE__ */ i("span", { className: e["submenu-label"], children: [
24
+ /* @__PURE__ */ n("span", { children: t.name }),
25
+ u && /* @__PURE__ */ n("span", { className: `${e.arrow} ${r ? e.rotate : ""}`, children: /* @__PURE__ */ n("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M1 1L5 5L1 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
26
+ ] }) })
27
+ ]
28
+ }
29
+ ),
30
+ /* @__PURE__ */ n("div", { className: `${e["submenu-children"]} ${r ? e.open : ""}`, children: /* @__PURE__ */ n("div", { className: e["submenu-children-inner"], children: m }) })
31
+ ] });
32
+ }
33
+ export {
34
+ p as SubMenuWrapper
35
+ };
@@ -0,0 +1,11 @@
1
+ import { SidebarMenuItem } from '../Sidebar.types';
2
+ interface UseActiveDetectionOptions {
3
+ currentPath: string;
4
+ allItems: SidebarMenuItem[];
5
+ }
6
+ export declare function useActiveDetection({ currentPath, allItems }: UseActiveDetectionOptions): {
7
+ isActive: (item: SidebarMenuItem) => boolean;
8
+ isTreeActive: (item: SidebarMenuItem) => boolean;
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=useActiveDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActiveDetection.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/hooks/useActiveDetection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,UAAU,yBAAyB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,yBAAyB;qBAE5E,eAAe;yBAIf,eAAe;EAIzB"}
@@ -0,0 +1,15 @@
1
+ import { useCallback as c } from "react";
2
+ import { isItemActive as v, isTreeActive as A } from "../Sidebar.utils.js";
3
+ function n({ currentPath: i, allItems: e }) {
4
+ const t = c(
5
+ (o) => v(o, i, e),
6
+ [i, e]
7
+ ), s = c(
8
+ (o) => A(o, i, e),
9
+ [i, e]
10
+ );
11
+ return { isActive: t, isTreeActive: s };
12
+ }
13
+ export {
14
+ n as useActiveDetection
15
+ };
@@ -0,0 +1,9 @@
1
+ import { SidebarMenuItem } from '../Sidebar.types';
2
+ export declare function useMenuState({ menuItems, currentPath }: {
3
+ menuItems: SidebarMenuItem[];
4
+ currentPath: string;
5
+ }): {
6
+ openByLevel: Record<string, boolean>;
7
+ toggleMenu: (key: string, level: number, item: SidebarMenuItem) => void;
8
+ };
9
+ //# sourceMappingURL=useMenuState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMenuState.d.ts","sourceRoot":"","sources":["../../../../lib/components/Sidebar/hooks/useMenuState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE;IAAE,SAAS,EAAE,eAAe,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;;sBAoCpG,MAAM,SAAS,MAAM,QAAQ,eAAe;EA0BrD"}