@engrate/components 0.1.0 → 0.1.1
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 +6 -14
- package/dist/components/index.d.ts +1 -0
- package/dist/components/ui/AlertDialog/AlertDialog.d.ts +36 -0
- package/dist/components/ui/AlertDialog/index.d.ts +2 -0
- package/dist/components/ui/Badge/Badge.d.ts +24 -0
- package/dist/components/ui/Badge/index.d.ts +2 -0
- package/dist/components/ui/Breadcrumbs/Breadcrumbs.d.ts +44 -0
- package/dist/components/ui/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/ui/Button/Button.d.ts +24 -0
- package/dist/components/ui/Button/index.d.ts +2 -0
- package/dist/components/ui/Card/Card.d.ts +29 -0
- package/dist/components/ui/Card/index.d.ts +1 -0
- package/dist/components/ui/Checkbox/Checkbox.d.ts +18 -0
- package/dist/components/ui/Checkbox/index.d.ts +2 -0
- package/dist/components/ui/ContextMenu/ContextMenu.d.ts +40 -0
- package/dist/components/ui/ContextMenu/index.d.ts +2 -0
- package/dist/components/ui/DatePicker/DatePicker.d.ts +47 -0
- package/dist/components/ui/DatePicker/index.d.ts +2 -0
- package/dist/components/ui/DateTimePicker/DateTimePicker.d.ts +51 -0
- package/dist/components/ui/DateTimePicker/index.d.ts +2 -0
- package/dist/components/ui/Divider/Divider.d.ts +32 -0
- package/dist/components/ui/Divider/index.d.ts +2 -0
- package/dist/components/ui/DropdownMenu/DropdownMenu.d.ts +45 -0
- package/dist/components/ui/DropdownMenu/index.d.ts +2 -0
- package/dist/components/ui/Eyebrow/Eyebrow.d.ts +11 -0
- package/dist/components/ui/Eyebrow/index.d.ts +2 -0
- package/dist/components/ui/FormField/FormField.d.ts +32 -0
- package/dist/components/ui/FormField/index.d.ts +2 -0
- package/dist/components/ui/FormMessage/FormMessage.d.ts +18 -0
- package/dist/components/ui/FormMessage/index.d.ts +2 -0
- package/dist/components/ui/Grid/Grid.d.ts +94 -0
- package/dist/components/ui/Grid/index.d.ts +2 -0
- package/dist/components/ui/Heading/Heading.d.ts +20 -0
- package/dist/components/ui/Heading/index.d.ts +1 -0
- package/dist/components/ui/Input/Input.d.ts +20 -0
- package/dist/components/ui/Input/index.d.ts +2 -0
- package/dist/components/ui/Label/Label.d.ts +21 -0
- package/dist/components/ui/Label/index.d.ts +2 -0
- package/dist/components/ui/Link/Link.d.ts +24 -0
- package/dist/components/ui/Link/index.d.ts +2 -0
- package/dist/components/ui/Modal/Modal.d.ts +32 -0
- package/dist/components/ui/Modal/index.d.ts +2 -0
- package/dist/components/ui/ProgressIndicator/ProgressIndicator.d.ts +33 -0
- package/dist/components/ui/ProgressIndicator/index.d.ts +2 -0
- package/dist/components/ui/Radio/Radio.d.ts +29 -0
- package/dist/components/ui/Radio/index.d.ts +2 -0
- package/dist/components/ui/Select/Select.d.ts +39 -0
- package/dist/components/ui/Select/index.d.ts +2 -0
- package/dist/components/ui/Skeleton/Skeleton.d.ts +25 -0
- package/dist/components/ui/Skeleton/index.d.ts +2 -0
- package/dist/components/ui/Spinner/Spinner.d.ts +24 -0
- package/dist/components/ui/Spinner/index.d.ts +2 -0
- package/dist/components/ui/Stack/Stack.d.ts +36 -0
- package/dist/components/ui/Stack/index.d.ts +2 -0
- package/dist/components/ui/Switch/Switch.d.ts +18 -0
- package/dist/components/ui/Switch/index.d.ts +2 -0
- package/dist/components/ui/TabList/TabList.d.ts +61 -0
- package/dist/components/ui/TabList/index.d.ts +2 -0
- package/dist/components/ui/Table/Table.d.ts +88 -0
- package/dist/components/ui/Table/index.d.ts +2 -0
- package/dist/components/ui/Text/Text.d.ts +21 -0
- package/dist/components/ui/Text/index.d.ts +1 -0
- package/dist/components/ui/Textarea/Textarea.d.ts +22 -0
- package/dist/components/ui/Textarea/index.d.ts +2 -0
- package/dist/components/ui/Toast/Toast.d.ts +27 -0
- package/dist/components/ui/Toast/index.d.ts +2 -0
- package/dist/components/ui/Tooltip/Tooltip.d.ts +34 -0
- package/dist/components/ui/Tooltip/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts +33 -0
- package/dist/index.cjs.js +15 -15
- package/dist/index.d.ts +2 -1208
- package/dist/index.es.js +2123 -2030
- package/dist/lib/utils.d.ts +11 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind.preset.d.ts +47 -0
- package/dist/test/setup.d.ts +0 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -84,12 +84,12 @@ npm install
|
|
|
84
84
|
|
|
85
85
|
| Command | Description |
|
|
86
86
|
| ------------------------- | ---------------------------------------- |
|
|
87
|
-
| `npm run dev` | Start
|
|
87
|
+
| `npm run dev` | Start Storybook at http://localhost:6006 |
|
|
88
88
|
| `npm run build` | Build library to `dist/` |
|
|
89
89
|
| `npm run storybook` | Start Storybook at http://localhost:6006 |
|
|
90
90
|
| `npm run build-storybook` | Build static Storybook |
|
|
91
|
-
| `npm run test` |
|
|
92
|
-
| `npm run test:
|
|
91
|
+
| `npm run test` | Single test run |
|
|
92
|
+
| `npm run test:watch` | Run tests in watch mode |
|
|
93
93
|
| `npm run test:coverage` | Run tests with coverage |
|
|
94
94
|
| `npm run lint` | Check for linting errors |
|
|
95
95
|
| `npm run lint:fix` | Fix linting errors |
|
|
@@ -122,7 +122,7 @@ src/
|
|
|
122
122
|
- `ComponentName.stories.tsx` - Storybook stories
|
|
123
123
|
- `index.ts` - Barrel export
|
|
124
124
|
3. Export from `src/components/ui/index.ts`
|
|
125
|
-
4. Run
|
|
125
|
+
4. Run `npm run verify` and Storybook to verify
|
|
126
126
|
|
|
127
127
|
### Testing
|
|
128
128
|
|
|
@@ -143,17 +143,9 @@ describe('Button', () => {
|
|
|
143
143
|
})
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
##
|
|
146
|
+
## Publishing
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- **10/90 Rule**: 10% color, 90% grayscale
|
|
151
|
-
- **Never pure white**: Use `bg-main` (#FAFAFA) or warmer alternatives
|
|
152
|
-
- **Pill-shaped buttons**: Full border-radius (`rounded-pill`)
|
|
153
|
-
- **No bold fonts**: Use Regular weight only (Medium for emphasis)
|
|
154
|
-
- **Left-aligned text**: Default alignment
|
|
155
|
-
|
|
156
|
-
## Publishing to NPM
|
|
148
|
+
To publish to [NPM](https://www.npmjs.com/package/@engrate/components) and [Github Pages](https://engrate.github.io/eg-components)
|
|
157
149
|
|
|
158
150
|
1. Make sure you have access to the NPM `@engrate` org
|
|
159
151
|
2. Update version in `package.json`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { buttonVariants } from '../Button';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
5
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
6
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
8
|
+
interface AlertDialogOverlayProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay> {
|
|
9
|
+
}
|
|
10
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const alertDialogContentVariants: (props?: ({
|
|
12
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
13
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
+
interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>, VariantProps<typeof alertDialogContentVariants> {
|
|
15
|
+
}
|
|
16
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
interface AlertDialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
}
|
|
19
|
+
declare const AlertDialogHeader: React.ForwardRefExoticComponent<AlertDialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
interface AlertDialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
}
|
|
22
|
+
declare const AlertDialogFooter: React.ForwardRefExoticComponent<AlertDialogFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface AlertDialogTitleProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> {
|
|
24
|
+
}
|
|
25
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
26
|
+
interface AlertDialogDescriptionProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> {
|
|
27
|
+
}
|
|
28
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
29
|
+
interface AlertDialogActionProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>, VariantProps<typeof buttonVariants> {
|
|
30
|
+
}
|
|
31
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
interface AlertDialogCancelProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>, VariantProps<typeof buttonVariants> {
|
|
33
|
+
}
|
|
34
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, alertDialogContentVariants, };
|
|
36
|
+
export type { AlertDialogOverlayProps, AlertDialogContentProps, AlertDialogHeaderProps, AlertDialogFooterProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogActionProps, AlertDialogCancelProps, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, alertDialogContentVariants, } from './AlertDialog';
|
|
2
|
+
export type { AlertDialogOverlayProps, AlertDialogContentProps, AlertDialogHeaderProps, AlertDialogFooterProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogActionProps, AlertDialogCancelProps, } from './AlertDialog';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "secondary" | "sunflower" | "lemon-meringue" | "vanilla" | "eggshell" | "warm-purple" | "cool-purple" | "electric-blue" | "deep-blue" | "error" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof badgeVariants> {
|
|
8
|
+
/** Render as a child component (for use with links, etc.) */
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Badge component for displaying status, labels, or counts.
|
|
13
|
+
* Features pill-shaped design with various Engrate brand colors.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Badge variant="sunflower">New</Badge>
|
|
18
|
+
* <Badge variant="error" size="sm">Alert</Badge>
|
|
19
|
+
* <Badge variant="deep-blue" size="lg">Premium</Badge>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
23
|
+
export { Badge, badgeVariants };
|
|
24
|
+
export type { BadgeProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const breadcrumbsVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare const breadcrumbItemVariants: (props?: ({
|
|
7
|
+
isCurrentPage?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof breadcrumbsVariants> {
|
|
10
|
+
/** Custom separator between breadcrumb items */
|
|
11
|
+
separator?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Breadcrumbs navigation component following Engrate brand guidelines.
|
|
15
|
+
* Provides a navigation trail showing the user's location within a hierarchy.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Breadcrumbs>
|
|
20
|
+
* <BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
21
|
+
* <BreadcrumbItem href="/products">Products</BreadcrumbItem>
|
|
22
|
+
* <BreadcrumbItem isCurrentPage>Current Product</BreadcrumbItem>
|
|
23
|
+
* </Breadcrumbs>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const Breadcrumbs: React.ForwardRefExoticComponent<BreadcrumbsProps & React.RefAttributes<HTMLElement>>;
|
|
27
|
+
interface BreadcrumbItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof breadcrumbItemVariants> {
|
|
28
|
+
/** Render as a child component (for use with Next.js Link, etc.) */
|
|
29
|
+
asChild?: boolean;
|
|
30
|
+
/** Indicates this is the current page (should not be a link) */
|
|
31
|
+
isCurrentPage?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Individual breadcrumb item. Use href for links or isCurrentPage for the current location.
|
|
35
|
+
*/
|
|
36
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
37
|
+
interface BreadcrumbSeparatorProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Separator between breadcrumb items. Defaults to a chevron icon.
|
|
41
|
+
*/
|
|
42
|
+
declare const BreadcrumbSeparator: React.ForwardRefExoticComponent<BreadcrumbSeparatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
43
|
+
export { Breadcrumbs, BreadcrumbItem, BreadcrumbSeparator, breadcrumbsVariants, breadcrumbItemVariants, };
|
|
44
|
+
export type { BreadcrumbsProps, BreadcrumbItemProps, BreadcrumbSeparatorProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "sm" | "default" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
/** Render as a child component (for use with Next.js Link, etc.) */
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Primary UI button component following Engrate brand guidelines.
|
|
13
|
+
* Features pill-shaped design with Sunflower yellow as primary color.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Button variant="primary">Click me</Button>
|
|
18
|
+
* <Button variant="secondary" size="sm">Secondary</Button>
|
|
19
|
+
* <Button asChild><a href="/link">Link Button</a></Button>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export { Button, buttonVariants };
|
|
24
|
+
export type { ButtonProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "ghost" | "default" | "elevated" | null | undefined;
|
|
5
|
+
padding?: "sm" | "default" | "lg" | "none" | null | undefined;
|
|
6
|
+
bg?: "contrast" | "main" | "sunflower" | "lemon-meringue" | "vanilla" | "eggshell" | "warm-purple" | "cool-purple" | "electric-blue" | "deep-blue" | "error" | "white" | "card" | "alt" | "transparent" | "sunflower-hover" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
9
|
+
/** Render as a child component */
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
/** Background color from Engrate design tokens */
|
|
12
|
+
bg?: VariantProps<typeof cardVariants>['bg'];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Card component for displaying content in a contained area.
|
|
16
|
+
* Follows Engrate design system with support for variants, padding, and background colors.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Card>
|
|
21
|
+
* <Heading>Title</Heading>
|
|
22
|
+
* <Text>Content goes here</Text>
|
|
23
|
+
* </Card>
|
|
24
|
+
* <Card variant="elevated" padding="lg">Elevated card</Card>
|
|
25
|
+
* <Card bg="sunflower">Highlighted card</Card>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export { Card, cardVariants, type CardProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card, cardVariants, type CardProps } from './Card';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Checkbox component following Engrate brand guidelines.
|
|
7
|
+
* Built on Radix UI Checkbox for accessibility.
|
|
8
|
+
* Features sunflower accent when checked.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Checkbox id="terms" />
|
|
13
|
+
* <Checkbox checked disabled />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export { Checkbox };
|
|
18
|
+
export type { CheckboxProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
3
|
+
declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
4
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
7
|
+
declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
8
|
+
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
interface ContextMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
interface ContextMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> {
|
|
14
|
+
}
|
|
15
|
+
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
interface ContextMenuContentProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> {
|
|
17
|
+
}
|
|
18
|
+
declare const ContextMenuContent: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
interface ContextMenuItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const ContextMenuItem: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface ContextMenuCheckboxItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> {
|
|
24
|
+
}
|
|
25
|
+
declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
interface ContextMenuRadioItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> {
|
|
27
|
+
}
|
|
28
|
+
declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
interface ContextMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {
|
|
30
|
+
inset?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const ContextMenuLabel: React.ForwardRefExoticComponent<ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
interface ContextMenuSeparatorProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> {
|
|
34
|
+
}
|
|
35
|
+
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
interface ContextMenuShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
37
|
+
}
|
|
38
|
+
declare const ContextMenuShortcut: React.ForwardRefExoticComponent<ContextMenuShortcutProps & React.RefAttributes<HTMLSpanElement>>;
|
|
39
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|
|
40
|
+
export type { ContextMenuContentProps, ContextMenuItemProps, ContextMenuCheckboxItemProps, ContextMenuRadioItemProps, ContextMenuLabelProps, ContextMenuSeparatorProps, ContextMenuShortcutProps, ContextMenuSubTriggerProps, ContextMenuSubContentProps, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './ContextMenu';
|
|
2
|
+
export type { ContextMenuContentProps, ContextMenuItemProps, ContextMenuCheckboxItemProps, ContextMenuRadioItemProps, ContextMenuLabelProps, ContextMenuSeparatorProps, ContextMenuShortcutProps, ContextMenuSubTriggerProps, ContextMenuSubContentProps, } from './ContextMenu';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const datePickerTriggerVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "error" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare const calendarDayVariants: (props?: ({
|
|
7
|
+
state?: "default" | "disabled" | "selected" | "today" | "outside" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
interface DatePickerProps extends VariantProps<typeof datePickerTriggerVariants> {
|
|
10
|
+
/** The currently selected date */
|
|
11
|
+
value?: Date | null;
|
|
12
|
+
/** Callback when the date changes */
|
|
13
|
+
onChange?: (date: Date | null) => void;
|
|
14
|
+
/** Placeholder text when no date is selected */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** Date format string (supports MM, dd, yyyy) */
|
|
17
|
+
format?: string;
|
|
18
|
+
/** Minimum selectable date */
|
|
19
|
+
minDate?: Date;
|
|
20
|
+
/** Maximum selectable date */
|
|
21
|
+
maxDate?: Date;
|
|
22
|
+
/** Whether the date picker is disabled */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Additional class name for the trigger */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** ID for the trigger element */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Name attribute for form integration */
|
|
29
|
+
name?: string;
|
|
30
|
+
/** aria-label for accessibility */
|
|
31
|
+
'aria-label'?: string;
|
|
32
|
+
/** aria-describedby for accessibility */
|
|
33
|
+
'aria-describedby'?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* DatePicker component following Engrate brand guidelines.
|
|
37
|
+
* Features a calendar popup with month/year navigation and accessible keyboard controls.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const [date, setDate] = useState<Date | null>(null)
|
|
42
|
+
* <DatePicker value={date} onChange={setDate} placeholder="Select a date" />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
export { DatePicker, datePickerTriggerVariants, calendarDayVariants };
|
|
47
|
+
export type { DatePickerProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const dateTimePickerTriggerVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "error" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare const calendarDayVariants: (props?: ({
|
|
7
|
+
state?: "default" | "disabled" | "selected" | "today" | "outside" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
interface DateTimePickerProps extends VariantProps<typeof dateTimePickerTriggerVariants> {
|
|
10
|
+
/** The currently selected date and time */
|
|
11
|
+
value?: Date | null;
|
|
12
|
+
/** Callback when the date/time changes */
|
|
13
|
+
onChange?: (date: Date | null) => void;
|
|
14
|
+
/** Placeholder text when no date is selected */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** Date/time format string (supports MM, dd, yyyy, HH, hh, mm, a) */
|
|
17
|
+
format?: string;
|
|
18
|
+
/** Minimum selectable date */
|
|
19
|
+
minDate?: Date;
|
|
20
|
+
/** Maximum selectable date */
|
|
21
|
+
maxDate?: Date;
|
|
22
|
+
/** Whether the date time picker is disabled */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Additional class name for the trigger */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** ID for the trigger element */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Name attribute for form integration */
|
|
29
|
+
name?: string;
|
|
30
|
+
/** Use 24-hour format for time (default: true) */
|
|
31
|
+
use24Hour?: boolean;
|
|
32
|
+
/** Step for minutes (default: 1) */
|
|
33
|
+
minuteStep?: number;
|
|
34
|
+
/** aria-label for accessibility */
|
|
35
|
+
'aria-label'?: string;
|
|
36
|
+
/** aria-describedby for accessibility */
|
|
37
|
+
'aria-describedby'?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* DateTimePicker component following Engrate brand guidelines.
|
|
41
|
+
* Features a calendar popup with time selection and accessible keyboard controls.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* const [dateTime, setDateTime] = useState<Date | null>(null)
|
|
46
|
+
* <DateTimePicker value={dateTime} onChange={setDateTime} placeholder="Select date and time" />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
export { DateTimePicker, dateTimePickerTriggerVariants, calendarDayVariants as dateTimePickerCalendarDayVariants, };
|
|
51
|
+
export type { DateTimePickerProps };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const dividerVariants: (props?: ({
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
interface DividerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the divider is decorative only.
|
|
9
|
+
* When true, the divider will be hidden from screen readers.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
decorative?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Divider component for visually separating content.
|
|
16
|
+
* Supports both horizontal and vertical orientations.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // Horizontal divider (default)
|
|
21
|
+
* <Divider />
|
|
22
|
+
*
|
|
23
|
+
* // Vertical divider
|
|
24
|
+
* <Divider orientation="vertical" />
|
|
25
|
+
*
|
|
26
|
+
* // With custom styling
|
|
27
|
+
* <Divider className="my-4" />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export { Divider, dividerVariants };
|
|
32
|
+
export type { DividerProps };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
interface DropdownMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
interface DropdownMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> {
|
|
14
|
+
}
|
|
15
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
interface DropdownMenuContentProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {
|
|
17
|
+
}
|
|
18
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface DropdownMenuCheckboxItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> {
|
|
24
|
+
}
|
|
25
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
interface DropdownMenuRadioItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> {
|
|
27
|
+
}
|
|
28
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
interface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
|
|
30
|
+
inset?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
interface DropdownMenuSeparatorProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {
|
|
34
|
+
}
|
|
35
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
interface DropdownMenuShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
37
|
+
}
|
|
38
|
+
declare const DropdownMenuShortcut: React.ForwardRefExoticComponent<DropdownMenuShortcutProps & React.RefAttributes<HTMLSpanElement>>;
|
|
39
|
+
interface ActionsMenuButtonProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger> {
|
|
40
|
+
/** Size of the ellipsis icon */
|
|
41
|
+
iconSize?: 'sm' | 'default' | 'lg';
|
|
42
|
+
}
|
|
43
|
+
declare const ActionsMenuButton: React.ForwardRefExoticComponent<ActionsMenuButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, ActionsMenuButton, };
|
|
45
|
+
export type { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, ActionsMenuButtonProps, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, ActionsMenuButton, } from './DropdownMenu';
|
|
2
|
+
export type { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, ActionsMenuButtonProps, } from './DropdownMenu';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const eyebrowVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "secondary" | "default" | null | undefined;
|
|
5
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface EyebrowProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof eyebrowVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Eyebrow: React.ForwardRefExoticComponent<EyebrowProps & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
export { Eyebrow, eyebrowVariants };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** The label for the field */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** The size of the label */
|
|
6
|
+
labelSize?: 'default' | 'sm';
|
|
7
|
+
/** An optional hint message */
|
|
8
|
+
hint?: string;
|
|
9
|
+
/** An optional error message */
|
|
10
|
+
error?: string;
|
|
11
|
+
/** The id for the form control (used for htmlFor on label) */
|
|
12
|
+
htmlFor?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Form field wrapper component for consistent form layouts.
|
|
16
|
+
* Composes Label, children (form control), and FormMessage.
|
|
17
|
+
* Simple presentational wrapper following Engrate brand guidelines.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <FormField label="Email" htmlFor="email" hint="We'll never share your email.">
|
|
22
|
+
* <Input id="email" placeholder="you@example.com" />
|
|
23
|
+
* </FormField>
|
|
24
|
+
*
|
|
25
|
+
* <FormField label="Password" htmlFor="password" error="Password is required">
|
|
26
|
+
* <Input id="password" type="password" variant="error" />
|
|
27
|
+
* </FormField>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export { FormField };
|
|
32
|
+
export type { FormFieldProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface FormMessageProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
3
|
+
/** The type of message to display */
|
|
4
|
+
variant?: 'default' | 'error';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Form message component for displaying hints or error messages.
|
|
8
|
+
* Following Engrate brand guidelines.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <FormMessage>This is a hint message</FormMessage>
|
|
13
|
+
* <FormMessage variant="error">This field is required</FormMessage>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const FormMessage: React.ForwardRefExoticComponent<FormMessageProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
17
|
+
export { FormMessage };
|
|
18
|
+
export type { FormMessageProps };
|