@kopexa/sidebar 1.0.0 → 1.0.2

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.
@@ -467,6 +467,7 @@ var Sidebar = Object.assign(SidebarRoot, {
467
467
  });
468
468
 
469
469
  export {
470
+ useSidebar,
470
471
  SidebarProvider,
471
472
  Sidebar
472
473
  };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTriggerProps } from './sidebar.mjs';
1
+ export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTriggerProps, useSidebar } from './sidebar.mjs';
2
2
  import 'react/jsx-runtime';
3
3
  import '@kopexa/button';
4
4
  import '@kopexa/input';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTriggerProps } from './sidebar.js';
1
+ export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTriggerProps, useSidebar } from './sidebar.js';
2
2
  import 'react/jsx-runtime';
3
3
  import '@kopexa/button';
4
4
  import '@kopexa/input';
package/dist/index.js CHANGED
@@ -22,7 +22,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  var index_exports = {};
23
23
  __export(index_exports, {
24
24
  Sidebar: () => Sidebar,
25
- SidebarProvider: () => SidebarProvider
25
+ SidebarProvider: () => SidebarProvider,
26
+ useSidebar: () => useSidebar
26
27
  });
27
28
  module.exports = __toCommonJS(index_exports);
28
29
 
@@ -485,5 +486,6 @@ var Sidebar = Object.assign(SidebarRoot, {
485
486
  // Annotate the CommonJS export names for ESM import in node:
486
487
  0 && (module.exports = {
487
488
  Sidebar,
488
- SidebarProvider
489
+ SidebarProvider,
490
+ useSidebar
489
491
  });
package/dist/index.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  Sidebar,
4
- SidebarProvider
5
- } from "./chunk-P6UXLJY7.mjs";
4
+ SidebarProvider,
5
+ useSidebar
6
+ } from "./chunk-QR6MW6DK.mjs";
6
7
  export {
7
8
  Sidebar,
8
- SidebarProvider
9
+ SidebarProvider,
10
+ useSidebar
9
11
  };
@@ -2,9 +2,21 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { IconButton } from '@kopexa/button';
3
3
  import { Input } from '@kopexa/input';
4
4
  import { Separator } from '@kopexa/separator';
5
- import { SidebarMenuButtonVariantProps } from '@kopexa/theme';
5
+ import { SidebarMenuButtonVariantProps, sidebar } from '@kopexa/theme';
6
6
  import { ComponentProps, ReactNode } from 'react';
7
7
 
