@kopexa/sidebar 17.1.73 → 17.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ "use client";
3
+ import {
4
+ SidebarV2
5
+ } from "../chunk-WA2NSEYE.mjs";
6
+ import {
7
+ AppShell,
8
+ AppShellAside,
9
+ AppShellHeader,
10
+ AppShellMain,
11
+ AppShellPanelContent,
12
+ AppShellRoot
13
+ } from "../chunk-PZFEB2PM.mjs";
14
+ import {
15
+ SidebarV2FromConfig
16
+ } from "../chunk-CMYTESJM.mjs";
17
+ import {
18
+ SidebarV2Inset,
19
+ SidebarV2Panel,
20
+ SidebarV2PanelGroup,
21
+ SidebarV2PanelItems,
22
+ SidebarV2PanelLabel,
23
+ SidebarV2PanelLeaf,
24
+ SidebarV2Rail,
25
+ SidebarV2RailItem,
26
+ SidebarV2RailLink,
27
+ SidebarV2RailSpacer,
28
+ SidebarV2Trigger,
29
+ SidebarV2Workspace
30
+ } from "../chunk-EIXUCY5M.mjs";
31
+ import "../chunk-SDMGFB6V.mjs";
32
+ import {
33
+ SidebarV2Provider,
34
+ useSidebarV2
35
+ } from "../chunk-3L2F566G.mjs";
36
+ export {
37
+ AppShell,
38
+ AppShellAside,
39
+ AppShellHeader,
40
+ AppShellMain,
41
+ AppShellPanelContent,
42
+ AppShellRoot,
43
+ SidebarV2,
44
+ SidebarV2FromConfig,
45
+ SidebarV2Inset,
46
+ SidebarV2Panel,
47
+ SidebarV2PanelGroup,
48
+ SidebarV2PanelItems,
49
+ SidebarV2PanelLabel,
50
+ SidebarV2PanelLeaf,
51
+ SidebarV2Provider,
52
+ SidebarV2Rail,
53
+ SidebarV2RailItem,
54
+ SidebarV2RailLink,
55
+ SidebarV2RailSpacer,
56
+ SidebarV2Trigger,
57
+ SidebarV2Workspace,
58
+ useSidebarV2
59
+ };
@@ -0,0 +1,80 @@
1
+ import { ReactNode, ComponentType } from 'react';
2
+
3
+ /** An icon component receiving a className (matches @kopexa/icons signature). */
4
+ type SidebarV2Icon = ComponentType<{
5
+ className?: string;
6
+ }>;
7
+ /** Props handed to a host-provided link renderer. */
8
+ type SidebarV2LinkProps = {
9
+ href: string;
10
+ className?: string;
11
+ children: ReactNode;
12
+ /** Present so the host can forward aria-current / data-active if desired. */
13
+ "data-active"?: boolean;
14
+ /** Set to "page" on the active link for assistive tech. */
15
+ "aria-current"?: "page";
16
+ /** Accessible name — important for icon-only rail links. */
17
+ "aria-label"?: string;
18
+ /** Forwarded to the rendered link; fires before host navigation. */
19
+ onClick?: () => void;
20
+ };
21
+ /** Level-3 entry: a sub-view of an entity. Text only, navigates. */
22
+ type SidebarV2SubItem = {
23
+ label: string;
24
+ href: string;
25
+ };
26
+ /** A static section heading inside a panel (non-interactive). */
27
+ type SidebarV2PanelSection = {
28
+ section: string;
29
+ };
30
+ /** Level-2 entry inside a panel: a leaf link, an accordion group, or a section. */
31
+ type SidebarV2PanelItem = {
32
+ label: string;
33
+ href: string;
34
+ icon?: SidebarV2Icon;
35
+ badge?: number | string;
36
+ /** Stable key; defaults to href. */
37
+ value?: string;
38
+ } | {
39
+ label: string;
40
+ icon?: SidebarV2Icon;
41
+ /** Stable key for accordion state; defaults to label. */
42
+ value?: string;
43
+ children: SidebarV2SubItem[];
44
+ } | SidebarV2PanelSection;
45
+ /** A rail entry. Mixed types: link (navigates), panel (opens sub-area), action. */
46
+ type SidebarV2RailEntry = {
47
+ type: "link";
48
+ icon: SidebarV2Icon;
49
+ label: string;
50
+ href: string;
51
+ badge?: number | string;
52
+ slot?: "top" | "bottom";
53
+ } | {
54
+ type: "action";
55
+ icon: SidebarV2Icon;
56
+ label: string;
57
+ onSelect: () => void;
58
+ slot?: "top" | "bottom";
59
+ } | {
60
+ type: "panel";
61
+ icon: SidebarV2Icon;
62
+ label: string;
63
+ /** Stable key; defaults to label. */
64
+ value?: string;
65
+ title?: string;
66
+ subtitle?: string;
67
+ items: SidebarV2PanelItem[];
68
+ slot?: "top" | "bottom";
69
+ } | {
70
+ /** A horizontal divider in the rail (visual grouping). */
71
+ type: "divider";
72
+ slot?: "top" | "bottom";
73
+ };
74
+ type SidebarV2Nav = SidebarV2RailEntry[];
75
+ declare function panelItemHasChildren(item: SidebarV2PanelItem): item is Extract<SidebarV2PanelItem, {
76
+ children: SidebarV2SubItem[];
77
+ }>;
78
+ declare function panelItemIsSection(item: SidebarV2PanelItem): item is SidebarV2PanelSection;
79
+
80
+ export { type SidebarV2Icon, type SidebarV2LinkProps, type SidebarV2Nav, type SidebarV2PanelItem, type SidebarV2PanelSection, type SidebarV2RailEntry, type SidebarV2SubItem, panelItemHasChildren, panelItemIsSection };
@@ -0,0 +1,80 @@
1
+ import { ReactNode, ComponentType } from 'react';
2
+
3
+ /** An icon component receiving a className (matches @kopexa/icons signature). */
4
+ type SidebarV2Icon = ComponentType<{
5
+ className?: string;
6
+ }>;
7
+ /** Props handed to a host-provided link renderer. */
8
+ type SidebarV2LinkProps = {
9
+ href: string;
10
+ className?: string;
11
+ children: ReactNode;
12
+ /** Present so the host can forward aria-current / data-active if desired. */
13
+ "data-active"?: boolean;
14
+ /** Set to "page" on the active link for assistive tech. */
15
+ "aria-current"?: "page";
16
+ /** Accessible name — important for icon-only rail links. */
17
+ "aria-label"?: string;
18
+ /** Forwarded to the rendered link; fires before host navigation. */
19
+ onClick?: () => void;
20
+ };
21
+ /** Level-3 entry: a sub-view of an entity. Text only, navigates. */
22
+ type SidebarV2SubItem = {
23
+ label: string;
24
+ href: string;
25
+ };
26
+ /** A static section heading inside a panel (non-interactive). */
27
+ type SidebarV2PanelSection = {
28
+ section: string;
29
+ };
30
+ /** Level-2 entry inside a panel: a leaf link, an accordion group, or a section. */
31
+ type SidebarV2PanelItem = {
32
+ label: string;
33
+ href: string;
34
+ icon?: SidebarV2Icon;
35
+ badge?: number | string;
36
+ /** Stable key; defaults to href. */
37
+ value?: string;
38
+ } | {
39
+ label: string;
40
+ icon?: SidebarV2Icon;
41
+ /** Stable key for accordion state; defaults to label. */
42
+ value?: string;
43
+ children: SidebarV2SubItem[];
44
+ } | SidebarV2PanelSection;
45
+ /** A rail entry. Mixed types: link (navigates), panel (opens sub-area), action. */
46
+ type SidebarV2RailEntry = {
47
+ type: "link";
48
+ icon: SidebarV2Icon;
49
+ label: string;
50
+ href: string;
51
+ badge?: number | string;
52
+ slot?: "top" | "bottom";
53
+ } | {
54
+ type: "action";
55
+ icon: SidebarV2Icon;
56
+ label: string;
57
+ onSelect: () => void;
58
+ slot?: "top" | "bottom";
59
+ } | {
60
+ type: "panel";
61
+ icon: SidebarV2Icon;
62
+ label: string;
63
+ /** Stable key; defaults to label. */
64
+ value?: string;
65
+ title?: string;
66
+ subtitle?: string;
67
+ items: SidebarV2PanelItem[];
68
+ slot?: "top" | "bottom";
69
+ } | {
70
+ /** A horizontal divider in the rail (visual grouping). */
71
+ type: "divider";
72
+ slot?: "top" | "bottom";
73
+ };
74
+ type SidebarV2Nav = SidebarV2RailEntry[];
75
+ declare function panelItemHasChildren(item: SidebarV2PanelItem): item is Extract<SidebarV2PanelItem, {
76
+ children: SidebarV2SubItem[];
77
+ }>;
78
+ declare function panelItemIsSection(item: SidebarV2PanelItem): item is SidebarV2PanelSection;
79
+
80
+ export { type SidebarV2Icon, type SidebarV2LinkProps, type SidebarV2Nav, type SidebarV2PanelItem, type SidebarV2PanelSection, type SidebarV2RailEntry, type SidebarV2SubItem, panelItemHasChildren, panelItemIsSection };
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/v2/types.ts
22
+ var types_exports = {};
23
+ __export(types_exports, {
24
+ panelItemHasChildren: () => panelItemHasChildren,
25
+ panelItemIsSection: () => panelItemIsSection
26
+ });
27
+ module.exports = __toCommonJS(types_exports);
28
+ function panelItemHasChildren(item) {
29
+ return "children" in item && Array.isArray(item.children);
30
+ }
31
+ function panelItemIsSection(item) {
32
+ return "section" in item;
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ panelItemHasChildren,
37
+ panelItemIsSection
38
+ });
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ panelItemHasChildren,
4
+ panelItemIsSection
5
+ } from "../chunk-SDMGFB6V.mjs";
6
+ export {
7
+ panelItemHasChildren,
8
+ panelItemIsSection
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/sidebar",
3
- "version": "17.1.73",
3
+ "version": "17.2.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "sidebar"
@@ -28,19 +28,19 @@
28
28
  "motion": ">=12.23.6",
29
29
  "react": ">=19.0.0-rc.0",
30
30
  "react-dom": ">=19.0.0-rc.0",
31
- "@kopexa/theme": "17.32.3"
31
+ "@kopexa/theme": "17.33.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@radix-ui/react-slot": "^1.2.4",
35
- "@kopexa/drawer": "17.2.54",
36
- "@kopexa/button": "17.0.89",
37
- "@kopexa/icons": "17.10.18",
38
- "@kopexa/react-utils": "17.1.31",
39
- "@kopexa/shared-utils": "17.0.89",
40
- "@kopexa/separator": "17.0.89",
41
- "@kopexa/input": "17.0.89",
42
- "@kopexa/use-is-mobile": "17.0.89",
43
- "@kopexa/tooltip": "17.2.54"
35
+ "@kopexa/button": "17.0.91",
36
+ "@kopexa/icons": "17.10.20",
37
+ "@kopexa/drawer": "17.2.56",
38
+ "@kopexa/input": "17.0.91",
39
+ "@kopexa/react-utils": "17.1.33",
40
+ "@kopexa/separator": "17.0.91",
41
+ "@kopexa/shared-utils": "17.0.91",
42
+ "@kopexa/tooltip": "17.2.56",
43
+ "@kopexa/use-is-mobile": "17.0.91"
44
44
  },
45
45
  "clean-package": "../../../clean-package.config.json",
46
46
  "module": "dist/index.mjs",