@hari_digitus/sms-ui-library 5.0.5 → 5.0.8

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/Readme.md ADDED
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,67 @@
1
+ import type { ReactNode } from "react";
2
+ export interface SidebarNavItem {
3
+ label: string;
4
+ /** Any ReactNode icon, e.g. <MyIcon /> */
5
+ icon: ReactNode;
6
+ to: string;
7
+ }
8
+ export interface SidebarNavSection {
9
+ /** Section heading text e.g. "OPERATIONS" */
10
+ section: string;
11
+ /**
12
+ * Tailwind color used for:
13
+ * - active bg → bg-{color}/20
14
+ * - hover bg → hover:bg-{color}/10
15
+ * - active text → text-{color}
16
+ *
17
+ * Pass a full Tailwind color token e.g. "green-500", "blue-400", "violet-400"
18
+ * You can also pass `undefined` to fall back to the sidebar default.
19
+ */
20
+ color?: string;
21
+ items: SidebarNavItem[];
22
+ }
23
+ export interface SidebarLogoProps {
24
+ /** Any ReactNode brand mark */
25
+ icon: ReactNode;
26
+ /** Primary brand name */
27
+ name: string;
28
+ /** Optional sub-label below name */
29
+ subLabel?: string;
30
+ }
31
+ export interface SidebarUserProps {
32
+ /** Initials shown in avatar circle */
33
+ initials: string;
34
+ /** Avatar background color class e.g. "bg-green-600" */
35
+ avatarColor?: string;
36
+ name: string;
37
+ role?: string;
38
+ }
39
+ export interface SidebarFooterLink {
40
+ label: string;
41
+ icon: ReactNode;
42
+ onClick?: () => void;
43
+ }
44
+ export interface SidebarProps {
45
+ /** Whether the sidebar is expanded */
46
+ open: boolean;
47
+ /** Called when the toggle button / logo is clicked */
48
+ onToggle: () => void;
49
+ /** Navigation sections driven entirely by JSON config */
50
+ navConfig: SidebarNavSection[];
51
+ /** Logo / brand area */
52
+ logo?: SidebarLogoProps;
53
+ /** CTA button (e.g. "New RDR") */
54
+ cta?: {
55
+ label: string;
56
+ icon: ReactNode;
57
+ to: string;
58
+ color?: string;
59
+ };
60
+ /** Logged-in user shown in footer */
61
+ user?: SidebarUserProps;
62
+ /** Extra footer links before the user block */
63
+ footerLinks?: SidebarFooterLink[];
64
+ /** Overall sidebar background (Tailwind bg class or CSS variable) */
65
+ bgColor?: string;
66
+ }
67
+ export default function Sidebar({ open, onToggle, navConfig, logo, cta, user, footerLinks, bgColor, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import "./index.css";
2
- export { default as Radio } from "./components/RadioButton/RadioButton";
3
- export { default as ToggleSwitch } from "./components/ToggleButton/ToggleSwitch";
4
- export { default as Checkbox } from "./components/Checkbox/Checkbox";
5
- export { Textarea } from "./components/TextArea/textarea";
6
- export { MultiSelect } from "./components/MultiSelect/MultiSelect";
7
- export { default as DragDropUpload } from "./components/DragDropUpload/DragDropUpload";
8
- export { Select } from "./components/Select/Select";
9
- export type { SelectFieldProps, SelectOption } from "./components/Select/Select";
10
- export { Input } from "./components/InputFields/Input";
11
- export { default as CustomDatePicker } from "./components/DatePicker/DatePicker";
12
- export { default as SingleSelect } from "./components/SingleSelect/SingleSelect";
13
- export { default as Tooltip } from "./components/Tooltip/Tooltip";
package/package.json CHANGED
@@ -1,51 +1,47 @@
1
1
  {
2
- "name": "@hari_digitus/sms-ui-library",
3
- "version": "5.0.5",
4
- "main": "dist/form-controls.cjs.js",
5
- "module": "dist/form-controls.es.js",
2
+ "name": "@hari_digitus/sms-ui-library",
3
+ "version": "5.0.8",
4
+ "main": "dist/SideNavBar.cjs.js",
5
+ "module": "dist/SideNavBar.es.js",
6
6
  "types": "dist/types/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./dist/form-controls.es.js",
10
- "require": "./dist/form-controls.cjs.js"
11
- },
12
- "./dist/form-controls.css": "./dist/form-controls.css",
13
- "./style.css": "./dist/form-controls.css"
9
+ "import": "./dist/SideNavBar.es.js",
10
+ "require": "./dist/SideNavBar.cjs.js"
11
+ }
14
12
  },
15
13
  "files": [
16
14
  "dist"
17
15
  ],
18
16
  "scripts": {
19
17
  "build": "vite build && npx tsc --emitDeclarationOnly",
20
- "dev": "vite build --watch",
21
- "test": "vite"
18
+ "dev": "vite build --watch"
22
19
  },
23
20
  "repository": {
24
21
  "type": "git",
25
22
  "url": "https://github.com/digitus-git/AFCI_OffAuto/tree/develop_rel_phase1/packages"
26
23
  },
24
+ "peerDependencies": {
25
+ "react": "^18.3.1",
26
+ "react-dom": "^18.3.1"
27
+ },
27
28
  "devDependencies": {
28
- "@types/react": "^18.3.1",
29
+ "@types/react": "18.3.1",
29
30
  "@types/react-dom": "18.3.1",
30
31
  "@vitejs/plugin-react": "^4.0.0",
32
+ "autoprefixer": "^10.5.0",
33
+ "postcss": "^8.5.15",
34
+ "tailwindcss": "^4.3.0",
31
35
  "typescript": "^4.9.5",
32
- "vite": "^6.0.0",
33
- "vite-plugin-svgr": "^5.2.0"
34
- },
35
- "peerDependencies": {
36
- "react": "^18.3.1",
37
- "react-dom": "^18.3.1"
36
+ "vite": "^6.0.0"
38
37
  },
39
38
  "dependencies": {
40
39
  "@radix-ui/react-select": "^2.2.6",
41
- "@tailwindcss/postcss": "^4.3.0",
42
- "autoprefixer": "^10.5.0",
40
+ "@radix-ui/react-tooltip": "^1.2.8",
43
41
  "class-variance-authority": "^0.7.0",
44
42
  "clsx": "2.1.1",
45
43
  "lucide-react": "^1.16.0",
46
- "postcss": "^8.5.15",
47
- "react-datepicker": "^8.7.0",
48
- "tailwind-merge": "3.2.0",
49
- "tailwindcss": "^4.3.0"
44
+ "react-router-dom": "^7.18.0",
45
+ "tailwind-merge": "3.2.0"
50
46
  }
51
47
  }