8
+ type SidebarContextProps = {
9
+ state: "expanded" | "collapsed";
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ openMobile: boolean;
13
+ setOpenMobile: (open: boolean) => void;
14
+ isMobile: boolean;
15
+ toggleSidebar: () => void;
16
+ styles: ReturnType<typeof sidebar>;
17
+ };
18
+ declare const useSidebar: () => SidebarContextProps;
19
+
8
20
  type SidebarProviderProps = ComponentProps<"div"> & {
9
21
  defaultOpen?: boolean;
10
22
  open?: boolean;
@@ -81,4 +93,4 @@ declare const Sidebar: typeof SidebarRoot & {
81
93
  MenuAction: typeof SidebarMenuAction;
82
94
  };
83
95
 
84
- export { Sidebar, type SidebarContentProps, type SidebarGroupActionProps, type SidebarGroupContentProps, type SidebarGroupLabelProps, type SidebarGroupProps, type SidebarInsetProps, type SidebarMenuActionProps, type SidebarMenuButtonProps, type SidebarMenuItemProps, type SidebarMenuProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRailProps, type SidebarSeparatorProps, type SidebarTriggerProps };
96
+ export { Sidebar, type SidebarContentProps, type SidebarGroupActionProps, type SidebarGroupContentProps, type SidebarGroupLabelProps, type SidebarGroupProps, type SidebarInsetProps, type SidebarMenuActionProps, type SidebarMenuButtonProps, type SidebarMenuItemProps, type SidebarMenuProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRailProps, type SidebarSeparatorProps, type SidebarTriggerProps, useSidebar };
package/dist/sidebar.d.ts CHANGED
@@ -2,9 +2,21 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { IconButton } from '@kopexa/button';
3
3
  import { Input } from '@kopexa/input';
4
4
  import { Separator } from '@kopexa/separator';
5
- import { SidebarMenuButtonVariantProps } from '@kopexa/theme';
5
+ import { SidebarMenuButtonVariantProps, sidebar } from '@kopexa/theme';
6
6
  import { ComponentProps, ReactNode } from 'react';
7
7
 
8
+ type SidebarContextProps = {
9
+ state: "expanded" | "collapsed";
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ openMobile: boolean;
13
+ setOpenMobile: (open: boolean) => void;
14
+ isMobile: boolean;
15
+ toggleSidebar: () => void;
16
+ styles: ReturnType<typeof sidebar>;
17
+ };
18
+ declare const useSidebar: () => SidebarContextProps;
19
+
8
20
  type SidebarProviderProps = ComponentProps<"div"> & {
9
21
  defaultOpen?: boolean;
10
22
  open?: boolean;
@@ -81,4 +93,4 @@ declare const Sidebar: typeof SidebarRoot & {
81
93
  MenuAction: typeof SidebarMenuAction;
82
94
  };
83
95
 
84
- export { Sidebar, type SidebarContentProps, type SidebarGroupActionProps, type SidebarGroupContentProps, type SidebarGroupLabelProps, type SidebarGroupProps, type SidebarInsetProps, type SidebarMenuActionProps, type SidebarMenuButtonProps, type SidebarMenuItemProps, type SidebarMenuProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRailProps, type SidebarSeparatorProps, type SidebarTriggerProps };
96
+ export { Sidebar, type SidebarContentProps, type SidebarGroupActionProps, type SidebarGroupContentProps, type SidebarGroupLabelProps, type SidebarGroupProps, type SidebarInsetProps, type SidebarMenuActionProps, type SidebarMenuButtonProps, type SidebarMenuItemProps, type SidebarMenuProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRailProps, type SidebarSeparatorProps, type SidebarTriggerProps, useSidebar };
package/dist/sidebar.js CHANGED
@@ -22,7 +22,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  var sidebar_exports = {};
23
23
  __export(sidebar_exports, {
24
24
  Sidebar: () => Sidebar,
25
- SidebarProvider: () => SidebarProvider
25
+ SidebarProvider: () => SidebarProvider,
26
+ useSidebar: () => useSidebar
26
27
  });
27
28
  module.exports = __toCommonJS(sidebar_exports);
28
29
  var import_button = require("@kopexa/button");
@@ -483,5 +484,6 @@ var Sidebar = Object.assign(SidebarRoot, {
483
484
  // Annotate the CommonJS export names for ESM import in node:
484
485
  0 && (module.exports = {
485
486
  Sidebar,
486
- SidebarProvider
487
+ SidebarProvider,
488
+ useSidebar
487
489
  });
package/dist/sidebar.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  Sidebar,
4
- SidebarProvider
5
- } from "./chunk-P6UXLJY7.mjs";
4
+ SidebarProvider,
5
+ useSidebar
6
+ } from "./chunk-QR6MW6DK.mjs";
6
7
  export {
7
8
  Sidebar,
8
- SidebarProvider
9
+ SidebarProvider,
10
+ useSidebar
9
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/sidebar",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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": "1.6.0"
31
+ "@kopexa/theme": "1.6.1"
32
32
  },
33
33
  "dependencies": {
34
34
  "@radix-ui/react-slot": "^1.2.3",
35
- "@kopexa/button": "7.0.0",
36
- "@kopexa/icons": "9.0.0",
37
- "@kopexa/input": "2.0.0",
35
+ "@kopexa/button": "7.0.1",
36
+ "@kopexa/icons": "9.0.1",
37
+ "@kopexa/input": "2.0.1",
38
38
  "@kopexa/react-utils": "2.0.6",
39
- "@kopexa/separator": "1.0.0",
39
+ "@kopexa/separator": "1.0.1",
40
40
  "@kopexa/shared-utils": "1.1.5",
41
- "@kopexa/tooltip": "5.0.0",
41
+ "@kopexa/tooltip": "5.0.1",
42
42
  "@kopexa/use-is-mobile": "0.0.1",
43
- "@kopexa/drawer": "9.0.0"
43
+ "@kopexa/drawer": "9.0.1"
44
44
  },
45
45
  "clean-package": "../../../clean-package.config.json",
46
46
  "module": "dist/index.mjs",