@dimasbaguspm/versaur 0.0.58 → 0.0.60

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.
Files changed (42) hide show
  1. package/dist/js/helpers/index.js +28 -10
  2. package/dist/js/index.js +99 -80
  3. package/dist/js/layouts/index.js +9 -8
  4. package/dist/js/tablet-landscape-breakpoint-DUeRFxIA.js +113 -0
  5. package/dist/js/top-bar-DMBbEIlR.js +1078 -0
  6. package/dist/types/helpers/match-media/built-in/components/index.d.ts +6 -0
  7. package/dist/types/helpers/match-media/built-in/components/mobile-and-tablet-breakpoint.d.ts +18 -0
  8. package/dist/types/helpers/match-media/built-in/components/mobile-landscape-breakpoint.d.ts +18 -0
  9. package/dist/types/helpers/match-media/built-in/components/mobile-portrait-breakpoint.d.ts +18 -0
  10. package/dist/types/helpers/match-media/built-in/components/tablet-and-desktop-breakpoint.d.ts +18 -0
  11. package/dist/types/helpers/match-media/built-in/components/tablet-landscape-breakpoint.d.ts +18 -0
  12. package/dist/types/helpers/match-media/built-in/components/tablet-portrait-breakpoint.d.ts +18 -0
  13. package/dist/types/helpers/match-media/built-in/hooks/index.d.ts +6 -0
  14. package/dist/types/helpers/match-media/built-in/hooks/use-mobile-and-tablet-breakpoint.d.ts +11 -0
  15. package/dist/types/helpers/match-media/built-in/hooks/use-mobile-landscape-breakpoint.d.ts +11 -0
  16. package/dist/types/helpers/match-media/built-in/hooks/use-mobile-portrait-breakpoint.d.ts +11 -0
  17. package/dist/types/helpers/match-media/built-in/hooks/use-tablet-and-desktop-breakpoint.d.ts +11 -0
  18. package/dist/types/helpers/match-media/built-in/hooks/use-tablet-landscape-breakpoint.d.ts +11 -0
  19. package/dist/types/helpers/match-media/built-in/hooks/use-tablet-portrait-breakpoint.d.ts +11 -0
  20. package/dist/types/helpers/match-media/constants.d.ts +12 -0
  21. package/dist/types/layouts/app-layout/app-layout.atoms.d.ts +6 -0
  22. package/dist/types/layouts/app-layout/app-layout.d.ts +8 -0
  23. package/dist/types/layouts/app-layout/index.d.ts +2 -0
  24. package/dist/types/layouts/app-layout/types.d.ts +52 -0
  25. package/dist/types/layouts/index.d.ts +2 -1
  26. package/dist/types/layouts/page-content/types.d.ts +0 -6
  27. package/dist/types/layouts/page-header/types.d.ts +0 -6
  28. package/dist/types/layouts/page-layout/index.d.ts +2 -0
  29. package/dist/types/layouts/page-layout/page-layout.atoms.d.ts +3 -0
  30. package/dist/types/layouts/page-layout/page-layout.d.ts +5 -0
  31. package/dist/types/layouts/page-layout/types.d.ts +37 -0
  32. package/dist/types/layouts/side-bar/side-bar.atoms.d.ts +1 -1
  33. package/dist/types/layouts/side-bar/side-bar.d.ts +1 -1
  34. package/dist/types/layouts/side-bar/types.d.ts +55 -18
  35. package/dist/utils/enforce-subpath-import.js +2 -1
  36. package/package.json +1 -1
  37. package/dist/js/desktop-breakpoint-CuSom-sN.js +0 -47
  38. package/dist/js/top-bar-DEesTo9i.js +0 -932
  39. package/dist/types/layouts/app-bar/app-bar.atoms.d.ts +0 -25
  40. package/dist/types/layouts/app-bar/app-bar.d.ts +0 -9
  41. package/dist/types/layouts/app-bar/index.d.ts +0 -2
  42. package/dist/types/layouts/app-bar/types.d.ts +0 -46
@@ -1,3 +1,9 @@
1
1
  export * from './mobile-breakpoint';
2
2
  export * from './tablet-breakpoint';
3
3
  export * from './desktop-breakpoint';
