@dimasbaguspm/versaur 0.0.58 → 0.0.59
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/dist/js/index.js +64 -63
- package/dist/js/layouts/index.js +9 -8
- package/dist/js/top-bar-B2nzldfs.js +1074 -0
- package/dist/types/layouts/app-layout/app-layout.atoms.d.ts +6 -0
- package/dist/types/layouts/app-layout/app-layout.d.ts +8 -0
- package/dist/types/layouts/app-layout/index.d.ts +2 -0
- package/dist/types/layouts/app-layout/types.d.ts +52 -0
- package/dist/types/layouts/index.d.ts +2 -1
- package/dist/types/layouts/page-content/types.d.ts +0 -6
- package/dist/types/layouts/page-header/types.d.ts +0 -6
- package/dist/types/layouts/page-layout/index.d.ts +2 -0
- package/dist/types/layouts/page-layout/page-layout.atoms.d.ts +3 -0
- package/dist/types/layouts/page-layout/page-layout.d.ts +5 -0
- package/dist/types/layouts/page-layout/types.d.ts +37 -0
- package/dist/types/layouts/side-bar/side-bar.atoms.d.ts +1 -1
- package/dist/types/layouts/side-bar/side-bar.d.ts +1 -1
- package/dist/types/layouts/side-bar/types.d.ts +55 -18
- package/dist/utils/enforce-subpath-import.js +2 -1
- package/package.json +1 -1
- package/dist/js/top-bar-DEesTo9i.js +0 -932
- package/dist/types/layouts/app-bar/app-bar.atoms.d.ts +0 -25
- package/dist/types/layouts/app-bar/app-bar.d.ts +0 -9
- package/dist/types/layouts/app-bar/index.d.ts +0 -2
- package/dist/types/layouts/app-bar/types.d.ts +0 -46
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AppLayoutTopRegionProps, AppLayoutSideLeftRegionProps, AppLayoutSideRightRegionProps, AppLayoutBottomRegionProps, AppLayoutMainRegionProps } from './types';
|
|
2
|
+
export declare const AppLayoutTopRegion: import('react').ForwardRefExoticComponent<AppLayoutTopRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const AppLayoutSideLeftRegion: import('react').ForwardRefExoticComponent<AppLayoutSideLeftRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const AppLayoutSideRightRegion: import('react').ForwardRefExoticComponent<AppLayoutSideRightRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const AppLayoutBottomRegion: import('react').ForwardRefExoticComponent<AppLayoutBottomRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const AppLayoutMainRegion: import('react').ForwardRefExoticComponent<AppLayoutMainRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AppLayoutProps } from './types';
|
|
2
|
+
export declare const AppLayout: import('react').ForwardRefExoticComponent<AppLayoutProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
TopRegion: import('react').ForwardRefExoticComponent<import('./types').AppLayoutTopRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
+
SideLeftRegion: import('react').ForwardRefExoticComponent<import('./types').AppLayoutSideLeftRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
SideRightRegion: import('react').ForwardRefExoticComponent<import('./types').AppLayoutSideRightRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
BottomRegion: import('react').ForwardRefExoticComponent<import('./types').AppLayoutBottomRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
MainRegion: import('react').ForwardRefExoticComponent<import('./types').AppLayoutMainRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* AppLayoutRoot - main container for application layout
|
|
4
|
+
* Provides high-level layout structure with named regions for app shell
|
|
5
|
+
* Compound pattern: TopRegion, SideLeftRegion, SideRightRegion, BottomRegion, MainRegion
|
|
6
|
+
*/
|
|
7
|
+
export type AppLayoutProps = HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
/**
|
|
9
|
+
* AppLayoutTopRegion - top region of the app (header, navigation bar)
|
|
10
|
+
*/
|
|
11
|
+
export interface AppLayoutTopRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/**
|
|
13
|
+
* Custom class for top region
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* AppLayoutSideLeftRegion - left sidebar region
|
|
19
|
+
*/
|
|
20
|
+
export interface AppLayoutSideLeftRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
/**
|
|
22
|
+
* Custom class for left sidebar region
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* AppLayoutSideRightRegion - right sidebar region
|
|
28
|
+
*/
|
|
29
|
+
export interface AppLayoutSideRightRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
/**
|
|
31
|
+
* Custom class for right sidebar region
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* AppLayoutBottomRegion - bottom region of the app (footer, bottom nav)
|
|
37
|
+
*/
|
|
38
|
+
export interface AppLayoutBottomRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
39
|
+
/**
|
|
40
|
+
* Custom class for bottom region
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* AppLayoutMainRegion - main content region
|
|
46
|
+
*/
|
|
47
|
+
export interface AppLayoutMainRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
48
|
+
/**
|
|
49
|
+
* Custom class for main region
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from './app-
|
|
1
|
+
export * from './app-layout';
|
|
2
2
|
export * from './bottom-bar';
|
|
3
3
|
export * from './badge-group';
|
|
4
4
|
export * from './button-group';
|
|
5
5
|
export * from './filter-chip-group';
|
|
6
6
|
export * from './page-header';
|
|
7
7
|
export * from './page-content';
|
|
8
|
+
export * from './page-layout';
|
|
8
9
|
export * from './page-loader';
|
|
9
10
|
export * from './form-layout';
|
|
10
11
|
export * from './side-bar';
|
|
@@ -17,12 +17,6 @@ export interface PageContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
* - 'two-column-asymmetric-right': Two columns with right column wider
|
|
18
18
|
*/
|
|
19
19
|
template?: 'single-column' | 'two-column' | 'two-column-asymmetric-left' | 'two-column-asymmetric-right';
|
|
20
|
-
/**
|
|
21
|
-
* Background color of the layout
|
|
22
|
-
* - 'white': White background
|
|
23
|
-
* - 'gray': Gray background
|
|
24
|
-
*/
|
|
25
|
-
backgroundColor?: 'white' | 'gray';
|
|
26
20
|
/**
|
|
27
21
|
* Content to render inside the layout
|
|
28
22
|
*/
|
|
@@ -11,12 +11,6 @@ export interface PageHeaderProps extends HTMLAttributes<HTMLElement> {
|
|
|
11
11
|
* - 'narrow': Container for mobile screens (centered)
|
|
12
12
|
*/
|
|
13
13
|
size?: 'fluid' | 'wide' | 'narrow';
|
|
14
|
-
/**
|
|
15
|
-
* Background color of the header
|
|
16
|
-
* - 'white': White background
|
|
17
|
-
* - 'gray': Gray background
|
|
18
|
-
*/
|
|
19
|
-
backgroundColor?: 'white' | 'gray';
|
|
20
14
|
children?: ReactNode;
|
|
21
15
|
}
|
|
22
16
|
/**
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PageLayoutHeaderRegionProps, PageLayoutContentRegionProps } from './types';
|
|
2
|
+
export declare const PageLayoutHeaderRegion: import('react').ForwardRefExoticComponent<PageLayoutHeaderRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const PageLayoutContentRegion: import('react').ForwardRefExoticComponent<PageLayoutContentRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PageLayoutProps } from './types';
|
|
2
|
+
export declare const PageLayout: import('react').ForwardRefExoticComponent<PageLayoutProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
HeaderRegion: import('react').ForwardRefExoticComponent<import('./types').PageLayoutHeaderRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
+
ContentRegion: import('react').ForwardRefExoticComponent<import('./types').PageLayoutContentRegionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* PageLayoutRoot - main container for page layout
|
|
4
|
+
* Manages layout between header and content regions
|
|
5
|
+
* Compound pattern: HeaderRegion, ContentRegion
|
|
6
|
+
*/
|
|
7
|
+
export interface PageLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Add horizontal margin (left and right) to the page layout
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
hasMargin?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* PageLayoutHeaderRegion - header region of the page
|
|
16
|
+
*/
|
|
17
|
+
export interface PageLayoutHeaderRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/**
|
|
19
|
+
* Background color of the header region
|
|
20
|
+
* - 'white': White background
|
|
21
|
+
* - 'gray': Gray background
|
|
22
|
+
* @default 'white'
|
|
23
|
+
*/
|
|
24
|
+
backgroundColor?: 'white' | 'gray';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* PageLayoutContentRegion - content region of the page
|
|
28
|
+
*/
|
|
29
|
+
export interface PageLayoutContentRegionProps extends HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
/**
|
|
31
|
+
* Background color of the content region
|
|
32
|
+
* - 'white': White background
|
|
33
|
+
* - 'gray': Gray background
|
|
34
|
+
* @default 'white'
|
|
35
|
+
*/
|
|
36
|
+
backgroundColor?: 'white' | 'gray';
|
|
37
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SideBarItemProps, SideBarGroupProps } from './types';
|
|
2
|
-
export declare const SideBarItem: import('react').ForwardRefExoticComponent<SideBarItemProps & import('react').RefAttributes<
|
|
2
|
+
export declare const SideBarItem: import('react').ForwardRefExoticComponent<SideBarItemProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
3
3
|
export declare const SideBarGroup: import('react').ForwardRefExoticComponent<SideBarGroupProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SideBarProps } from './types';
|
|
2
2
|
export declare const SideBar: import('react').ForwardRefExoticComponent<SideBarProps & import('react').RefAttributes<HTMLElement>> & {
|
|
3
|
-
Item: import('react').ForwardRefExoticComponent<import('./types').SideBarItemProps & import('react').RefAttributes<
|
|
3
|
+
Item: import('react').ForwardRefExoticComponent<import('./types').SideBarItemProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
4
4
|
Group: import('react').ForwardRefExoticComponent<import('./types').SideBarGroupProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
5
5
|
};
|
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
import { HTMLAttributes, AnchorHTMLAttributes, ReactNode
|
|
1
|
+
import { HTMLAttributes, AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Props for the SideBar root component
|
|
4
4
|
*/
|
|
5
5
|
export interface SideBarProps extends HTMLAttributes<HTMLElement> {
|
|
6
6
|
/**
|
|
7
|
-
* Children nodes (
|
|
7
|
+
* Children nodes (SideBar.Item, SideBar.Group)
|
|
8
8
|
*/
|
|
9
9
|
children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the sidebar starts in collapsed state
|
|
12
|
+
* @default false (expanded)
|
|
13
|
+
*/
|
|
14
|
+
defaultCollapsed?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Callback when collapse state changes
|
|
17
|
+
*/
|
|
18
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
10
19
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
interface SideBarItemBaseAsButton extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
20
|
+
/**
|
|
21
|
+
* Props for the SideBar.Item component (anchor only)
|
|
22
|
+
*/
|
|
23
|
+
export interface SideBarItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
24
|
+
/**
|
|
25
|
+
* Whether this item is currently active/selected
|
|
26
|
+
*/
|
|
19
27
|
active?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Icon element to display
|
|
30
|
+
*/
|
|
20
31
|
icon?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Text label for the item
|
|
34
|
+
*/
|
|
21
35
|
children: ReactNode;
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
/**
|
|
37
|
+
* URL for the anchor
|
|
38
|
+
*/
|
|
39
|
+
href: AnchorHTMLAttributes<HTMLAnchorElement>['href'];
|
|
24
40
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Props for the SideBar.Item component (polymorphic: anchor or button)
|
|
27
|
-
*/
|
|
28
|
-
export type SideBarItemProps = SideBarItemBaseAsAnchor | SideBarItemBaseAsButton;
|
|
29
41
|
/**
|
|
30
42
|
* Props for the SideBar.Group component
|
|
31
43
|
*/
|
|
@@ -35,8 +47,33 @@ export interface SideBarGroupProps extends HTMLAttributes<HTMLLIElement> {
|
|
|
35
47
|
*/
|
|
36
48
|
label: ReactNode;
|
|
37
49
|
/**
|
|
38
|
-
* Children (SideBar.Item)
|
|
50
|
+
* Children (SideBar.Item elements)
|
|
39
51
|
*/
|
|
40
52
|
children: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Icon element to display
|
|
55
|
+
*/
|
|
56
|
+
icon?: ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the group's children are expanded by default
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
defaultExpanded?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Context value for sidebar state
|
|
65
|
+
*/
|
|
66
|
+
export interface SideBarContextValue {
|
|
67
|
+
/**
|
|
68
|
+
* Whether the sidebar is currently collapsed
|
|
69
|
+
*/
|
|
70
|
+
isCollapsed: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Toggle the collapsed state
|
|
73
|
+
*/
|
|
74
|
+
toggleCollapsed: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Expand the sidebar (set to expanded state)
|
|
77
|
+
*/
|
|
78
|
+
expandSidebar: () => void;
|
|
41
79
|
}
|
|
42
|
-
export {};
|
|
@@ -24,7 +24,7 @@ const symbolToSubpath = {
|
|
|
24
24
|
"TextInputAsButton": "forms",
|
|
25
25
|
"TextAreaInput": "forms",
|
|
26
26
|
"TimePickerInput": "forms",
|
|
27
|
-
"
|
|
27
|
+
"AppLayout": "layouts",
|
|
28
28
|
"BadgeGroup": "layouts",
|
|
29
29
|
"BottomBar": "layouts",
|
|
30
30
|
"ButtonGroup": "layouts",
|
|
@@ -32,6 +32,7 @@ const symbolToSubpath = {
|
|
|
32
32
|
"FormLayout": "layouts",
|
|
33
33
|
"PageContent": "layouts",
|
|
34
34
|
"PageHeader": "layouts",
|
|
35
|
+
"PageLayout": "layouts",
|
|
35
36
|
"PageLoader": "layouts",
|
|
36
37
|
"SideBar": "layouts",
|
|
37
38
|
"TopBar": "layouts",
|