@engrate/components 0.1.7 → 0.1.9
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/components/ui/EngrateLogo/EngrateLogo.d.ts +22 -0
- package/dist/components/ui/EngrateLogo/index.d.ts +1 -0
- package/dist/components/ui/Footer/Footer.d.ts +86 -0
- package/dist/components/ui/Footer/index.d.ts +2 -0
- package/dist/components/ui/Grid/Grid.d.ts +1 -1
- package/dist/components/ui/Header/Header.d.ts +60 -0
- package/dist/components/ui/Header/index.d.ts +2 -0
- package/dist/components/ui/Sidebar/Sidebar.d.ts +105 -0
- package/dist/components/ui/Sidebar/index.d.ts +1 -0
- package/dist/components/ui/Stack/Stack.d.ts +1 -1
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/index.cjs.js +26 -26
- package/dist/index.es.js +6980 -6378
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const engrateLogoVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "lg" | "md" | "xl" | "xs" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
type ResponsiveCompact = boolean | {
|
|
7
|
+
base?: boolean;
|
|
8
|
+
sm?: boolean;
|
|
9
|
+
md?: boolean;
|
|
10
|
+
lg?: boolean;
|
|
11
|
+
xl?: boolean;
|
|
12
|
+
'2xl'?: boolean;
|
|
13
|
+
};
|
|
14
|
+
interface EngrateLogoProps extends React.SVGAttributes<SVGSVGElement>, VariantProps<typeof engrateLogoVariants> {
|
|
15
|
+
/**
|
|
16
|
+
* Show only the icon without the wordmark.
|
|
17
|
+
* Supports responsive values: `{ base: true, md: false }`
|
|
18
|
+
*/
|
|
19
|
+
compact?: ResponsiveCompact;
|
|
20
|
+
}
|
|
21
|
+
declare const EngrateLogo: React.ForwardRefExoticComponent<EngrateLogoProps & React.RefAttributes<SVGSVGElement>>;
|
|
22
|
+
export { EngrateLogo, engrateLogoVariants, type EngrateLogoProps, type ResponsiveCompact, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EngrateLogo, engrateLogoVariants, type EngrateLogoProps, type ResponsiveCompact, } from './EngrateLogo';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const footerVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "filled" | "dark" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
interface FooterProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof footerVariants> {
|
|
8
|
+
/** Render as a child component */
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Footer component for page footer content.
|
|
13
|
+
* Supports multiple variants and sizes for different use cases.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Footer>
|
|
18
|
+
* <FooterContent>
|
|
19
|
+
* <FooterSection>
|
|
20
|
+
* <FooterHeading>Company</FooterHeading>
|
|
21
|
+
* <FooterLinks>
|
|
22
|
+
* <Link href="/about">About</Link>
|
|
23
|
+
* <Link href="/careers">Careers</Link>
|
|
24
|
+
* </FooterLinks>
|
|
25
|
+
* </FooterSection>
|
|
26
|
+
* </FooterContent>
|
|
27
|
+
* <FooterBottom>
|
|
28
|
+
* <FooterCopyright>© 2026 Engrate</FooterCopyright>
|
|
29
|
+
* </FooterBottom>
|
|
30
|
+
* </Footer>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLElement>>;
|
|
34
|
+
interface FooterContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
35
|
+
/** Render as a child component */
|
|
36
|
+
asChild?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Main content container for footer sections.
|
|
40
|
+
* Provides a responsive grid layout for footer columns.
|
|
41
|
+
*/
|
|
42
|
+
declare const FooterContent: React.ForwardRefExoticComponent<FooterContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
interface FooterSectionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
44
|
+
/** Render as a child component */
|
|
45
|
+
asChild?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A section/column within the footer content.
|
|
49
|
+
* Typically contains a heading and a list of links.
|
|
50
|
+
*/
|
|
51
|
+
declare const FooterSection: React.ForwardRefExoticComponent<FooterSectionProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
interface FooterHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
53
|
+
/** Render as a child component */
|
|
54
|
+
asChild?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Heading for a footer section.
|
|
58
|
+
*/
|
|
59
|
+
declare const FooterHeading: React.ForwardRefExoticComponent<FooterHeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
60
|
+
interface FooterLinksProps extends React.HTMLAttributes<HTMLElement> {
|
|
61
|
+
/** Render as a child component */
|
|
62
|
+
asChild?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Container for navigation links within a footer section.
|
|
66
|
+
*/
|
|
67
|
+
declare const FooterLinks: React.ForwardRefExoticComponent<FooterLinksProps & React.RefAttributes<HTMLElement>>;
|
|
68
|
+
interface FooterBottomProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
69
|
+
/** Render as a child component */
|
|
70
|
+
asChild?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Bottom section of the footer.
|
|
74
|
+
* Typically contains copyright text and legal links.
|
|
75
|
+
*/
|
|
76
|
+
declare const FooterBottom: React.ForwardRefExoticComponent<FooterBottomProps & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
interface FooterCopyrightProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
78
|
+
/** Render as a child component */
|
|
79
|
+
asChild?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Copyright text component for the footer.
|
|
83
|
+
*/
|
|
84
|
+
declare const FooterCopyright: React.ForwardRefExoticComponent<FooterCopyrightProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
85
|
+
export { Footer, footerVariants, FooterContent, FooterSection, FooterHeading, FooterLinks, FooterBottom, FooterCopyright, };
|
|
86
|
+
export type { FooterProps, FooterContentProps, FooterSectionProps, FooterHeadingProps, FooterLinksProps, FooterBottomProps, FooterCopyrightProps, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Footer, footerVariants, FooterContent, FooterSection, FooterHeading, FooterLinks, FooterBottom, FooterCopyright, } from './Footer';
|
|
2
|
+
export type { FooterProps, FooterContentProps, FooterSectionProps, FooterHeadingProps, FooterLinksProps, FooterBottomProps, FooterCopyrightProps, } from './Footer';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
declare const gridVariants: (props?: ({
|
|
3
3
|
cols?: 1 | 2 | 3 | 4 | 5 | 12 | 6 | null | undefined;
|
|
4
4
|
gap?: "none" | "sm" | "lg" | "md" | "xl" | "xs" | "2xl" | null | undefined;
|
|
5
|
-
align?: "end" | "start" | "center" | "
|
|
5
|
+
align?: "end" | "start" | "center" | "baseline" | "stretch" | null | undefined;
|
|
6
6
|
justify?: "end" | "start" | "center" | "stretch" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
type ColsValue = 1 | 2 | 3 | 4 | 5 | 6 | 12;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const headerVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "transparent" | "filled" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
sticky?: boolean | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
interface HeaderProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof headerVariants> {
|
|
9
|
+
/** Render as a child component */
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Header component for page navigation and branding.
|
|
14
|
+
* Supports multiple variants and sticky positioning.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Header>
|
|
19
|
+
* <HeaderLogo>
|
|
20
|
+
* <EngrateLogo />
|
|
21
|
+
* </HeaderLogo>
|
|
22
|
+
* <HeaderNav>
|
|
23
|
+
* <Link variant="nav" href="/about">About</Link>
|
|
24
|
+
* </HeaderNav>
|
|
25
|
+
* <HeaderActions>
|
|
26
|
+
* <Button>Sign In</Button>
|
|
27
|
+
* </HeaderActions>
|
|
28
|
+
* </Header>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLElement>>;
|
|
32
|
+
interface HeaderLogoProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
/** Render as a child component */
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Container for the logo within the Header.
|
|
38
|
+
* Typically wraps an EngrateLogo or custom logo component.
|
|
39
|
+
*/
|
|
40
|
+
declare const HeaderLogo: React.ForwardRefExoticComponent<HeaderLogoProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
interface HeaderNavProps extends React.HTMLAttributes<HTMLElement> {
|
|
42
|
+
/** Render as a child component */
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Navigation container within the Header.
|
|
47
|
+
* Wraps navigation links in a flex container.
|
|
48
|
+
*/
|
|
49
|
+
declare const HeaderNav: React.ForwardRefExoticComponent<HeaderNavProps & React.RefAttributes<HTMLElement>>;
|
|
50
|
+
interface HeaderActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
51
|
+
/** Render as a child component */
|
|
52
|
+
asChild?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Container for action buttons/links in the Header.
|
|
56
|
+
* Typically contains CTAs like "Sign In" or "Get Started".
|
|
57
|
+
*/
|
|
58
|
+
declare const HeaderActions: React.ForwardRefExoticComponent<HeaderActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
export { Header, headerVariants, HeaderLogo, HeaderNav, HeaderActions };
|
|
60
|
+
export type { HeaderProps, HeaderLogoProps, HeaderNavProps, HeaderActionsProps };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { EngrateLogoProps } from '../EngrateLogo';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
interface SidebarContextValue {
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
7
|
+
collapsible: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function useSidebarContext(): SidebarContextValue;
|
|
10
|
+
declare const sidebarVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "bordered" | null | undefined;
|
|
12
|
+
width?: "default" | "sm" | "lg" | null | undefined;
|
|
13
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
+
interface SidebarProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof sidebarVariants> {
|
|
15
|
+
/** Whether the sidebar is in collapsed state */
|
|
16
|
+
defaultCollapsed?: boolean;
|
|
17
|
+
/** Controlled collapsed state */
|
|
18
|
+
collapsed?: boolean;
|
|
19
|
+
/** Callback when collapsed state changes */
|
|
20
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
21
|
+
/** Whether the sidebar is collapsible */
|
|
22
|
+
collapsible?: boolean;
|
|
23
|
+
/** Automatically collapse on mobile screens (default: true) */
|
|
24
|
+
autoCollapseMobile?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sidebar component for application navigation.
|
|
28
|
+
* Supports collapsible behavior, navigation items with icons, and sections.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Sidebar>
|
|
33
|
+
* <SidebarHeader>
|
|
34
|
+
* <SidebarLogo />
|
|
35
|
+
* </SidebarHeader>
|
|
36
|
+
* <SidebarContent>
|
|
37
|
+
* <SidebarGroup>
|
|
38
|
+
* <SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
39
|
+
* <SidebarItem icon={<HomeIcon />} active>Home</SidebarItem>
|
|
40
|
+
* <SidebarItem icon={<SettingsIcon />}>Settings</SidebarItem>
|
|
41
|
+
* </SidebarGroup>
|
|
42
|
+
* </SidebarContent>
|
|
43
|
+
* <SidebarFooter>
|
|
44
|
+
* <SidebarTrigger />
|
|
45
|
+
* </SidebarFooter>
|
|
46
|
+
* </Sidebar>
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLElement>>;
|
|
50
|
+
interface SidebarHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
51
|
+
}
|
|
52
|
+
declare const SidebarHeader: React.ForwardRefExoticComponent<SidebarHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
interface SidebarContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
54
|
+
}
|
|
55
|
+
declare const SidebarContent: React.ForwardRefExoticComponent<SidebarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
interface SidebarFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
57
|
+
}
|
|
58
|
+
declare const SidebarFooter: React.ForwardRefExoticComponent<SidebarFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
interface SidebarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
60
|
+
}
|
|
61
|
+
declare const SidebarGroup: React.ForwardRefExoticComponent<SidebarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
interface SidebarGroupLabelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
63
|
+
}
|
|
64
|
+
declare const SidebarGroupLabel: React.ForwardRefExoticComponent<SidebarGroupLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare const sidebarItemVariants: (props?: ({
|
|
66
|
+
active?: boolean | null | undefined;
|
|
67
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
68
|
+
interface SidebarItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof sidebarItemVariants> {
|
|
69
|
+
/** Icon to display before the label */
|
|
70
|
+
icon?: React.ReactNode;
|
|
71
|
+
/** Render as a child component (for use with Next.js Link, etc.) */
|
|
72
|
+
asChild?: boolean;
|
|
73
|
+
}
|
|
74
|
+
declare const SidebarItem: React.ForwardRefExoticComponent<SidebarItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
interface SidebarTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
76
|
+
}
|
|
77
|
+
declare const SidebarTrigger: React.ForwardRefExoticComponent<SidebarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
78
|
+
interface SidebarSeparatorProps extends React.HTMLAttributes<HTMLHRElement> {
|
|
79
|
+
}
|
|
80
|
+
declare const SidebarSeparator: React.ForwardRefExoticComponent<SidebarSeparatorProps & React.RefAttributes<HTMLHRElement>>;
|
|
81
|
+
interface SidebarLogoProps extends Omit<EngrateLogoProps, 'compact'> {
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* SidebarLogo component that automatically syncs the EngrateLogo compact state
|
|
85
|
+
* with the Sidebar's collapsed state. Shows the full logo when expanded and
|
|
86
|
+
* the compact icon-only version when collapsed.
|
|
87
|
+
*
|
|
88
|
+
* Must be used within a Sidebar component.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* <Sidebar>
|
|
93
|
+
* <SidebarHeader>
|
|
94
|
+
* <SidebarLogo />
|
|
95
|
+
* </SidebarHeader>
|
|
96
|
+
* ...
|
|
97
|
+
* </Sidebar>
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
declare function SidebarLogo({ ...props }: SidebarLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
declare namespace SidebarLogo {
|
|
102
|
+
var displayName: string;
|
|
103
|
+
}
|
|
104
|
+
export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarItem, SidebarTrigger, SidebarSeparator, SidebarLogo, sidebarVariants, sidebarItemVariants, useSidebarContext, };
|
|
105
|
+
export type { SidebarProps, SidebarHeaderProps, SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarGroupLabelProps, SidebarItemProps, SidebarTriggerProps, SidebarSeparatorProps, SidebarLogoProps, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarItem, SidebarTrigger, SidebarSeparator, sidebarVariants, sidebarItemVariants, useSidebarContext, type SidebarProps, type SidebarHeaderProps, type SidebarContentProps, type SidebarFooterProps, type SidebarGroupProps, type SidebarGroupLabelProps, type SidebarItemProps, type SidebarTriggerProps, type SidebarSeparatorProps, } from './Sidebar';
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
declare const stackVariants: (props?: ({
|
|
4
4
|
direction?: "horizontal" | "vertical" | null | undefined;
|
|
5
5
|
gap?: "none" | "sm" | "lg" | "md" | "xl" | "xs" | "2xl" | null | undefined;
|
|
6
|
-
align?: "end" | "start" | "center" | "
|
|
6
|
+
align?: "end" | "start" | "center" | "baseline" | "stretch" | null | undefined;
|
|
7
7
|
justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
|
|
8
8
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -12,10 +12,13 @@ export * from './DatePicker';
|
|
|
12
12
|
export * from './DateTimePicker';
|
|
13
13
|
export * from './Divider';
|
|
14
14
|
export * from './DropdownMenu';
|
|
15
|
+
export * from './EngrateLogo';
|
|
15
16
|
export * from './Eyebrow';
|
|
17
|
+
export * from './Footer';
|
|
16
18
|
export * from './FormField';
|
|
17
19
|
export * from './FormMessage';
|
|
18
20
|
export * from './Grid';
|
|
21
|
+
export * from './Header';
|
|
19
22
|
export * from './Heading';
|
|
20
23
|
export * from './Input';
|
|
21
24
|
export * from './Label';
|
|
@@ -27,6 +30,7 @@ export * from './PieChart';
|
|
|
27
30
|
export * from './ProgressIndicator';
|
|
28
31
|
export * from './Radio';
|
|
29
32
|
export * from './Select';
|
|
33
|
+
export * from './Sidebar';
|
|
30
34
|
export * from './Skeleton';
|
|
31
35
|
export * from './Spinner';
|
|
32
36
|
export * from './Stack';
|