@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const textVariants: (props?: ({
|
|
4
|
+
variant?: "lead" | "semi-lead" | "body-lg" | "body" | "descriptive" | "label" | "label-sm" | null | undefined;
|
|
5
|
+
weight?: "medium" | "regular" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type TextElement = 'p' | 'span' | 'div' | 'label';
|
|
8
|
+
interface TextProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants> {
|
|
9
|
+
/**
|
|
10
|
+
* Render as a different element using Radix Slot
|
|
11
|
+
*/
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Override the default HTML element
|
|
15
|
+
* @default 'p'
|
|
16
|
+
*/
|
|
17
|
+
as?: TextElement;
|
|
18
|
+
}
|
|
19
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
|
|
20
|
+
export { Text, textVariants };
|
|
21
|
+
export type { TextProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Text';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const textareaVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "error" | null | undefined;
|
|
5
|
+
resize?: "none" | "both" | "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaVariants> {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Textarea component following Engrate brand guidelines.
|
|
11
|
+
* Features rounded corners, subtle background, and sunflower focus ring.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Textarea placeholder="Enter your message" />
|
|
16
|
+
* <Textarea variant="error" placeholder="Invalid input" />
|
|
17
|
+
* <Textarea resize="none" placeholder="Fixed size" />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
21
|
+
export { Textarea, textareaVariants };
|
|
22
|
+
export type { TextareaProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
4
|
+
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
|
+
interface ToastViewportProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> {
|
|
6
|
+
}
|
|
7
|
+
declare const ToastViewport: React.ForwardRefExoticComponent<ToastViewportProps & React.RefAttributes<HTMLOListElement>>;
|
|
8
|
+
declare const toastVariants: (props?: ({
|
|
9
|
+
variant?: "default" | "error" | "success" | "warning" | "info" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
interface ToastProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root>, VariantProps<typeof toastVariants> {
|
|
12
|
+
}
|
|
13
|
+
declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLLIElement>>;
|
|
14
|
+
interface ToastActionProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action> {
|
|
15
|
+
}
|
|
16
|
+
declare const ToastAction: React.ForwardRefExoticComponent<ToastActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
interface ToastCloseProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close> {
|
|
18
|
+
}
|
|
19
|
+
declare const ToastClose: React.ForwardRefExoticComponent<ToastCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
interface ToastTitleProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title> {
|
|
21
|
+
}
|
|
22
|
+
declare const ToastTitle: React.ForwardRefExoticComponent<ToastTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface ToastDescriptionProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description> {
|
|
24
|
+
}
|
|
25
|
+
declare const ToastDescription: React.ForwardRefExoticComponent<ToastDescriptionProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, toastVariants, };
|
|
27
|
+
export type { ToastActionProps, ToastCloseProps, ToastDescriptionProps, ToastProps, ToastTitleProps, ToastViewportProps, };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
5
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
6
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const TooltipPortal: React.FC<TooltipPrimitive.TooltipPortalProps>;
|
|
8
|
+
interface TooltipArrowProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow> {
|
|
9
|
+
}
|
|
10
|
+
declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
11
|
+
declare const tooltipContentVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "light" | null | undefined;
|
|
13
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
+
interface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, VariantProps<typeof tooltipContentVariants> {
|
|
15
|
+
/** Whether to show an arrow pointing to the trigger */
|
|
16
|
+
showArrow?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Tooltip content component that displays contextual information.
|
|
20
|
+
* Follows Engrate brand guidelines with dark background by default.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <TooltipProvider>
|
|
25
|
+
* <Tooltip>
|
|
26
|
+
* <TooltipTrigger>Hover me</TooltipTrigger>
|
|
27
|
+
* <TooltipContent>Helpful information</TooltipContent>
|
|
28
|
+
* </Tooltip>
|
|
29
|
+
* </TooltipProvider>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export { Tooltip, TooltipArrow, TooltipContent, tooltipContentVariants, TooltipPortal, TooltipProvider, TooltipTrigger, };
|
|
34
|
+
export type { TooltipArrowProps, TooltipContentProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './AlertDialog';
|
|
2
|
+
export * from './Badge';
|
|
3
|
+
export * from './Breadcrumbs';
|
|
4
|
+
export * from './Button';
|
|
5
|
+
export * from './Card';
|
|
6
|
+
export * from './Checkbox';
|
|
7
|
+
export * from './ContextMenu';
|
|
8
|
+
export * from './DatePicker';
|
|
9
|
+
export * from './DateTimePicker';
|
|
10
|
+
export * from './Divider';
|
|
11
|
+
export * from './DropdownMenu';
|
|
12
|
+
export * from './Eyebrow';
|
|
13
|
+
export * from './FormField';
|
|
14
|
+
export * from './FormMessage';
|
|
15
|
+
export * from './Grid';
|
|
16
|
+
export * from './Heading';
|
|
17
|
+
export * from './Input';
|
|
18
|
+
export * from './Label';
|
|
19
|
+
export * from './Link';
|
|
20
|
+
export * from './Modal';
|
|
21
|
+
export * from './ProgressIndicator';
|
|
22
|
+
export * from './Radio';
|
|
23
|
+
export * from './Select';
|
|
24
|
+
export * from './Skeleton';
|
|
25
|
+
export * from './Spinner';
|
|
26
|
+
export * from './Stack';
|
|
27
|
+
export * from './Switch';
|
|
28
|
+
export * from './Table';
|
|
29
|
+
export * from './TabList';
|
|
30
|
+
export * from './Text';
|
|
31
|
+
export * from './Textarea';
|
|
32
|
+
export * from './Toast';
|
|
33
|
+
export * from './Tooltip';
|