@nextelco/common-ui 1.7.182 → 2.0.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,13 @@
1
+ import React from 'react';
2
+ import { SidebarMenuItem } from '../Sidebar/Sidebar';
3
+ export interface LayoutProps {
4
+ children: React.ReactNode;
5
+ menus: SidebarMenuItem[];
6
+ groupLabels?: Record<string, string>;
7
+ appTitle?: string;
8
+ avatar?: React.ReactNode;
9
+ onLogout?: () => void;
10
+ logoutLabel?: string;
11
+ }
12
+ declare const Layout: ({ children, menus, groupLabels, appTitle, avatar, onLogout, logoutLabel, }: LayoutProps) => React.JSX.Element;
13
+ export default Layout;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ export interface SidebarMenuItem {
3
+ to: string;
4
+ icon: React.ComponentType<{
5
+ size?: number;
6
+ className?: string;
7
+ }>;
8
+ label: string;
9
+ group?: string;
10
+ end?: boolean;
11
+ }
12
+ export interface SidebarProps {
13
+ isOpen?: boolean;
14
+ setIsOpen?: (isOpen: boolean) => void;
15
+ menus: SidebarMenuItem[];
16
+ groupLabels?: Record<string, string>;
17
+ appTitle?: string;
18
+ avatar?: React.ReactNode;
19
+ onLogout?: () => void;
20
+ logoutLabel?: string;
21
+ }
22
+ declare const Sidebar: ({ isOpen, setIsOpen, menus, groupLabels, appTitle, avatar, onLogout, logoutLabel, }: SidebarProps) => React.JSX.Element;
23
+ export default Sidebar;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface TopBarProps {
3
+ searchPlaceholder?: string;
4
+ onSearch?: (value: string) => void;
5
+ right?: React.ReactNode;
6
+ }
7
+ declare const TopBar: ({ searchPlaceholder, onSearch, right }: TopBarProps) => React.JSX.Element;
8
+ export default TopBar;
@@ -2,3 +2,9 @@ export { default as Header } from '../components/layout/Header/Header';
2
2
  export { default as Footer } from '../components/layout/Footer/Footer';
3
3
  export { default as Error } from '../components/layout/Error/Error';
4
4
  export { default as Spinner } from '../components/layout/Spinner/Spinner';
5
+ export { default as Layout } from '../components/layout/Layout/Layout';
6
+ export type { LayoutProps } from '../components/layout/Layout/Layout';
7
+ export { default as Sidebar } from '../components/layout/Sidebar/Sidebar';
8
+ export type { SidebarProps, SidebarMenuItem } from '../components/layout/Sidebar/Sidebar';
9
+ export { default as TopBar } from '../components/layout/TopBar/TopBar';
10
+ export type { TopBarProps } from '../components/layout/TopBar/TopBar';
@@ -1,4 +1,4 @@
1
1
  export { default as Modal } from '../components/molecules/Modal/Modal';
2
- export { default as Sidebar } from '../components/molecules/Sidebar/Sidebar';
2
+ export { default as SidebarDrawer } from '../components/molecules/Sidebar/Sidebar';
3
3
  export { default as MultiTagPicker, Option, } from '../components/molecules/MultiTagPicker/MultiTagPicker';
4
4
  export { default as ConfirmModal } from '../components/molecules/ConfirmModal/ConfirmModal';
@@ -8,3 +8,4 @@ export * from './exports/hooks';
8
8
  export * from './exports/types';
9
9
  export * from './exports/styles';
10
10
  export * from './exports/utils';
11
+ export { default as Sidebar } from './components/layout/Sidebar/Sidebar';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextelco/common-ui",
3
- "version": "1.7.182",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -20,7 +20,8 @@
20
20
  "license": "ISC",
21
21
  "peerDependencies": {
22
22
  "react": "^18.3.1",
23
- "react-dom": "^18.3.1"
23
+ "react-dom": "^18.3.1",
24
+ "react-router-dom": ">=6"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@chromatic-com/storybook": "^4.0.0",
@@ -38,6 +39,7 @@
38
39
  "@types/storybook__react": "^5.2.1",
39
40
  "css-loader": "^7.1.2",
40
41
  "msw": "^2.7.3",
42
+ "react-router-dom": "^6.30.4",
41
43
  "sass": "^1.84.0",
42
44
  "sass-loader": "^16.0.4",
43
45
  "storybook": "^9.0.0",