4
+ export * from './mobile-and-tablet-breakpoint';
5
+ export * from './tablet-and-desktop-breakpoint';
6
+ export * from './mobile-portrait-breakpoint';
7
+ export * from './mobile-landscape-breakpoint';
8
+ export * from './tablet-portrait-breakpoint';
9
+ export * from './tablet-landscape-breakpoint';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Props for breakpoint components
3
+ */
4
+ interface BreakpointComponentProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Component that only renders children on mobile and tablet viewports
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <MobileAndTabletBreakpoint>
13
+ * <MobileAndTabletContent />
14
+ * </MobileAndTabletBreakpoint>
15
+ * ```
16
+ */
17
+ export declare function MobileAndTabletBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Props for breakpoint components
3
+ */
4
+ interface BreakpointComponentProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Component that only renders children on mobile landscape viewports
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <MobileLandscapeBreakpoint>
13
+ * <MobileLandscapeContent />
14
+ * </MobileLandscapeBreakpoint>
15
+ * ```
16
+ */
17
+ export declare function MobileLandscapeBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Props for breakpoint components
3
+ */
4
+ interface BreakpointComponentProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Component that only renders children on mobile portrait viewports
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <MobilePortraitBreakpoint>
13
+ * <MobilePortraitContent />
14
+ * </MobilePortraitBreakpoint>
15
+ * ```
16
+ */
17
+ export declare function MobilePortraitBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Props for breakpoint components
3
+ */
4
+ interface BreakpointComponentProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Component that only renders children on tablet and desktop viewports
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <TabletAndDesktopBreakpoint>
13
+ * <TabletAndDesktopContent />
14
+ * </TabletAndDesktopBreakpoint>
15
+ * ```
16
+ */
17
+ export declare function TabletAndDesktopBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Props for breakpoint components
3
+ */
4
+ interface BreakpointComponentProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Component that only renders children on tablet landscape viewports
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <TabletLandscapeBreakpoint>
13
+ * <TabletLandscapeContent />
14
+ * </TabletLandscapeBreakpoint>
15
+ * ```
16
+ */
17
+ export declare function TabletLandscapeBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Props for breakpoint components
3
+ */
4
+ interface BreakpointComponentProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Component that only renders children on tablet portrait viewports
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <TabletPortraitBreakpoint>
13
+ * <TabletPortraitContent />
14
+ * </TabletPortraitBreakpoint>
15
+ * ```
16
+ */
17
+ export declare function TabletPortraitBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -1,3 +1,9 @@
1
1
  export * from './use-mobile-breakpoint';
2
2
  export * from './use-tablet-breakpoint';
3
3
  export * from './use-desktop-breakpoint';
