opus-toolkit-components 1.8.4 → 1.8.6

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.
@@ -1,8 +1,8 @@
1
- export interface FooterProps {
2
- left?: React.ReactNode;
3
- center?: React.ReactNode;
4
- right?: React.ReactNode;
5
- className?: string;
6
- }
7
-
8
- export const Footer: React.ComponentType<FooterProps>;
1
+ export interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ left?: React.ReactNode;
3
+ center?: React.ReactNode;
4
+ right?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+
8
+ export const Footer: React.ComponentType<FooterProps>;
@@ -1,15 +1,27 @@
1
- export type HeroIconName = keyof typeof HeroIcons;
2
- export type C247IconName = keyof typeof C247Icons;
3
- export type IconName = HeroIconName | C247IconName;
4
-
5
- export type IconLibrary = "hero" | "c247";
6
-
7
- export interface IconProps extends React.SVGProps<SVGSVGElement> {
8
- name: IconName;
9
- library?: IconLibrary;
10
- size?: number;
11
- className?: string;
12
- color?: string;
13
- }
14
-
15
- export const Icon: React.FC<IconProps>;
1
+ import type * as HeroIcons from "@heroicons/react/24/solid";
2
+
3
+ export type HeroIconName = keyof typeof HeroIcons;
4
+ export type C247IconName =
5
+ | "C247Billing"
6
+ | "C247Dashboard"
7
+ | "C247Deployment"
8
+ | "C247Form"
9
+ | "C247Planner"
10
+ | "C247Reports"
11
+ | "C247Screening"
12
+ | "C247Settings"
13
+ | "C247Support"
14
+ | "C247Tasks";
15
+ export type IconName = HeroIconName | C247IconName;
16
+
17
+ export type IconLibrary = "hero" | "c247";
18
+
19
+ export interface IconProps extends React.SVGProps<SVGSVGElement> {
20
+ name: IconName;
21
+ library?: IconLibrary;
22
+ size?: number;
23
+ className?: string;
24
+ color?: string;
25
+ }
26
+
27
+ export const Icon: React.FC<IconProps>;
@@ -1,8 +1,8 @@
1
- export interface LoaderProps {
2
- isLoading: boolean;
3
- loaderText?: string;
4
- customLoader?: React.ReactNode;
5
- className?: string;
6
- }
7
-
8
- export const Loader: React.FC<LoaderProps>;
1
+ export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ isLoading: boolean;
3
+ loaderText?: string;
4
+ customLoader?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+
8
+ export const Loader: React.FC<LoaderProps>;
@@ -1,4 +1,15 @@
1
+ import type { SidebarMenu, SidebarUser } from "../Sidebar";
2
+
1
3
  export interface PageTemplateProps {
4
+ sidebarMenus?: SidebarMenu[];
5
+ sidebarUser?: SidebarUser;
6
+ sidebarActiveItem?: string | number | null;
7
+ onSidebarItemClick?: (key: string | number) => void;
8
+ sidebarLogo?: string;
9
+ sidebarSearchValue?: string;
10
+ onSidebarSearchChange?: (value: string) => void;
11
+ sidebarOpenGroupKey?: string | number | null;
12
+ onSidebarGroupToggle?: (openGroupKey: string | number | null) => void;
2
13
  headerTitle?: string;
3
14
  headerCenter?: React.ReactNode;
4
15
  headerRight?: React.ReactNode;
@@ -1,53 +1,57 @@
1
- export interface SidebarMenuItem {
2
- key: string | number;
3
- name: string;
4
- icon?: string;
5
- href?: string;
6
- }
7
-
8
- export interface SidebarMenuGroup {
9
- key: string | number;
10
- name: string;
11
- children: SidebarMenuItem[];
12
- }
13
-
14
- export type SidebarMenu = SidebarMenuItem | SidebarMenuGroup;
15
-
16
- export interface SidebarUser {
17
- id: string | number;
18
- name: string;
19
- role: string;
20
- avatar?: string;
21
- }
22
-
23
- export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
24
- menus: SidebarMenu[];
25
- user: SidebarUser;
26
-
27
- /** Currently selected (active) menu item */
28
- activeItem?: string | number | null;
29
- onItemClick?: (key: string | number) => void;
30
-
31
- /** Optional logo override */
32
- logo?: string;
33
-
34
- /** Controlled search input state */
35
- searchValue?: string;
36
- onSearchChange?: (value: string) => void;
37
-
38
- /**
39
- * REQUIRED.
40
- * Key of the currently expanded group.
41
- * Set to `null` to collapse all groups.
42
- */
43
- openGroupKey: string | number | null;
44
-
45
- /**
46
- * REQUIRED.
47
- * Fired when the open group changes.
48
- * Receives the NEXT openGroupKey value.
49
- */
50
- onGroupToggle: (openGroupKey: string | number | null) => void;
51
- }
52
-
53
- export const Sidebar: React.FC<SidebarProps>;
1
+ import type { IconProps } from "../Icon";
2
+
3
+ export interface SidebarMenuItem {
4
+ key: string | number;
5
+ name: string;
6
+ path?: string;
7
+ href?: string;
8
+ iconProps?: IconProps;
9
+ onClick?: (key: string | number) => void;
10
+ }
11
+
12
+ export interface SidebarMenuGroup {
13
+ key: string | number;
14
+ name: string;
15
+ iconProps?: IconProps;
16
+ children: SidebarMenuItem[];
17
+ }
18
+
19
+ export type SidebarMenu = SidebarMenuItem | SidebarMenuGroup;
20
+
21
+ export interface SidebarUser {
22
+ id: string | number;
23
+ name: string;
24
+ role: string;
25
+ avatar?: string;
26
+ }
27
+
28
+ export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
29
+ menus: SidebarMenu[];
30
+ user: SidebarUser;
31
+
32
+ /** Currently selected (active) menu item */
33
+ activeItem?: string | number | null;
34
+ onItemClick?: (key: string | number) => void;
35
+
36
+ /** Optional logo override */
37
+ logo?: string;
38
+
39
+ /** Controlled search input state */
40
+ searchValue?: string;
41
+ onSearchChange?: (value: string) => void;
42
+
43
+ /**
44
+ * Optional controlled key of the currently expanded group.
45
+ * Set to `null` to collapse all groups.
46
+ * When omitted, the Sidebar manages expansion state internally.
47
+ */
48
+ openGroupKey?: string | number | null;
49
+
50
+ /**
51
+ * Optional controlled change handler.
52
+ * Receives the NEXT openGroupKey value.
53
+ */
54
+ onGroupToggle?: (openGroupKey: string | number | null) => void;
55
+ }
56
+
57
+ export const Sidebar: React.FC<SidebarProps>;