@sikka/hawa 0.1.17 → 0.1.20
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 +2 -16
- package/dist/styles.css +78 -3
- package/es/elements/Button.d.ts +1 -1
- package/es/elements/HawaRadio.d.ts +1 -0
- package/es/elements/InterfaceSettings.d.ts +2 -0
- package/es/elements/Popover.d.ts +1 -0
- package/es/index.es.js +3 -3
- package/es/layout/AppLayout.d.ts +49 -0
- package/es/layout/Sidebar.d.ts +36 -0
- package/es/layout/Sidebar2.d.ts +20 -0
- package/es/layout/index.d.ts +2 -0
- package/lib/elements/Button.d.ts +1 -1
- package/lib/elements/HawaRadio.d.ts +1 -0
- package/lib/elements/InterfaceSettings.d.ts +2 -0
- package/lib/elements/Popover.d.ts +1 -0
- package/lib/index.js +3 -3
- package/lib/layout/AppLayout.d.ts +49 -0
- package/lib/layout/Sidebar.d.ts +36 -0
- package/lib/layout/Sidebar2.d.ts +20 -0
- package/lib/layout/index.d.ts +2 -0
- package/package.json +2 -1
- package/src/blocks/AuthForms/SignInBlock.tsx +0 -2
- package/src/blocks/AuthForms/SignInForm.tsx +1 -1
- package/src/elements/Button.tsx +1 -0
- package/src/elements/DropdownMenu.tsx +0 -2
- package/src/elements/HawaRadio.tsx +8 -2
- package/src/elements/InterfaceSettings.tsx +15 -2
- package/src/elements/Label.tsx +0 -2
- package/src/elements/Popover.tsx +28 -22
- package/src/elements/Select.tsx +0 -2
- package/src/elements/Tooltip.tsx +1 -106
- package/src/layout/AppLayout.tsx +445 -0
- package/src/layout/HawaAppLayoutSimplified.tsx +78 -98
- package/src/layout/Sidebar.tsx +224 -0
- package/src/layout/Sidebar2.tsx +77 -0
- package/src/layout/index.ts +3 -0
- package/src/styles.css +78 -3
- package/tailwind.config.js +20 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type AppLayoutTypes = {
|
|
3
|
+
/** The pages of the side drawer */
|
|
4
|
+
drawerItems: Item[];
|
|
5
|
+
direction?: "rtl" | "ltr";
|
|
6
|
+
currentPage: string;
|
|
7
|
+
pageTitle?: string;
|
|
8
|
+
logoSymbol?: any;
|
|
9
|
+
logoLink?: string;
|
|
10
|
+
logoText?: any;
|
|
11
|
+
children?: any;
|
|
12
|
+
topBar?: boolean;
|
|
13
|
+
username?: string;
|
|
14
|
+
email?: string;
|
|
15
|
+
drawerSize?: "sm" | "md" | "large";
|
|
16
|
+
profileMenuItems?: ProfileItem[];
|
|
17
|
+
onSettingsClick?: () => void;
|
|
18
|
+
DrawerFooterActions?: any;
|
|
19
|
+
texts?: {
|
|
20
|
+
expandSidebar?: string;
|
|
21
|
+
collapseSidebar?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type Item = {
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
icon?: any;
|
|
28
|
+
subitems?: SubItem[];
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
};
|
|
31
|
+
type SubItem = {
|
|
32
|
+
value: string;
|
|
33
|
+
label: string;
|
|
34
|
+
icon?: any;
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
};
|
|
37
|
+
type ProfileSubItem = {
|
|
38
|
+
label: string;
|
|
39
|
+
value: string;
|
|
40
|
+
highlighted?: boolean;
|
|
41
|
+
};
|
|
42
|
+
type ProfileItem = {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
highlighted?: boolean;
|
|
46
|
+
subitems?: ProfileSubItem[];
|
|
47
|
+
};
|
|
48
|
+
export declare const AppLayout: React.FunctionComponent<AppLayoutTypes>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Item = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: any;
|
|
6
|
+
subitems?: SubItem[];
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
type SubItem = {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon?: any;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
};
|
|
15
|
+
interface SidebarGroupProps {
|
|
16
|
+
title?: string;
|
|
17
|
+
items: Item[];
|
|
18
|
+
collapsed?: any;
|
|
19
|
+
selectedItem?: any;
|
|
20
|
+
isOpen?: boolean;
|
|
21
|
+
onItemClick?: (value: string[]) => void;
|
|
22
|
+
onSubItemClick?: (values: string[]) => void;
|
|
23
|
+
}
|
|
24
|
+
interface SidebarRootProps {
|
|
25
|
+
children: any;
|
|
26
|
+
}
|
|
27
|
+
declare const SidebarRoot: React.FC<SidebarRootProps>;
|
|
28
|
+
declare const SidebarGroup: React.FC<SidebarGroupProps>;
|
|
29
|
+
declare const SidebarItem: React.FC<{
|
|
30
|
+
item: Item;
|
|
31
|
+
isSelected: any;
|
|
32
|
+
onItemClick?: (value: string[]) => void;
|
|
33
|
+
onSubItemClick?: (values: string[]) => void;
|
|
34
|
+
isOpen?: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export { SidebarRoot, SidebarGroup, SidebarItem };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Item = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: any;
|
|
6
|
+
subitems?: Item[];
|
|
7
|
+
};
|
|
8
|
+
interface SidebarGroupProps {
|
|
9
|
+
title: string;
|
|
10
|
+
items: Item[];
|
|
11
|
+
}
|
|
12
|
+
interface SidebarRootProps {
|
|
13
|
+
children: any;
|
|
14
|
+
}
|
|
15
|
+
declare const SidebarRoot: React.FC<SidebarRootProps>;
|
|
16
|
+
declare const SidebarGroup: React.FC<SidebarGroupProps>;
|
|
17
|
+
declare const SidebarItem: React.FC<{
|
|
18
|
+
item: Item;
|
|
19
|
+
}>;
|
|
20
|
+
export { SidebarRoot, SidebarGroup, SidebarItem };
|
package/es/layout/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./Box";
|
|
2
2
|
export * from "./HawaBottomAppBar";
|
|
3
3
|
export * from "./HawaSiteLayout";
|
|
4
|
+
export * from "./AppLayout";
|
|
4
5
|
export * from "./HawaAppLayout";
|
|
5
6
|
export * from "./HawaAppLayoutSimplified";
|
|
6
7
|
export * from "./HawaContainer";
|
|
@@ -8,3 +9,4 @@ export * from "./HawaGrid";
|
|
|
8
9
|
export * from "./AppSidebar";
|
|
9
10
|
export * from "./Footer";
|
|
10
11
|
export * from "./Banner";
|
|
12
|
+
export * from "./Sidebar";
|
package/lib/elements/Button.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
4
|
variant?: "default" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
5
|
-
size?: "default" | "xs" | "sm" | "lg" | "xl" | "icon";
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | "icon" | "smallIcon";
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|