4
+ export * from './use-mobile-and-tablet-breakpoint';
5
+ export * from './use-tablet-and-desktop-breakpoint';
6
+ export * from './use-mobile-portrait-breakpoint';
7
+ export * from './use-mobile-landscape-breakpoint';
8
+ export * from './use-tablet-portrait-breakpoint';
9
+ export * from './use-tablet-landscape-breakpoint';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook to detect if the current viewport is mobile or tablet
3
+ *
4
+ * @returns boolean indicating if viewport is mobile or tablet (max-width: 1023px)
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const isMobileOrTablet = useMobileAndTabletBreakpoint()
9
+ * ```
10
+ */
11
+ export declare function useMobileAndTabletBreakpoint(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook to detect if the current viewport is mobile in landscape orientation
3
+ *
4
+ * @returns boolean indicating if viewport is mobile landscape
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const isMobileLandscape = useMobileLandscapeBreakpoint()
9
+ * ```
10
+ */
11
+ export declare function useMobileLandscapeBreakpoint(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook to detect if the current viewport is mobile in portrait orientation
3
+ *
4
+ * @returns boolean indicating if viewport is mobile portrait
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const isMobilePortrait = useMobilePortraitBreakpoint()
9
+ * ```
10
+ */
11
+ export declare function useMobilePortraitBreakpoint(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook to detect if the current viewport is tablet or desktop
3
+ *
4
+ * @returns boolean indicating if viewport is tablet or desktop (min-width: 768px)
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const isTabletOrDesktop = useTabletAndDesktopBreakpoint()
9
+ * ```
10
+ */
11
+ export declare function useTabletAndDesktopBreakpoint(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook to detect if the current viewport is tablet in landscape orientation
3
+ *
4
+ * @returns boolean indicating if viewport is tablet landscape
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const isTabletLandscape = useTabletLandscapeBreakpoint()
9
+ * ```
10
+ */
11
+ export declare function useTabletLandscapeBreakpoint(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook to detect if the current viewport is tablet in portrait orientation
3
+ *
4
+ * @returns boolean indicating if viewport is tablet portrait
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const isTabletPortrait = useTabletPortraitBreakpoint()
9
+ * ```
10
+ */
11
+ export declare function useTabletPortraitBreakpoint(): boolean;
@@ -5,3 +5,15 @@
5
5
  export declare const BREAKPOINT_MOBILE = "(max-width: 767px)";
6
6
  export declare const BREAKPOINT_TABLET = "(min-width: 768px) and (max-width: 1023px)";
7
7
  export declare const BREAKPOINT_DESKTOP = "(min-width: 1024px)";
8
+ /**
9
+ * Combined breakpoint definitions
10
+ */
11
+ export declare const BREAKPOINT_MOBILE_AND_TABLET = "(max-width: 1023px)";
12
+ export declare const BREAKPOINT_TABLET_AND_DESKTOP = "(min-width: 768px)";
13
+ /**
14
+ * Orientation-specific breakpoint definitions
15
+ */
16
+ export declare const BREAKPOINT_MOBILE_PORTRAIT = "(max-width: 767px) and (orientation: portrait)";
17
+ export declare const BREAKPOINT_MOBILE_LANDSCAPE = "(max-width: 767px) and (orientation: landscape)";
18
+ export declare const BREAKPOINT_TABLET_PORTRAIT = "(min-width: 768px) and (max-width: 1023px) and (orientation: portrait)";
19
+ export declare const BREAKPOINT_TABLET_LANDSCAPE = "(min-width: 768px) and (max-width: 1023px) and (orientation: landscape)";
@@ -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,2 @@
1
+ export { AppLayout } from './app-layout';
2
+ export type { AppLayoutProps, AppLayoutTopRegionProps, AppLayoutSideLeftRegionProps, AppLayoutSideRightRegionProps, AppLayoutBottomRegionProps, AppLayoutMainRegionProps, } from './types';
@@ -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-bar';
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,2 @@
1
+ export { PageLayout } from './page-layout';
2
+ export type { PageLayoutProps, PageLayoutHeaderRegionProps, PageLayoutContentRegionProps, } from './types';
@@ -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<HTMLElement>>;
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<HTMLElement>>;
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, ButtonHTMLAttributes } from 'react';
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 (MenuList, etc)
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
- interface SideBarItemBaseAsAnchor extends AnchorHTMLAttributes<HTMLAnchorElement> {
12
- active?: boolean;
13
- icon: ReactNode;
14
- children: ReactNode;
15
- onClick?: never;
16
- href: AnchorHTMLAttributes<HTMLAnchorElement>['href'];
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
- onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
23
- href?: never;
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
- "AppBar": "layouts",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "description": "React UI library with Tailwind CSS",
5
5
  "author": "Dimas Bagus Prayogo Mukti<dimas.bagus.pm@gmail.com>",
6
6
  "license": "MIT",
@@ -1,47 +0,0 @@
1
- import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useState as m, useEffect as h } from "react";
3
- const u = "(max-width: 767px)", c = "(min-width: 768px) and (max-width: 1023px)", d = "(min-width: 1024px)";
4
- function n(e) {
5
- const [a, s] = m(() => typeof window > "u" ? !1 : window.matchMedia(e).matches);
6
- return h(() => {
7
- if (typeof window > "u") return;
8
- const r = window.matchMedia(e), o = (f) => s(f.matches);
9
- return s(r.matches), r.addEventListener("change", o), () => {
10
- r.removeEventListener("change", o);
11
- };
12
- }, [e]), a;
13
- }
14
- function i({ query: e, children: a }) {
15
- return n(e) ? /* @__PURE__ */ t.jsx(t.Fragment, { children: a }) : null;
16
- }
17
- function w() {
18
- return n(u);
19
- }
20
- function B() {
21
- return n(c);
22
- }
23
- function M() {
24
- return n(d);
25
- }
26
- function E({ children: e }) {
27
- return /* @__PURE__ */ t.jsx(i, { query: u, children: e });
28
- }
29
- function T({ children: e }) {
30
- return /* @__PURE__ */ t.jsx(i, { query: c, children: e });
31
- }
32
- function k({ children: e }) {
33
- return /* @__PURE__ */ t.jsx(i, { query: d, children: e });
34
- }
35
- export {
36
- u as B,
37
- k as D,
38
- i as M,
39
- T,
40
- c as a,
41
- d as b,
42
- w as c,
43
- B as d,
44
- M as e,
45
- E as f,
46
- n as u
47
- };